Comments (2)
can you assign this to me would like to work on this!
from spring-chatting-server.
Hello @TrickAndTrack and sure!
But BeanDefinitionOverrideException
in SpringWebSecurity was already solved by adding spring.main.web-application-type : reactive
in application.yaml file in shop-user-service
.
And BeanDefinitionOverrideException
in JPA&Redis Repository was also solved by excluding WebMvcAutoConfiguration.class and scanning JPA and RedisRespotory in different path.
Here is the sample code for solving JPA&Redis Repository BeanDefinitionOverrideException
.
...
@SpringBootApplication(scanBasePackages = "com.example",exclude={DataSourceAutoConfiguration.class,WebMvcAutoConfiguration.class})
@EnableJpaRepositories(basePackages = {"com.example.shopuserservice.domain.user.repository"})
@EnableRedisRepositories(basePackages = {"com.example.shopuserservice.domain.user.redisrepository"})
@EnableDiscoveryClient
@EnableFeignClients
@Import(JpaConfig.class)
@EnableKafka
@EnableWebFlux
public class MainApplication {
public static void main(String[] args) {
SpringApplication.run(OrderServiceApplication.class, args);
}
@Bean
public Logger.Level feignLoggerLevel(){
return Logger.Level.FULL;
}
@Bean
public HttpExchangeRepository httpTraceRepository(){
return new InMemoryHttpExchangeRepository();
}
@Bean(name = "bcrypt")
PasswordEncoder passwordEncoder() {
return new BCryptPasswordEncoder();
}
@Bean
public FeignErrorDecoder getFeignErrorDecoder(){
return new FeignErrorDecoder();
}
}
Why BeanDefinitionOverrideException
is occured in SpringWebSecurity?
The main reason I found is that our web security configuration is currently setting as reactiveSecurity
which is not mvcSecurity. If our server doesn't set any web-application-type
in application.yaml, Spring automatically set our service as normal mvc pattern to web server and security.
So spring tries to set it as mvcSecurity, but we want to set it as reactiveSecurity, so it crashes.
To solve this problem, we add spring.main.web-application-type : reactive
in application.yaml file. And we finally solve BeanDefinitionOverrideException
occured in SpringWebSecurity.
If you have any questions OR want to contribute this project, please contact!
from spring-chatting-server.
Related Issues (20)
- Call logout normally, Get CANNOT_FIND_USER error
- Multithreading in JPA
- Error occured cloning to base directory with Connection Timeout HOT 2
- docker composing with rebuild image + restart container + remove dangling image
- How can we grouping Kafka Consumers in one group and assign multiple topics
- PSQLException when user-server DB connection HOT 1
- Module compile error HOT 1
- Api-gateway ServletWebServerFactory not found exception HOT 1
- What we should stabilize in 5.1.x?
- [Stabilize/Unit+Integeration Test] user-service
- [Stabilize] Dockerlizing HOT 1
- [Stabilize/Unit+Integeration Test] chat-service
- [Stabilize/Unit+Integeration Test] customer-service
- [Unit+Integeration Test] in front-server
- Connection refused when test embedded Redis HOT 1
- [Document] Shell script for removing dangling docker images
- [Document] Updated 5.2.0 Version
- Failed Test in comparing LocalDateTime HOT 1
- thymeleaf th:actions form error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-chatting-server.