Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Spring Login Issues (Using Maven, spring-data-jpa, Hibernate and spring Security)  RSS feed

 
Rancher
Posts: 279
6
Hibernate IntelliJ IDE Java MySQL Database Spring Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm experimenting a bit with spring and I tried to wright my first secured application.
Only the homepage, the loginpage and the sign-uppage are visitable without loging in an when you try to click on a button in the homepage you're redirected to the loginpage.
So far so good. I'm able to visit the homepage, I'm beïng redirected, I also can register (I checked with datagrip),
But when I try to log in, the page refeshes and nothing happens.
I don't even get a error, no tracestack nothing.
First I had a seperate entity and repository for my role table and had joined the to tables on users.id and role.userId, but then I thought maybe I joined them wrong or something, so I removed my roleEntity and repository and simply putted a extra fiels in my usersEntity but the result is the same.
How do you debug if you have no error or stacktrace?

My WebsecurityConfig:




My LoginController:




My UsersEntity:




My sqlStatements to Login:

 
Ranch Hand
Posts: 441
6
Netbeans IDE Oracle Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You must learn how to use logging in your entity.

 
We don't have time to be charming! Quick, read this tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!