Skip to content
This repository was archived by the owner on Jul 30, 2020. It is now read-only.
This repository was archived by the owner on Jul 30, 2020. It is now read-only.

Review required for microservices module #94

@vapadwal

Description

@vapadwal

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions