Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

Ranch Hand
Posts: 257
Java MySQL Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I already posted this question but on the wrong forum...

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 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 login controller:

My UsersEntity:

The sql statements to log in:

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!