Spring Security 4 for Spring MVC using Spring Data JPA and Spring Boot

I have been writing a series of tutorials on using Spring Security 4 in Spring MVC application starting from the basic in-me...




I have been writing a series of tutorials on using Spring Security 4 in Spring MVC application starting from the basic in-memory authentication. In this post, I am writing a step by step guide to secure a Spring MVC application using Spring Security 4 along with Spring Data JPA and Spring Boot. That sounds like a lot of different concepts to learn, but it is really simple. 

If you do not know or if you are new to Spring Data JPA or even JPA (Java Persistence API), you might probably think why should you go for Spring Data JPA when you can simply use Spring JDBC to secure the application with the user details stored in a database. To understand this, read the next paragraph.

Java Persistence API (JPA) - Unlike writing a plain DAO that consists of plain JDBC code everywhere full of PreparedStatements and SqlConnections etc, we just map the original fields in the database table to Java classes called Entities, provide SQL queries and let the persistence api handle the connections, query execution etc without writing much boilerplate code. JPA is just a specification and to use it, you must use a provider of this Specification such as Hibernate. In other words, consider JPA as a set of interfaces and you need an implementation of these interfaces to actually use it, which is called a 'Provider'. Any provider or implementation of JPA specification, lets you create Java classes called Entities, provide SQL queries and handle the connections, query execution etc.

Spring Data JPA takes a step forward and handles the DAO layer around data repositories with out of the box query generation for most commonly required scenarios. It is not an implementation or a provider of JPA, but it sits on top of JPA and uses the provider of your choice, to generate queries and to do all that the JPA specification is meant to do. It provides a stronger design which is also easy for anyone to implement and you are not tied to any JPA provider. For instance if you are using Hibernate directly in your project, and if it has a bug, your development will halt. But if you use Spring Data JPA and use Hibernate as the provider for Spring Data JPA, you can switch anytime to any other provider like EclipseLink or ObjectDB etc with very minimal level of code change.

I am also going to use Spring Boot which takes care of,

-- Setting up and initializing Spring MVC (spring-boot-starter-web)
-- Setting up and initializing Spring Security (spring-boot-starter-security)
-- Setting up and initializing Spring Data JPA with Hibernate as provider (spring-boot-starter-data-jpa)

Note: Spring Boot Starter JPA uses Hibernate by default and it configures everything that is needed to use Spring Data JPA along with Hibernate. You only need to write your entity classes and data repositories. If you want to use any other provider other than Hibernate you should not use Spring Boot Starter JPA, instead include required jars in classpath and write configuration classes to let Spring Data JPA know which provider you are using.

Enough of theory now, lets do some real experiment.




1. Create user database and set up user and roles tables with some data. I am using mysql server.

use userbase;
DROP TABLE IF EXISTS user_roles;
DROP TABLE IF EXISTS users;
CREATE  TABLE users (
  userid int(11) NOT NULL AUTO_INCREMENT,
  username VARCHAR(45) NOT NULL,
  email VARCHAR(255) NOT NULL,
  password VARCHAR(60) NOT NULL ,
  enabled TINYINT NOT NULL DEFAULT 1 ,
  PRIMARY KEY (userid));
  
CREATE TABLE user_roles (
  user_role_id int(11) NOT NULL AUTO_INCREMENT,
  userid int(11) NOT NULL,
  role varchar(45) NOT NULL,
  PRIMARY KEY (user_role_id),
  UNIQUE KEY uni_userid_role (role,userid),
  KEY fk_user_idx (userid),
  CONSTRAINT fk_userid FOREIGN KEY (userid) REFERENCES users (userid));

INSERT INTO users(username,email,password,enabled)
VALUES ('priya','abc@abc.com','$2a$04$CO93CT2ObgMiSnMAWwoBkeFObJlMYi/wzzOnPlsTP44r7qVq0Jln2', true);
INSERT INTO users(username,email,password,enabled)
VALUES ('naveen','def@def.com','$2a$04$j3JpPUp6CTAe.kMWmdRNC.Wie58xDNPfcYz0DBJxWkucJ6ekJuiJm', true);

INSERT INTO user_roles (userid, role)
VALUES (001, 'ROLE_USER');
INSERT INTO user_roles (userid, role)
VALUES (002, 'ROLE_ADMIN');
INSERT INTO user_roles (userid, role)
VALUES (002, 'ROLE_USER');

