Author: Sergey Kargopolov

Software developer

Web: www.appsdeveloperblog.com

In this tutorial, you will learn about @SpringBootTest annotation. It is this annotation that you will use to write Integration Tests for your Spring Boot application. @SpringBootTest annotation is used to create a Spring Application Context that will be used during the test. It will make Spring Framework start scanning classes of your application looking…

Read More @SpringBootTest Annotation Example

In this blog post, you will learn how to add user Roles and Authorities to a JWT token issued by the new Spring Authorization Server. When writing this tutorial, I assumed that you are familiar with the new Spring Configuration Server setup. Otherwise, please check the Spring Authorization Server tutorial first. Adding Granted Authorities to JWT To…

Read More Add Roles to JWT Issued by Spring Authorization Server

In this blog post you will learn the difference between @SpringBootTest and @WebMvcTest annotations. The main difference between @SpringBootTest and @WebMvcTest annotations is that @SpringBootTest annotation will start full application context. Whereas @WebMvcTest annotation will make Spring Framework create application context with a limited number of beans(only those related to Web Layer). You will use…

Read More Difference Between @SpringBootTest and @WebMvcTest

In this blog post, you will learn a couple of ways you can disable Spring Security Configuration for your @WebMvcTest. Disable Security Filters for @AutoConfigureMockMvc One of the ways you can disable Spring Security filters in your tests, is to use the @AutoConfigureMockMvc annotation. @AutoConfigureMockMvc annotation can be applied to a test class to enable…

Read More Disable Spring Security Configuration for @WebMvcTest