Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SecurityConfig Class has Runtime Error in blogapi SpringBoot Project #2

Open
kishanRai opened this issue Jun 23, 2023 · 0 comments
Open

Comments

@kishanRai
Copy link

kishanRai commented Jun 23, 2023

Hello @championswimmer
Hope you are doing well. While doing revision I found the issue

Issue : Not able to Start the Project
Spring Boot Error Description while starting the server:

Parameter 0 of constructor in com.example.blogapi.security.ApplicationSecurityConfig required a single bean, but 2 were found:

  1. blogapi/src/main/java/com/scaler/blogapi/security/jwt/JWTTokenService.java
  2. blogapi/src/main/java/com/scaler/blogapi/security/tokens/UserTokenService.java

Spring Boot : 3.1.0
Java Version : 17

Resolution

Removed @configuration Annotation from SecurityConfig.java Class

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant