Closed ghost closed 6 years ago
Thanks for the feedback. I forgot to update the code in the blog. I will do that tomorrow. The code on GitHub should work.
You have to expose the AuthenticationManager as a bean. https://github.com/ralscha/blog/blob/master/jwt/server/src/main/java/ch/rasc/jwt/security/SecurityConfig.java#L22-L26
Thanks for your reply.
i have downloaded the zip from your github, this code (with Bean and Override) is in the zip and it doesn't work
it is a compatibility problem version in your pom.xml ?
Maybe the problem is that I use SNAPSHOT releases.
Can you try the M5 release
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.0.M5</version>
</parent>
i tried 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, snapshot, 2.0.0.M3 and 2.0.0.M5 and the same error is still there
Parameter 1 of constructor in main.java.ch.rasc.jwt.security.jwt.TokenProvider required a bean of type 'org.springframework.security.core.userdetails.UserDetailsService' that could not be found.
Unfortunately I cannot reproduce the error.
This works fine on my computer.
git clone https://github.com/ralscha/blog.git
cd blog/jwt/server
./mvnw.sh spring-boot:run
Thank you, it works with mvn spring-boot:run
, no idea because it didn't work yesterday on a other git clone of your project
Good to hear that it work.
I updated the blog post this morning, with the latest source code.
Hi !
Thanks you for sharing on web spring, ionic, ... with your blog !
I have a problem with https://golb.hplar.ch/p/JWT-Authentication-with-Ionic-2-and-Spring-Boot and I have downloaded the zip on github, created a new projet with folder jwt, opened in editor and compiled with JDK 1.8.0_131