2. Next create a maven project and replace the 'pom.xml' file with the below code.

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.programmingfree</groupId>
    <artifactId>SpringSecuritySpringDataJpaApp</artifactId>
    <version>0.1.0</version>
 <packaging>war</packaging>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.2.2.RELEASE</version>
    </parent>

    <dependencies>
        <dependency>
      <groupId>org.apache.tomcat.embed</groupId>
      <artifactId>tomcat-embed-jasper</artifactId>
      <scope>provided</scope>
  </dependency>
  <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>jstl</artifactId>
  </dependency>
  <!-- tag::web[] -->
  <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
  <!-- end::web[] -->
  <!-- tag:: Spring Data JPA -->
   <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <!-- end:: Spring Data JPA -->
        <!-- tag::security[] -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
        <!-- end::security[] -->       

        <!-- MySQL -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
        </dependency>
    </dependencies>


    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>

We have included all dependencies that is required to set up Spring Security using Spring Data JPA, in the pom.xml.

3. Create application.properties file at the same location as that of the pom.xml file.

application.properties

# Replace with your connection string
spring.datasource.driverClassName=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/userbase
spring.datasource.username=root
spring.datasource.password=root
spring.jpa.database-platform = org.hibernate.dialect.MySQL5Dialect
spring.jpa.show-sql = true

# Hibernate
spring.jpa.hibernate.ddl-auto=update

4. Create entity and repository classes.

User.java

package domain;

import java.io.Serializable;
import javax.persistence.*;

@Entity
@Table(name = "users")
public class User implements Serializable {

 private static final long serialVersionUID = 1L;
 
 @Id
    @GeneratedValue(strategy = GenerationType.AUTO)    
    @Column(name="userid")
    private Long userId;

 @Column(name = "username")
    private String userName;   

 @Column(name = "password")
    private String password;   

 @Column(name = "email")
    private String email;
    
 @Column(name ="enabled")
 private int enabled;
 
 public User(){
  
 }
 
 public User(User user) {
         this.userId = user.userId;
         this.userName = user.userName;
         this.email = user.email;       
         this.password = user.password;
         this.enabled=user.enabled;        
 }
 
 public int getEnabled() {
  return enabled;
 }

 public void setEnabled(int enabled) {
  this.enabled = enabled;
 } 

 public Long getUserid() {
  return userId;
 }

 public void setUserid(Long userid) {
  this.userId = userid;
 }
 
 public String getPassword() {
  return password;
 }

 public void setPassword(String password) {
  this.password = password;
 }
 
 public String getEmail() {
  return email;
 }

 public void setEmail(String email) {
  this.email = email;
 }

 public String getUserName() {
  return userName;
 }

 public void setUserName(String userName) {
  this.userName = userName;
 }
}

UserRole.java

package domain;

import javax.persistence.*;

@Entity
@Table(name="user_roles")
public class UserRole {
 
 @Id
    @GeneratedValue(strategy = GenerationType.AUTO)    
    @Column(name="user_role_id")
 private Long userroleid;
 
 @Column(name="userid")
 private Long userid;
 
 @Column(name="role")
 private String role; 

 public String getRole() {
  return role;
 }

 public void setRole(String role) {
  this.role = role;
 }

 public Long getUserid() {
  return userid;
 }

 public void setUserid(Long userid) {
  this.userid = userid;
 }

 public Long getUserroleid() {
  return userroleid;
 }

 public void setUserroleid(Long userroleid) {
  this.userroleid = userroleid;
 } 
 
}

User class is annotated with @Entity, indicating that it is a JPA entity. We also have @Table annotation, with the table name to which this entity will be mapped to. In case the table name and the name of entity class is the same you can omit @Table annotation.

User class has five attributes, the id, the username, the password, the email and the enabled.

The userid property is annotated with @Id so that JPA will recognize it as the object’s ID. The id property is also annotated with @GeneratedValue to indicate that the ID should be generated automatically.

You can see the properties are annotated with @Column annotation. This is not required if the columnname in the table is the same as that of the property name in this class.

We also have two constructors. The default constructor only exists for the sake of JPA. You won’t use it directly. The other constructor is the one you’ll use to create instances of User to be used by spring security to authenticate.

We also have another entity class for user_roles table.

Spring security requires data from users and user_roles table to authenticate and authorize an user. So we need classes that retrieves data from these two tables and this is done by defining repositories in Spring Data JPA. In our application, we need two repository interfaces defined, the UserRepository and the UserRolesRepository. Spring Data JPA has the ability to create repository implementations automatically, at runtime, from a repository interface. Traditionally we used to write DAO classes with sql connections queries etc, but here everything is done by Spring Data JPA.

UserRepository.java

package domain;

import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface UserRepository extends CrudRepository<User, Long> {
    public User findByUserName(String username);
    
}

UserRolesRepository.java

package domain;
import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface UserRolesRepository extends CrudRepository<UserRole, Long> {
 
    @Query("select a.role from UserRole a, User b where b.userName=?1 and a.userid=b.userId")
    public List<String> findRoleByUserName(String username);
 
}

We have defined an UserRepository interface that extends the CrudRepository interface. The type of entity and ID that it works with,User and Long, are specified in the generic parameters on CrudRepository. By extending CrudRepository, UserRepository inherits several methods for working with User persistence, including methods for saving, deleting, and finding User entities.

