We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
建议在druid-spring-boot-starter中增加WallConfig的配置项。目前使用的druid-spring-boot-starter没有办法自定义配置WallConfig。
The text was updated successfully, but these errors were encountered:
@cxjava WallConfig的配置项太多了,推荐你在Spring Boot 中使用下面这种方式来自定义配置WallFilter。
spring.datasource.druid.wall.config.multiStatementAllow=false spring.datasource.druid.wall.config.truncateAllow=true
@Bean @ConfigurationProperties("spring.datasource.druid.wall.config") public WallConfig wallConfig(){ return new WallConfig(); } @Bean public WallFilter wallFilter(){ WallFilter filter = new WallFilter(); filter.setConfig(wallConfig()); filter.setDbType("mysql"); return filter; } @Bean public DataSource dataSource(Environment env){ DruidDataSource dataSource = DruidDataSourceBuilder .create() .build(env,"spring.datasource.druid."); List<Filter> filters = new ArrayList<>(); filters.add(wallFilter()); dataSource.setProxyFilters(filters); return dataSource; }
Sorry, something went wrong.
问题已解决,请用新版本 https://github.com/alibaba/druid/releases/tag/1.1.2
No branches or pull requests
建议在druid-spring-boot-starter中增加WallConfig的配置项。目前使用的druid-spring-boot-starter没有办法自定义配置WallConfig。
The text was updated successfully, but these errors were encountered: