-
Notifications
You must be signed in to change notification settings - Fork 11
Review required for microservices module #94
Description
Currently we have made a PR for Spring boot 2.0.0 and devon4j 3.0.
#93
To make microservice module working we have made changes required for spring boot 2.0.0 for microservices. There are some changes that required special attention.
/modules/microservices/microservices/src/main/java/com/devonfw/microservices/configuration/jwt/JsonWebTokenSecurityConfig.java
Line 77 - HystrixPlugins.reset();
This was done because we were getting following exception:
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.servlet.Filter]: Factory method 'springSecurityFilterChain' threw exception; nested exception is java.lang.IllegalStateException: Another strategy was already registered.
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:582) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
... 20 common frames omitted
Caused by: java.lang.IllegalStateException: Another strategy was already registered.
at com.netflix.hystrix.strategy.HystrixPlugins.registerCommandExecutionHook(HystrixPlugins.java:328) ~[hystrix-core-1.5.12.jar:1.5.12]
at com.devonfw.microservices.configuration.jwt.JsonWebTokenSecurityConfig.configure(JsonWebTokenSecurityConfig.java:78) ~[classes/:na]
at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.getHttp(WebSecurityConfigurerAdapter.java:230) ~[spring-security-config-5.0.7.RELEASE.jar:5.0.7.RELEASE]
at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.init(WebSecurityConfigurerAdapter.java:321) ~[spring-security-config-5.0.7.RELEASE.jar:5.0.7.RELEASE]
Also please review the dependencies that were updated for microservice for spring boot 2