0

I'm really new with Spring mvc, security and hibernate. So I just a have a few questions.

I'm using a mysql database and would like to create a log-in page. While reading stuff online, it says that I would need some authorities fields. Is that required?

For now, I have the following:

HibernateUtil.java
UserInfoHelper.java - this implements query methods
Userinfo.hbm.xml
Userinfo.java - contains all the fields from my userinfo table
UserinfoId.java = contains id related fields from my userinfo table

.

Basically, the files above except the UserInfoHelper was generated by a hibernate tool on netbeans.

For my applicationContext.xml I got:

<bean id="propertyConfigurer"
          class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
          p:location="/WEB-INF/jdbc.properties" />

          <bean id="dataSource"
          class="org.springframework.jdbc.datasource.DriverManagerDataSource"
          p:driverClassName="${jdbc.driverClassName}"
          p:url="${jdbc.url}"
          p:username="${jdbc.username}"
          p:password="${jdbc.password}" />

How do I start creating spring security, mvc with database authentication?

Thank you!

1

1 Answer 1

0

example for spring security with JDBC.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you! Is it necessary for me to have the user_roles table? Or what if I dont want to use that feature?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.