When compiling I receive an error:
org.springframework.data.r2dbc.dialect.DialectResolver$NoDialectException: Cannot determine a dialect for MySQL using dev.miku.r2dbc.mysql.MySqlConnectionFactory@70d2e40b. Please provide a Dialect.
Interestingly, the application seems to work fine when I launch it through IntelliJ. It only fails, when I launch it from a .jar file.
I've considered that application.properties might affect it, but it seems that during compilation only the configuration class is referenced.
Here is the configuration class:
@Configuration
@EnableR2dbcRepositories
public class R2DBCconfig extends AbstractR2dbcConfiguration {
@Override
@Bean
public ConnectionFactory connectionFactory() {
return MySqlConnectionFactory.from(MySqlConnectionConfiguration.builder()
.host("localhost")
.port(3306)
.username("root")
.password("password")
.database("database")
.build());
} }
Does anyone have any pointers regarding this?