Spring Data JPA also allows you to define other query methods by simply declaring their method signature. In the case of UserRepository, we have defined findByUserName() method, which takes username as a parameter and returns all the matching rows based on the username parameter. You dont even have to write an implementation of this method, but just with this definition,Spring Data JPA creates an implementation on the fly when you run the application.

In case there is a requirement to write our own queries we can do that too. In this application we have used userid as foreign key for the roles table. So in UserRolesRepository I have written my own query on the findRoleByUserName method just by adding @Query annotation to this method. Please note that the query is written using JPA Query Language with the entity names for tables and property names for column names. There are several other ways to write custom queries, you can learn about it later from spring documentation if you are interested.

4. Now that we are done with repositories, next step is to create classes required for spring security to use the data returned by the user repositories to authenticate users. Spring Security looks for an implementation of UserDetailsService interface that loads user specific data. So we have to write a class that implements UserDetailsService, and override the one method that this interface has, loadbyusername.

CustomUserDetailsService.java

package security;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.stereotype.Service;

import domain.User;
import domain.UserRepository;
import domain.UserRolesRepository;

@Service("customUserDetailsService")
public class CustomUserDetailsService implements UserDetailsService{
 private final UserRepository userRepository;
 private final UserRolesRepository userRolesRepository;
 
 @Autowired
    public CustomUserDetailsService(UserRepository userRepository,UserRolesRepository userRolesRepository) {
        this.userRepository = userRepository;
        this.userRolesRepository=userRolesRepository;
    }
 
        
 @Override
 public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
  User user=userRepository.findByUserName(username);
  if(null == user){
   throw new UsernameNotFoundException("No user present with username: "+username);
  }else{
   List<String> userRoles=userRolesRepository.findRoleByUserName(username);
   return new CustomUserDetails(user,userRoles);
  }
 }
  
}

CustomUserDetailsService class that implements UserDetailsService overrides loadUserByUsername method. This method uses userRepository.findByUserName method to get the User details specific to the provided username. We also use the  userrolesrepository to get a list of roles associated with the user.

Now there is one more thing to learn here. We may have lot of information inside our user table that we may need to access in our application. But Spring security does not require all the information that are in the user table but only a few properties to perform authentication and authorization. So in order to return only the required details to spring security, we write a class that implements UserDetail interface.

CustomUserDetails.java

package security;

import java.util.Collection;
import java.util.List;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.util.StringUtils;
import domain.User;

public class CustomUserDetails extends domain.User implements UserDetails { 
 
 private static final long serialVersionUID = 1L;
 private List<String> userRoles;
 

 public CustomUserDetails(User user,List<String> userRoles){
  super(user);
  this.userRoles=userRoles;
 }
 
 
 @Override
 public Collection<? extends GrantedAuthority> getAuthorities() {
  
  String roles=StringUtils.collectionToCommaDelimitedString(userRoles);   
  return AuthorityUtils.commaSeparatedStringToAuthorityList(roles);
 }

 @Override
 public boolean isAccountNonExpired() {  
  return true;
 }
 @Override
 public boolean isAccountNonLocked() {
  return true;
 }
 
 @Override
 public boolean isCredentialsNonExpired() {
  return true;
 }
 @Override
 public boolean isEnabled() {
  return true;
 }


 @Override
 public String getUsername() {
  return super.getUserName();
 }


}

UserDetail interface provides the core user information. CustomUserDetails class that implements UserDetails interface, has methods to return a set of authorities, username , password and few other methods. It already extends the User, so it is a User and it also have some extra methods that the Spring security requires.

5. Create the front end application to display user information and to facilitate login. Create the following JSP files under webapp/WEB-INF-jsp folder.

home.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
 pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<title>Spring Security Example - ProgrammingFree</title>
</head>
<body>
  <h1>Welcome!</h1>  
  Click <a href="<spring:url value='/hello' />">here</a> to see a
  greeting   
</body>
</html>

hello.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
 pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<title>Greeting Page - ProgrammingFree</title>
</head>
<body> 
 <h1>
  Hello <b><c:out value="${pageContext.request.remoteUser}"></c:out></b>
 </h1>
 <form action="/logout" method="post">
  <input type="submit" class="button red big" value="Sign Out" /> <input
   type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />
 </form> 
</body>
</html>

login.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
 pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<title>Login Page - ProgrammingFree</title>
</head>
<body> 
 <form action="/login" method="post">  
  <div>
   <input type="text" name="username"
    placeholder="User Name" />
  </div>
  <div>
   <input type="password" name="password"
    placeholder="Password" />
  </div>
  <div>
   <input type="submit" value="Sign In" class="button red small" />
  </div>
  <c:if test="${param.error ne null}">
   <div class="alert-danger">Invalid username and password.</div>
  </c:if>
  <c:if test="${param.logout ne null}">
   <div class="alert-normal">You have been logged out.</div>
  </c:if>  
  <input type="hidden" name="${_csrf.parameterName}"
   value="${_csrf.token}" />
 </form>

</body>
</html>

403.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
 pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<title>Access Denied Page - ProgrammingFree</title>
</head>
<body>   
 <div class="alert-danger">
  <h3>You do not have permission to access this page!</h3> 
 </div>
 <form action="/logout" method="post">
  <input type="submit" class="button red big" value="Sign in as different user" /> <input
   type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />
 </form>   
</body>
</html>

The idea is to have an unprotected welcome page (home.jsp) that presents a link to the greeting page (hello.jsp) that is protected by spring security. Once the user clicks on the link in the welcome page, he/she will be redirected to login page and once authenticated, the greeting page will be presented to the user. To demonstrate authorization, we will add security configuration to display greeting page for users with ADMIN role only.

5. Final step is to write all required configuration classes including the security configuration class.

WebSecurityConfig.java

package config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.config.annotation.web.servlet.configuration.EnableWebMvcSecurity;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

import security.CustomUserDetailsService;

@Configuration
@EnableWebMvcSecurity
@ComponentScan(basePackageClasses = CustomUserDetailsService.class)
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {

 @Autowired 
 private UserDetailsService userDetailsService;
 
 @Autowired
 public void configAuthentication(AuthenticationManagerBuilder auth) throws Exception {    
  auth.userDetailsService(userDetailsService).passwordEncoder(passwordencoder());
 } 
 

 
 @Override
 protected void configure(HttpSecurity http) throws Exception {
   http.authorizeRequests()
  .antMatchers("/hello").access("hasRole('ROLE_ADMIN')")
  .anyRequest().permitAll()
  .and()
    .formLogin().loginPage("/login")
    .usernameParameter("username").passwordParameter("password")
  .and()
    .logout().logoutSuccessUrl("/login?logout") 
   .and()
   .exceptionHandling().accessDeniedPage("/403")
  .and()
    .csrf();
 }
 
 @Bean(name="passwordEncoder")
    public PasswordEncoder passwordencoder(){
     return new BCryptPasswordEncoder();
    }
}


We have set up our custom UserDetailsService class already and now we have passed it to the AuthenticationManagerBuilder in the web security configuration. HttpSecurity is configured to define the pages to be authenticated and authorized, specify the login page name, specify access denied page etc. For anyone who tries to access the /hello will be redirected to login page and those users with ADMIN role is only presented with the page.

I have created a password encoder bean that uses Spring's BCryptPasswordEncoder. In the database I have stored bcrypt encoded passwords and not plain texts, so this password encoder tells spring security to decrypt the password based on bcrypt algorithm and then process it. If you notice, I have placed hidden inputs to set csrf tokens in all the protected JSP files. This is one way of implementing CSRF protection in Spring Security. You can read about other ways of implementing it here.

MvcConfig.java

package config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import org.springframework.web.servlet.view.InternalResourceViewResolver;

@Configuration
public class MvcConfig extends WebMvcConfigurerAdapter{

    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/home").setViewName("home");
        registry.addViewController("/").setViewName("home");
        registry.addViewController("/hello").setViewName("hello");
        registry.addViewController("/login").setViewName("login");
        registry.addViewController("/403").setViewName("403");
    }    
    
    @Bean
 public InternalResourceViewResolver viewResolver() {
  InternalResourceViewResolver resolver = new InternalResourceViewResolver();
  resolver.setPrefix("/WEB-INF/jsp/");
  resolver.setSuffix(".jsp");
  return resolver;
 }    
}


The web application is based on Spring MVC. To expose the JSP pages, we need to set up view controllers. This is done by overriding the addviewcontrollers method in the WebMvcConfigurerAdapter class.

Application.java

package config;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.orm.jpa.EntityScan;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;

@SpringBootApplication
@EnableJpaRepositories(basePackages = "domain")
@EntityScan(basePackages = "domain")
public class Application {

    public static void main(String[] args) throws Throwable {
        SpringApplication.run(Application.class, args);
    }

Finally, we have the Application class to launch this application. All the annotations used on top of the class declaration are essential for Spring to identify all JPA related and security related configuration.

That is all on the implementation side. When the user tries access a protected page,

-- Login page is presented with a form that captures username and password and posts it to "/login"
-- As configured, Spring Security provides a filter that intercepts that request ("/login")and authenticates the user.
-- If the user fails to authenticate, the page is redirected to "/login?error" and we display the appropriate error message in the login form
-- Upon successfully signing out, our application is sent to "/login?logout" and the page displays the appropriate success message.

To run the application, download it from above link, import it as Maven Project in eclipse
and run as -> Maven Build -> Goals -> clean install spring-boot:run


Make sure you setup mysql database for user details as explained above and make necessary property changes in the application.properties file to match with your database settings.








Keep yourself subscribed for getting programmingfree articles delivered directly to your inbox once in a month. Thanks for reading!


Subscribe to GET LATEST ARTICLES!


Related

Trending 2597672379557997206

Post a Comment

  1. How can some one write such a beautiful and easy to understand tutorial on spring security :)

    Appreciated your efforts.

    Thanks

    ReplyDelete
    Replies
    1. Takes time and effort but possible :)

      Delete
    2. Hi,
      For Spring security user registration please look at this nice article at below url
      https://raichand-java.blogspot.in/2017/06/springsecurity4primefaces5springdatajpa.html

      Delete
  2. How can some one write such a beautiful and easy to understand tutorial on spring security :)

    Appreciated your efforts.

    Thanks

    ReplyDelete
  3. Hi, how can I add the registration to this example? Can you please make a mini guide for this?

    ReplyDelete
  4. This tutorial is tremendously helpful, thank you for your effort.

    ReplyDelete
  5. Best tutorial i have ever seen for spring security with spring boot.
    Kudos to the developer. Great work.! "CHEERS"

    ReplyDelete
  6. what's the password for users: priya and naveen

    ReplyDelete
  7. Its: priya/priya & naveen/naveen

    ReplyDelete
  8. Extremely useful guide. Thanks a lot, the best I've found about sprint security

    ReplyDelete
  9. Hi Priya
    I am importing your code using IntelliJ, but im running some errors. Seating with this problem for almost a week. Please advised what am i missing here?

    ReplyDelete
  10. how to automatically go to hello page after sucessfull login?

    ReplyDelete
  11. Please make a video for registration
    Thank you

    ReplyDelete
  12. Please provide tutorial for jsf with spring security.

    ReplyDelete
  13. I'm confused, how would I make a new user when the user constructor already needs a user to be put in?
    It seems like all it does is copying an existing user.

    ReplyDelete
  14. This comment has been removed by the author.

    ReplyDelete
  15. This comment has been removed by the author.

    ReplyDelete
  16. Just a clarification,

    Is WebSecurityConfig, in you sample, is the equivalent of...

    <security:intercept-url pattern="{PATTERN}" access="{ACCESS}" />

    ?

    I have seen requests and access in the configure() method.
    I asked since I have so many intercept-url patterns, and adding them all to the configure() method would seem to be messy.

    Thanks! Very informative and direct tutorial.

    ReplyDelete
  17. Exactly what I was looking for, congratulations!

    ReplyDelete
  18. This comment has been removed by the author.

    ReplyDelete
  19. Exactly what I was looking for, THANX
    I have in frontend an angular 2 app how i can integrate this with the frontend

    ReplyDelete
  20. This comment has been removed by the author.

    ReplyDelete

  21. Nice blog..! I really loved reading through this article. Thanks for sharing such a
    amazing post with us and keep blogging... iot training in chennai | iot training in chennai quora | iot training and placement in chennai | iot training center in chennai | best iot training centre in chennai

    ReplyDelete
  22. I love the way you write the article with interest and passion.most people really need this kind of explanation

    ReplyDelete
  23. Great post! I am actually getting ready to across this information, It’s very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.
    Selenium Training in Chennai

    ReplyDelete
  24. I have recently visited your blog profile. I am totally impressed by your blogging skills and knowledge.

    SAP SD Online Training

    SAP SD Classes Online

    SAP SD Training Online

    Online SAP SD Course

    SAP SD Course Online

    ReplyDelete

  25. I have been searching for a useful post like this on salesforce course details, it is highly helpful for me and I have a great experience with this Salesforce Training who are providing certification and job assistance. Salesforce training Gurgaon

    ReplyDelete
  26. Thanks for sharing an informative blog keep rocking bring more details.I like the helpful info you provide in your articles. I’ll bookmark your weblog and check again here regularly. Pretty article! I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing.

    Java training in Chennai

    Java Online training in Chennai

    Java Course in Chennai

    Best JAVA Training Institutes in Chennai

    Java training in Bangalore

    Java training in Hyderabad

    Java Training in Coimbatore

    Java Training

    Java Online Training

    ReplyDelete
  27. I just loved your article on the beginners guide to starting a blog.If somebody take this blog article seriously in their life, he/she can earn his living by doing blogging.thank you for thizs article.
    hadoop training in chennai

    hadoop training in velachery

    salesforce training in chennai

    salesforce training in velachery

    c and c plus plus course in chennai

    c and c plus plus course in velachery

    machine learning training in chennai

    machine learning training in velachery

    ReplyDelete
  28. This is excellent information. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...

    AWS training in Chennai

    AWS Online Training in Chennai

    AWS training in Bangalore

    AWS training in Hyderabad

    AWS training in Coimbatore

    AWS training

    ReplyDelete
  29. Quite Interesting post!!! Thanks for posting such a useful post. I wish to read your upcoming post to enhance my skill set, keep blogging.I am reading your post from the beginning, it was so interesting to read & I feel thanks to you for posting such a good blog, keep updates regularly.
    Artificial Intelligence Training in Chennai

    Ai Training in Chennai

    Artificial Intelligence training in Bangalore

    Ai Training in Bangalore

    Artificial Intelligence Training in Hyderabad | Certification | ai training in hyderabad

    Artificial Intelligence Online Training

    Ai Online Training

    Blue Prism Training in Chennai

    ReplyDelete
  30. This information is impressive..I am inspired with your post writing style & how continuously you describe this topic.

    best apache spark online course

    ReplyDelete
  31. I like this and its helpful for me and i appreciate your work. Thanks for sharing most valuable information. Rajasthan Budget Tours

    ReplyDelete
  32. The benefits of this are that the application is up-to-date whenever an administrator or reporter interrogates its data. The downside is the overhead for each call made to the application. The number of calls made through the APEX API, though they can be estimated, cannot be predicted, since they occur as events occur. Salesforce training in Chennai

    ReplyDelete
  33. Hi,

    Thank for sharing good post on your blog keep it up and share more.
    Home Network Security

    ReplyDelete
  34. Hi,

    Thank for sharing such a nice post on your blog keep it up and share more.

    Free Crack Software Download

    ReplyDelete
  35. What Makes Python a Preferred Choice Among Programmers data science course in india

    ReplyDelete
  36. Great post for passionate programmers.

    Anderson

    ReplyDelete
  37. OK, thank you for this. I like what you plot here and wish you most extraordinary point karma with this blog! If you have trouble with your printer device, you can contact me. The best services and assistance have been assured. Website: Hp Printer Error 0x61011bed

    ReplyDelete
  38. Nice to be visiting your blog again, it has been months for me. Well this article that i've been waited for so long.Canon Printer Printing Blank Pages

    ReplyDelete
  39. Compare Online coursework writing services to draw every person’s interest, Establish and clarify the exact arrangement or possessions of all homework. Insert articles linked to people. Grab the difficulties that come up in just how chosen subject. Illustrate how issues may be at the homework and offer a remedy to overcome all those issues. Find connections between those writers. Asses sing your own idea. All Assignment Help composing writing can possibly be an effective means to generate a fantastic mission.

    ReplyDelete
  40. Great post i must say and thanks for the information. Education is definitely a sticky subject. However, is still among the leading topics of our time. I appreciate your post and look forward to more. pareto chart

    ReplyDelete
  41. Fantastic blog i have never ever read this type of amazing information. Roy Batty Coat

    ReplyDelete
  42. This comment has been removed by the author.

    ReplyDelete
  43. I am reading your post from the beginning, it was so interesting to read & I feel thanks to you for posting such a good blog, keep updates regularly.I want to share about
    data scientist online course

    ReplyDelete
  44. Cool stuff you have and you keep overhaul every one of us
    data scientist online course

    ReplyDelete
  45. I want to say thanks to you. I have bookmark your site for future updates.
    best data science institute in hyderabad

    ReplyDelete
  46. Awesome content. Thanks for sharing.

    Trading for beginners

    ReplyDelete
  47. Well framed and informative article. Thanks for sharing such blogs.

    Data Science Training in Pune

    ReplyDelete
  48. Fantastic article; inspiring and well-communicated! I truly enjoyed the read.
    AWS Training in Hyderabad
    AWS Course in Hyderabad

    ReplyDelete
  49. I discovered your blog while looking for the updates, I am glad to be here. Exceptionally helpful substance and furthermore effectively reasonable giving.. Trust me I did composed a post about instructional exercises for amateurs with reference of your blog…

    AWS Training in Hyderabad

    ReplyDelete
  50. Data science Training in Hyderabad
    Thanks for the info. It’s hard to come by well-informed people in this particular topic. The context has been explained very clearly & it’s really helpful

    ReplyDelete
  51. Great post, Thank you for sharing this amazing post, I really appreciate your work You may want to check out hanahaki disease cause

    ReplyDelete
  52. Digital Marketing Company Houston providing eCommerce Website Solutions, WordPress & Magento Development, eCommerce Website Design & seo services company houston.

    ReplyDelete
  53. Nice Post , thank you so much for sharing the informative article share with us. whatsapp mod

    ReplyDelete
  54. For this powerful Water Jet Cutting Machine from ChinaYongTao Online in China.
    The Second thing to explore is Tile Cutting Machine from ChinaYongTao as well in bulk order.

    ReplyDelete
  55. We specialize in providing ecommerce business license, consultancy & services based company license and trading license services in Ajman Media City free zone. We also offer Freelance Visa ajman services company in Dubai.

    ReplyDelete
  56. Hi there, I found your blog via Google while searching for such kinda informative post and your post looks very interesting for me data science training in mysore

    ReplyDelete
  57. Take new contracts & fly in realistic weather conditions with real-time traffic & earn money to expand your aircraft fleet. Flight Simulator Buy new airplane, City Pilot Flight Games A bigger plane. Choose new flying routes, improve your skills & get a new pilot license. Airplane Pilot Games The more you fly in this airplane flight simulator, the more options to expand your airline fleet.

    ReplyDelete
  58. Chase My Cloud is the leading online vape shop in pakistan, providing uwell caliburn koko prime and other best vape flavours in Pakistan. Buy online vape from best vape shop in Pakistan.

    ReplyDelete
  59. we are a leading digital marketing agency chicago chicago provides ecomerce marketing, search engine optimiztion, magento development and ecommerce web design services in Chicago

    ReplyDelete
  60. Hi, Thanks for sharing wonderful stuff...

    PSD To HTML

    ReplyDelete
  61. Thank you for the good writeup. It in fact was a amusement
    account it. Look advanced to far added agreeable from you!
    By the way, how can we communicate? Kursus SEO Terbaik

    ReplyDelete
  62. I surely acquiring more difficulties from each surprisingly more little bit of it data analytics course in mysore

    ReplyDelete
  63. Thank a lot. You have done excellent job. I enjoyed your blog . Nice efforts data science training in surat

    ReplyDelete
  64. Informative content and knowledgeable blog. Keep posting more content on this. Thanks for sharing this blog with us.
    Data Science Course in Hyderabad

    ReplyDelete
  65. This series of Spring Security tutorial is based on new Spring Security 4, Spring framework version 4. Spring Security is a lightweight security framework that provides authentication and authorization support in order to Secure Spring-based applications.

    cheap essay writing in UK

    ReplyDelete
  66. Thank you for giving this amazing blog with programming code. Here is the best institute in Delhi that offers the best full stack developer training course in Delhi, Data Science course in Delhi, python training course in Delhi, etc.

    ReplyDelete
  67. Movavi Video Editor Activation Key 2022 Require to make a movie out of your documented pictures, do not want to invest time on movie improving. Movavi Video Editor Plus 2021 Crackeado

    ReplyDelete
  68. Kaspersky License Key also defend your browsers from sticked substance by remove them enduringly. Kaspersky Crack

    ReplyDelete
  69. A2N Academy, one of the top-tier IT Skill Development Institutes in Bangalore, offers the best Web Designing course. Our skilled trainers recruited by the academy offer quality-based Web Designing Courses. Steadily, we guide our students to get placed in prominent web design companies through our online web designing course.

    web designing course
    With a determined goal to nurture students for their skills and placement, we focus on developing web designing skills in students through our web designing course with a learning-by-doing approach and creating responsive websites from scratch for all platforms.

    ReplyDelete
  70. You made such an exciting piece to read, giving each issue enlightenment for us to benefit information. Thanks for sharing the such statistics with us to read this. This is the first time that i visit here. 안전공원

    ReplyDelete
  71. This was truly a welcoming post. Much appreciated! ted. in this way, I might want to thank you for the endeavors you have made in composing this article. 파워볼

    ReplyDelete
  72. might also i just say what a ra quick? I have heard there are a few mobile services on line, and now i realize which of those services is satisfactory at their task. I am glad my pals advised me approximately them. 토토사이트추천

    ReplyDelete
  73. might also i just say what a remedy to find a person that in reality is aware of what they’re speaking approximately over the internet. You genuinely realize a way to carry an problem to mild and make it important. More humans need to examine this and understand this aspect of the tale. I used to be amazed you aren’t extra popular because you without a doubt have the present. Your article were given me thinking about something. Who do we touch if we need anesthesia quick? I have heard there are a few mobile services on line, and now i realize which of those services is satisfactory at their task. I am glad my pals advised me approximately them. 코인카지노

    ReplyDelete
  74. I simply desired to offer you a brief heads up! Apart from that, high-quality web site! 토토커뮤니티

    ReplyDelete
  75. i recieve four emails with the precise same comment. There needs to be a way you can do away with me from that service? Thanks plenty! 메이저놀이터주소

    ReplyDelete
  76. the following time i examine a weblog, with a bit of luck it does no longer fail me simply as plenty as this particular one. I imply, i understand it changed into my desire to read, but i really believed you would have something helpful to mention. All i listen is a bunch of crying about something that you may fix if you weren’t too busy looking for attention. When i to start with commented i seem to have clicked on the -notify me whilst new remarks are brought- checkbox and from now on each time a comment is added i recieve 4 emails with the exact identical remark. Is there a manner you are able to put off me from that carrier? An impressive percentage! I’ve simply forwarded this onto a colleague who has been accomplishing a little homework in this. And he without a doubt ordered me dinner absolutely due to the fact i found it for him… lol. So permit me to reword this…. Thanks for the meal!! But yeah, thanx for spending time to talk about this topic right here for your site. 메리트카지노주소

    ReplyDelete
  77. you are so cool! I do It’s going to be finishing of mine day, however earlier than finishing i'm analyzing this splendid paragraph to increase my revel in. 토토검증

    ReplyDelete
  78. But the companies need skilled persons for their businesses, and the people are coming with less knowledge. That is why the demand for data scientists has increased in the industry.

    ReplyDelete
  79. "If you are also one of them and want to know what the companies demand from the data scientists to do in their organization, you have come to the right place.data science course in kolkata"

    ReplyDelete
  80. Well, I really appreciated for your great work. This topic submitted by you is helpful and keep sharing...
    Separation Before Divorce
    Cost of Legal Separation VS Divorce

    ReplyDelete
  81. I appreciate your blog, from this session i got good knowledge. I admire your effort in writing valuable blogs. Thanks
    conducción temeraria de virginia
    divorce lawyers in virginia
    abogados de divorcio en virginia

    ReplyDelete
  82. One of the first benefits is that it is easy to get software that is free.
    mIRC

    ReplyDelete
  83. Hi, I just want to say that this post is very awesome and very well writen Thanks for sharing this with us.
    Machine learning training institute

    ReplyDelete
  84. It’s a great pleasure reading your post. It’s full of information I am looking for and I love to post a comment that “ the content of your post is awesome” great work. spring security data provides a secure and protected data i'm impress this article very informative. if anybody need this huge discount offer so you can grab this blackfriday discount

    ReplyDelete
  85. Amazing Post...!!!!Thanks for sharing wonderful post...
    Data science classes in Pune

    ReplyDelete
  86. Thanks For sharing this Valuable Information.Do follow https://www.fjackets.com For more information

    ReplyDelete
  87. Very wonderful informative article. I appreciated looking at your article

    ReplyDelete
  88. Thanks for posting this! It is almost exactly what I was looking for. Keep the great content coming!

    ReplyDelete
  89. 360Digitmg is a training institute that offers data science courses in various cities, including Jaipur. Their data science course in Jaipur is designed to provide in-depth knowledge of data science concepts, tools, and techniques. The course covers topics such as data exploration and visualization, statistical analysis, machine learning, and deep learning.data science course institute in jaipur

    ReplyDelete
  90. Thanks for providing knowledgeable information.

    peptide therapy

    ReplyDelete
  91. I really like your posts, I usually prefer to peruse quality material that has accurate data on the topic. thanks for sharing.
    theta-chamber

    ReplyDelete
  92. What a comprehensive and insightful exploration of twin gear pumps in Qatar's industrial scene! This blog truly highlights how innovation in pumping technology, like twin gear pumps, plays a pivotal role in advancing various sectors.
    indiantradebird.
    website: https://www.indiantradebird.com/product/magnetic-separators

    ReplyDelete
  93. Looking for the best ice cream franchise in India? Look no further than 51 Rainbow Ice Cream! With a wide range of delicious flavors and a proven business model, this franchise opportunity is a sweet deal.

    ReplyDelete
  94. Want to get to latest updates and tip related to technology,
    well look no further, please visit out website for all
    the news and packages https://maksoninnovations.com/

    ReplyDelete
  95. Certainly! However, I'll need more specific information about the blog you'd like to comment on. Please provide the title or topic of the blog, and I can help you craft a relevant and engaging comment.
    msradix.

    ReplyDelete
  96. I like it very much. I appreciate you. And you upload more interesting and helpful blog for our self. And I prefer you to use shilajit product visit our website

    ReplyDelete
  97. Thank you for sharing valuable information. I like it. Visit www.cabsinhyderabad.in

    ReplyDelete
  98. Choose from a variety of genuine goods in our unique selection to get Pure Shilajit.

    ReplyDelete
  99. Searching for this. Awesome my work became easy.
    packers and movers mancherial

    ReplyDelete
  100. Thanks for the topic. Consume this awesome shilajit gold in liquid form.

    ReplyDelete
  101. Thank you for sharing this useful post. :-if you want to know about how to establish papar plate manufacturing business and earn lot of profit visit :-Paper Plate Making Machine

    ReplyDelete
  102. The blog was very enlightening, offering me a more profound comprehension that enhanced my appreciation for the topic. It boosted my confidence and exposed me to fresh viewpoints and thought processes that I considered extremely valuable.
    https://7xmpilipinas.com/winforlife88-casino/

    ReplyDelete

emo-but-icon

SUBSCRIBE


item