diff --git a/spring-security-login-error-handling/src/main/java/org/baeldung/persistence/model/Role.java b/spring-security-login-error-handling/src/main/java/org/baeldung/persistence/model/Role.java
index 7fcfce196a..bb4b86e32f 100644
--- a/spring-security-login-error-handling/src/main/java/org/baeldung/persistence/model/Role.java
+++ b/spring-security-login-error-handling/src/main/java/org/baeldung/persistence/model/Role.java
@@ -66,4 +66,33 @@ public class Role {
public void setRole(Integer role) {
this.role = role;
}
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((role == null) ? 0 : role.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ final Role role = (Role) obj;
+ if (!role.equals(role.role))
+ return false;
+ return true;
+ }
+
+ @Override
+ public String toString() {
+ final StringBuilder builder = new StringBuilder();
+ builder.append("Role [role=").append(role).append("]").append("[id=").append(id).append("]");
+ return builder.toString();
+ }
}
\ No newline at end of file
diff --git a/spring-security-login-error-handling/src/main/resources/application.properties b/spring-security-login-error-handling/src/main/resources/application.properties
index 425018eea6..bcff123738 100644
--- a/spring-security-login-error-handling/src/main/resources/application.properties
+++ b/spring-security-login-error-handling/src/main/resources/application.properties
@@ -1,11 +1,10 @@
################### DataSource Configuration ##########################
jdbc.driverClassName=com.mysql.jdbc.Driver
-jdbc.url=jdbc:mysql://localhost:3306/spring_hibernate4_02?createDatabaseIfNotExist=true
+jdbc.url=jdbc:mysql://localhost:3306/AUTHDATA
jdbc.user=tutorialuser
jdbc.pass=tutorialmy5ql
init-db=false
################### Hibernate Configuration ##########################
hibernate.dialect=org.hibernate.dialect.MySQLDialect
-hibernate.show_sql=false
-hibernate.hbm2ddl.auto=create-drop
-
+hibernate.show_sql=true
+hibernate.hbm2ddl.auto=validate
\ No newline at end of file
diff --git a/spring-security-login-error-handling/src/main/webapp/WEB-INF/view/admin.jsp b/spring-security-login-error-handling/src/main/webapp/WEB-INF/view/admin.jsp
index 923971cb08..3b88dbdb12 100644
--- a/spring-security-login-error-handling/src/main/webapp/WEB-INF/view/admin.jsp
+++ b/spring-security-login-error-handling/src/main/webapp/WEB-INF/view/admin.jsp
@@ -1,18 +1,16 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
-<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>
+<%@ taglib prefix="sec"
+ uri="http://www.springframework.org/security/tags"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
-