Skip to content

Commit

Permalink
Merge pull request #2331 from lihengming/master
Browse files Browse the repository at this point in the history
update > for issue #2330
  • Loading branch information
wenshao authored Feb 9, 2018
2 parents 40e6621 + b11d483 commit efa26fa
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion druid-spring-boot-starter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ spring.datasource.druid.stat-view-servlet.deny=
# Spring监控配置,说明请参考Druid Github Wiki,配置_Druid和Spring关联监控配置
spring.datasource.druid.aop-patterns= # Spring监控AOP切入点,如x.y.z.service.*,配置多个英文逗号分隔
# 如果spring.datasource.druid.aop-patterns要代理的类没有定义interface请设置spring.aop.proxy-target-class=true
```
Druid Spring Boot Starter 不仅限于对以上配置属性提供支持,[```DruidDataSource```](https://github.com/alibaba/druid/blob/master/src/main/java/com/alibaba/druid/pool/DruidDataSource.java) 内提供```setter```方法的可配置属性都将被支持。你可以参考WIKI文档或通过IDE输入提示来进行配置。配置文件的格式你可以选择```.properties``````.yml```,效果是一样的,在配置较多的情况下推荐使用```.yml```

Expand Down
1 change: 0 additions & 1 deletion druid-spring-boot-starter/README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ spring.datasource.druid.stat-view-servlet.deny=
# With Spring monitoring properties, detail see Druid Wiki
spring.datasource.druid.aop-patterns= # Spring monitoring AOP point, such as x.y.z.service.*, multiple separated by comma.
# If 'spring.datasource.druid.aop-patterns' to be the agent class does not define interface need set 'spring.aop.proxy-target-class = true' .
```
The Druid Spring Boot Starter is not limited to support for the above configuration properties, and the configurable properties that provide the ```setter``` method in [``` DruidDataSource```](https://github.com/alibaba/druid/blob/master/src/main/java/com/alibaba/druid/pool/DruidDataSource.java) will be supported. You can refer to the WIKI document or configure it via the IDE input prompt. The format of the configuration file You can choose ```.properties``` or``` .yml```, the effect is the same, in the configuration of more cases recommend the use of ```.yml```.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
*/
@ConditionalOnProperty("spring.datasource.druid.aop-patterns")
public class DruidSpringAopConfiguration {
@Value("${spring.aop.proxy-target-class:false}")
private boolean proxyTargetClass;

@Bean
public Advice advice() {
Expand All @@ -46,7 +44,7 @@ public Advisor advisor(DruidStatProperties properties) {
@Bean
public DefaultAdvisorAutoProxyCreator advisorAutoProxyCreator() {
DefaultAdvisorAutoProxyCreator advisorAutoProxyCreator = new DefaultAdvisorAutoProxyCreator();
advisorAutoProxyCreator.setProxyTargetClass(proxyTargetClass);
advisorAutoProxyCreator.setProxyTargetClass(true);
return advisorAutoProxyCreator;
}
}

0 comments on commit efa26fa

Please sign in to comment.