Spring Security

In this Spring Security tutorial, you will learn how to use the @PreAuthorize annotation to secure method invocation. You can use the @PreAuthorize annotation to secure either method in a Controller class or a method in a service layer class. There are other useful method level security annotations like the ones below. It is useful…

Read More Spring Security @PreAuthorize Annotation Example

In this Spring Security tutorial, you will learn how to enable and use the Method Level Security with @Secured annotation. There are other useful method level security annotations like the ones below. It is useful to know how they work as well. @PostAuthorize Security Annotation Example, @PreAuthorize Security Annotation Example. If you are interested in video…

Read More Spring Security @Secured Annotation Example

In this Spring Boot tutorial, you will learn how to get the details of the currently authenticated principal user. There is more than one way to get currently authenticated user details and in this blog post, I am going to share with you a few. Most likely you already have Spring Security configured for your…

Read More Spring Security. Get Authenticated Principal Details.

In this Spring Boot Security tutorial, you will learn how to enable Basic Authentication for your Spring Boot project and how to configure the default username, password and user role. You will also learn how to secure a web service request URL so that only authenticated user with a default username, password and role can access.…

Read More Spring Security Default Username, Password, Role

In this tutorial, I am going to share with you how to secure Spring Cloud Eureka dashboard with Spring Security. To learn how to build RESTful Microservices with Spring Cloud by watching step-by-step video lessons, please check this page: Spring Boot Microservices and Spring Cloud. Add Spring Security to Eureka To secure Eureka with Spring Security…

Read More Secure Eureka Dashboard with Spring Security

In this tutorial, I am going to share with you how to add H2 In-memory database support to your Spring Boot project which has Spring Security enabled. And at the end of this tutorial, you will find a video demonstration of how to do it. Once you do the below-described steps, your Spring Boot project…

Read More Add H2 Database to Spring Boot Project with Spring Security