Adding a Spring DataSource property to a Configuration class

41 Views Asked by At

I am trying to add the "spring.sql.init.continue-on-error" property to the DataSource, but its not working. This is what I am trying but something is missing. This is a class that extends the Base, but I only need to add this property to the MyDataBaseConfig I dont want to change the Base.

@EnableConfigurationProperties
@Configuration
@XSlf4j
public class MyDataBaseConfig extends BaseDatabaseConfig {
    
    @ConfigurationProperties("spring.sql.init.continue-on-error")
    @Bean(name = "myDataSource")
    public DataSource myDataSource() {
        return super.dataSourceHikari();
    }
0

There are 0 best solutions below