Home » Tag Archives: Spring Boot

Tag Archives: Spring Boot

Get Started with Spring Boot, SAML, and Okta

spring-interview-questions-answers

Build faster with Okta’s authentication and user management API. Register today for the free forever Developer Edition! Today I’d like to show you how build a Spring Boot application that leverages Okta’s Platform API for authentication via SAML. SAML (Security Assertion Markup Language) is an XML-based standard for securely exchanging authentication and authorization information between entities—specifically between identity providers, service ...

Read More »

Spring Boot Web Slice test – Sample

java-interview-questions-answers

Spring Boot introduced test slicing a while back and it has taken me some time to get my head around it and explore some of its nuances. Background The main reason to use this feature is to reduce the boilerplate. Consider a controller that looks like this, just for variety written using Kotlin. @RestController @RequestMapping("/users") class UserController( private val userRepository: UserRepository, private val ...

Read More »

Get Started with Spring Boot, OAuth 2.0, and Okta

spring-interview-questions-answers

Build faster with Okta’s authentication and user management API. Register today for the free forever Developer Edition! If you’re building a Spring Boot application, you’ll eventually need to add user authentication. You can do this with OAuth 2.0 (henceforth: OAuth). OAuth is a standard that applications can use to provide client applications with “secure delegated access”. It works over HTTP ...

Read More »

Testing Spring Data + Spring Boot applications with Arquillian (Part 2)

In previous post, I wrote about how to test Spring Data application using Docker with Arquillian Cube. The test looked like: @RunWith(SpringRunner.class) @SpringBootTest(classes = PingPongController.class, webEnvironment = RANDOM_PORT) @ContextConfiguration(initializers = PingPongSpringBootTest.Initializer.class) public class PingPongSpringBootTest { @ClassRule public static ContainerDslRule redis = new ContainerDslRule("redis:3.2.6") .withPortBinding(6379); @Autowired TestRestTemplate restTemplate; @Test public void should_get_pongs() { // given restTemplate.postForObject("/ping", "pong", String.class); restTemplate.postForObject("/ping", "pung", String.class); // when final List<String> ...

Read More »

Testing Spring Data + Spring Boot applications with Arquillian (Part 1)

spring-interview-questions-answers

Spring Data’s mission is to provide a familiar and consistent, Spring-based programming model for data access while still retaining the special traits of the underlying data store. It provides integration with several backend technologies such as JPA, Rest, MongoDB, Neo4J or Redis to cite a few. So if you are using Spring (Boot) then Spring Data is the right choice to deal ...

Read More »

Spring Boot, @EnableWebMvc And Common Use-Cases

spring-interview-questions-answers

It turns out that Spring Boot doesn’t mix well with the standard Spring MVC @EnableWebMvc. What happens when you add the annotation is that spring boot autoconfiguration is disabled. The bad part (that wasted me a few hours) is that in no guide you can find that explicitly stated. In this guide it says that Spring Boot adds it automatically, ...

Read More »

Real-Time Communication: Implementing Websockets With Spring Boot

spring-interview-questions-answers

When developing web applications, we sometimes need to push server events down to connected clients. However, HTTP was not designed to allow this. A client opens a connection to a server and requests data. A server does not open a connection to a client and push data. To get around this limitation, a polling pattern was established where web pages ...

Read More »

Auto-Publishing & Monitoring APIs With Spring Boot

spring-interview-questions-answers

If you are heading down the path of a Microservices style of architecture, one tenant you will need to embrace is automation. Many moving parts are introduced with this style of architecture. If successful, your environment will have a plethora of service APIs available that the enterprise can consume for application development and integration. This means that there must be ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns