Spring AOP – AspectJ Annotation Example

In my previous tutorial I have shown how to write Spring AOP using XML configuration and in this tutorial I am going to show you how to write Annotation based Spring AOP using @AspectJ. This example creates annotation examples with @Aspect, @Pointcut, @Before, @After, @Around, @AfterReturning, @AfterThrowing Advice. @AspectJ is a style to declare aspects in a Java class using…

Spring Security Remember Me – Persistent Token Approach

Spring Security Remember Me with Persistent Token This tutorial will show you how to remember your credentials for a specific time period for auto-login without providing any login credentials into the login form. Remember-me or persistent-login authentication refers to web sites being able to remember the identity of a principal between sessions. This is typically accomplished by sending a cookie…

Spring Security Form Based Login – Remember Me

Spring Security Remember Me This tutorial will show you how to remember your credentials for a specific time period for auto-login without providing any login credentials (next time onward when a user tries to login) in the login form. Remember-me or persistent-login authentication refers to web sites being able to remember the identity of a principal between sessions. This is…

Spring Security – JDBC Authentication Using UserDetailsService

Spring Authentication – UserDetailsService In my previous tutorials, I have shown few authentications mechanisms, such as, Spring Security Form based Authentication – XML Configuration , Spring Security Form based Authentication – Annotations , Spring Security – JDBC Authentication but in this tutorial I will show you how to authenticate users using Spring JDBC UserDetailsService and Spring MVC web application to secure pages….

Spring Security – JDBC Authentication

Spring JDBC Authentication In my previous tutorials, I have shown in-memory authentications Spring Security Form based Authentication – XML Configuration , Spring Security Form based Authentication – Annotations but in this tutorial I will show you how to authenticate user using Spring JDBC and Spring MVC web application to secure pages. I will create spring mvc based web application and I…

Spring Security Form Based Authentication – Annotations

Form Based Authentication In my previous tutorial, I have shown Spring Security Form based Authentication – XML Configuration but in this tutorial I will show you annotations based configurations Spring Security with Spring MVC web application to secure pages. I will create spring mvc based web application and I will configure Spring Security to protect a page from outside access. Spring…

Spring Security Form based Authentication – XML Configuration

In this tutorial I will show you the way to configure Spring Security with Spring MVC web application to secure pages. I will create spring mvc based web application and I will configure Spring Security to protect a page from outside access. You may also like annotation based example Spring Security Form based Authentication – Annotations Spring Security allows to you…

Spring MVC Bean Validator

In this example, I will show you how to build a bean validator for User model object.In my previous example, Spring MVC Custom Validator, I have shown how to validate user input. Validating input received from the user to maintain data integrity is an important part of application logic. The Bean Validation model is supported by constraints in the form of…

Spring MVC Custom Validator

Introduction In this example, I will show you how to build a custom validation (validator) for User model object. This validator is custom implementation of Validator interface. Spring MVC supports validation by means of a validator object that implements the Validator interface. I will write the below validator code in this example to check if the required form fields are…

Fail Fast vs Fail Safe in Java

A system is called fail-fast if it stops immediately its execution when an error occurred. The system does not continue with the errors and these errors in the fail fast systems are immediately exposed. But, fail-safe system does the opposite thing. The fail-safe system does not stop its execution despite an error or a fault is occurred in the system….