Note that there are some explanatory texts on larger screens.

plurals
  1. PORegistration form using spring framework
    primarykey
    data
    text
    <p>I am trying to create registration page using spring,Hibernate and Mysql. I can successfully register user information (Save user data using Controller, Services,Dao and Domain classes). I want to retrive that user using email and password which he/she entered while registration. How do i have to write query in spring-security.xml to get username and password.</p> <pre><code>&lt;beans:beans xmlns="http://www.springframework.org/schema/security" xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.3.xsd"&gt; &lt;http auto-config="true"&gt; &lt;intercept-url pattern="/welcome*" access="ROLE_USER" /&gt; &lt;form-login login-page="/login" default-target-url="/welcome" authentication-failure-url="/loginfailed" /&gt; &lt;logout logout-success-url="/logout" /&gt; &lt;/http&gt; &lt;authentication-manager&gt; &lt;authentication-provider&gt; &lt;user-service&gt; &lt;user name="testuser" password="testuser" authorities="ROLE_USER" /&gt; &lt;/user-service&gt; &lt;/authentication-provider&gt; &lt;/authentication-manager&gt; &lt;/beans:beans&gt; @Entity @Table(name = "USER_DETAILS") public class User { @Id @GeneratedValue @Column (name = "USER_ID") private int id; @Column (name = "EMAIL") private String email; @Column (name = "PASSWORD") private String password; @Column (name = "FIRST_NAME") private String firstName; @Column (name = "LAST_NAME") private String lastname; @Column (name = "ADDRESS") private String address; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastname() { return lastname; } public void setLastname(String lastname) { this.lastname = lastname; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload