Open salaboy opened 5 years ago
The problem is caused by multiple classed being annotated with @EnableGlobalMethodSecurity . This annotation seems to be very aggressive and cannot appear twice.
We need to find a way to provide an optional configuration so people can disable it if the annotation is already present
@igdianov @ryandawsonuk guys.. if you have time to look at this one.. it is quite a tricky one.. The idea is to decide if we provide these security configuration or not.. or how we can make it easier for people to provide their own. The annotation @EnableGlobalMethodSecurity is the one cause the problem.. if a spring boot app contains two classes defining @EnableGlobalMethodSecurity we should be able to disable ours using a property.
I still have this issue with version 7.1.2 which integrate with JHipster v5.8.1
I have this problem when integrating into springcloud.greenwich.sr2. Is there any solution
activiti-spring-boot-starter 7.1.0.M4
The bean 'methodSecurityInterceptor', defined in class path resource [org/activiti/spring/boot/MethodSecurityConfig.class], could not be registered. A bean with that name has already been defined in class path resource [org/springframework/security/config/annotation/method/configuration/GlobalMethodSecurityConfiguration.class] and overriding is disabled.
Issue caused by overriding bean here: org/activiti/spring/boot/MethodSecurityConfig.class
It feels that we can solve this by removing the class completely and making sure that security is applied.
Reproducer: https://github.com/rasheedamir/vouchers-service
This project uses JHipster with Spring Boot 2.0.5, so there might be some dependency clashing as well.
It seems a common problem while extending that bean:
https://stackoverflow.com/questions/53410526/invalid-bean-definition-when-migrating-spring-boot-2-0-6-to-2-1-0-with-evaluat