spring-boot

Spring Security With JWT and Oauth2 With Spring Boot

Vikas Verma
Introduction In this article we will see example of how to secure a spring boot rest application with Spring Boot2, Spring Security, Oauth2, and JWT token. 1. Source Code Repository The code used in this article is available in this repository GitHub. 2. Dependencies 2.1. Versions Spring Boot: 2.1.3.RELEASE Java: 1.8 3. Entity Class We create two Entity Classes, one is User and another is Role. User entity class contains user details like name, password, roles details, and role entity contains the role details.

JPA EntityListner example with Spring Boot 1.5.1

Vikas Verma
Introduction To audit any transaction table you can use EntityListener Annotation of the JPA. JPA provide the EntityListener annotations that attach a listener class with the entity that you want to audit. What is audit table ? Audit Tables are used to track transactions against a particular table or tables. They allow you to see an ongoing “log” for future use. There may be users and/or applications that have access to insert, update, and delete out of that table.

Spring Boot Scheduling With Annotation

Vikas Verma
Introduction Spring Boot provides annotation support for task scheduling. It is easy way to develop and run a Task scheduler without using any xml and bean configurations Simply add the annotation @Scheduled on the task scheduler method with required interval time. In this example, we will see how to use Spring @Scheduledannotation to schedule a task. Enable scheduling annotations To enable support for @Scheduled annotation add @EnableScheduling to one of your @Configuration classes: