Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6771961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:29:37+00:00 2026-05-26T15:29:37+00:00

I am new to Spring and Spring Security. I just need a pointer in

  • 0

I am new to Spring and Spring Security. I just need a pointer in the right direction:

I have a simple Spring MVC/Spring Security webapp. I want to add login functionality into web app. I have created following two table.

CREATE TABLE "users" (
  "USER_ID" NUMBER(10)  NOT NULL,
  "USERNAME" VARCHAR(45) NOT NULL,
  "PASSWORD" VARCHAR(45) NOT NULL,
  "ENABLED" NUMBER(1) NOT NULL,
  PRIMARY KEY ("USER_ID")
)


CREATE TABLE "user_roles" (
  "USER_ROLE_ID" NUMBER(10)  NOT NULL,
  "USER_ID" NUMBER(10)  NOT NULL,
  "AUTHORITY" VARCHAR(45) NOT NULL,
  PRIMARY KEY ("USER_ROLE_ID"),
  CONSTRAINT "FK_user_roles" FOREIGN KEY ("USER_ID") REFERENCES "users" ("USER_ID")
) 

I want to authenticate user from database then it checks role of the user.
I know this is dirt simple, so I just need to hear how the process should flow.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T15:29:38+00:00Added an answer on May 26, 2026 at 3:29 pm

    It’s just a matter of taking your time to read the Security namespace configuration

    Here are some other resources I found useful when I was figuring this out:

    • Configuring Spring Security Form Login with Remember-Me Enabled
    • Spring Security and Wicket-auth-roles
    • Hashing and salting passwords with Spring Security 2

    Basically you are asking for a complete tutorial. It’s better to ask about specific problems you encounter and show us what you have tried (creating two tables is a bit meagre).

    And one more thing: configuring security, even with Spring, is NOT dirt simple. You have to learn about the implications of decisions you make regarding password hashing & salting, password recovery schemes and remember-me functionality to name a few common pitfalls. Also the choice of which pages/paths to secure (intercept-urls) has to be made wisely. This depends on the type of application and the context in which it runs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to Spring Security. How do I add an event listener which will
I am relatively new to the Spring Framework and Spring security. I have used
I am using the new Spring Security 3.1 and have a few questions to
I am new to Spring MVC. But I had certain experience in working with
I'm brand spanking new at Spring and have gotten a majority of the knowledge
Almost every new Java-web-project is using a modern MVC-framework such as Struts or Spring
I've just taken a look at the new features available in the MVC 3
Need some guidance. I have java webstart app and I want it to connect
I want to get a service to respond with just JSON. I have written
I´m new in spring-mvc. So, i´m trying to use RESTFull urls ( i think

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.