Home » Spring Boot » Page 18

Tag Archives: Spring Boot

Running on time with Spring’s scheduled tasks

spring-interview-questions-answers

Do you need to run a process everyday at the exact same time like an alarm? Then Spring’s scheduled tasks are for you. Allowing you to annotate a method with @Scheduled causing it to run at the specific time or interval that is denoted inside it. In this post we will look at setting up a project that can use ...

Read More »

CI/CD for SpringBoot applications using Travis-CI

In this article we are going to learn how we can use Travis CI for Continuous Integration and Continuous Deployment (CI/CD) of a SpringBoot application. We will learn how to run maven build goals, perform test coverage validation using JaCoCo plugin, Code Quality checks using SonarCloud, build Dockerimage and push it to DockerHub and finally deploy it to Heroku. The source code for this article is at https://github.com/sivaprasadreddy/freelancer-kit Last week I ...

Read More »

Sample Logback Configuration for Spring Boot Profile Based Logging

java-interview-questions-answers

We would want different logging configurations for different profiles in Spring Boot, like in local running we would just want console logging and for production, we would want file logging with support for rolling the log files daily. I came up with a sample logback configuration which I use in all my applications. Create a file named logback-spring.xml in src/main/resources ...

Read More »

Bootiful Development with Spring Boot and React

spring-interview-questions-answers

“I love writing authentication and authorization code.” ~ No Java Developer Ever. Tired of building the same login screens over and over? Try the Okta API for hosted authentication, authorization, and multi-factor auth. React has been getting a lot of positive press in the last couple years, making it an appealing frontend option for Java developers! Once you learn how ...

Read More »

Secure Your Spring Boot Web App with Single Sign-on from Okta

spring-interview-questions-answers

“I love writing authentication and authorization code.” ~ No Java Developer Ever. Tired of building the same login screens over and over? Try the Okta API for hosted authentication, authorization, and multi-factor auth. You can spin up an enterprise-quality REST server with complete user identity and authorization management in less than 20 minutes, with SpringBoot and Okta. Spring Boot and ...

Read More »

Spring Based Application – Migrating to Junit 5

This is a quick write-up on migrating a Gradle based Spring Boot app from Junit 4 to the shiny new Junit 5. Junit 4 tests continue to work with Junit 5 Test Engine abstraction which provides support for tests written in different programming models, in this instance, Junit 5 supports a Vintage Test Engine with the ability to run JUnit 4 ...

Read More »

Microservices implementation example with Spring Boot

spring-interview-questions-answers

1. Introduction We have already been through the Microservice demo and it was so pleasing to see the wonderful response it received. Hopefully we are all good with the basics now. This tutorial will guide us all through the actual Microservices implementation, so we are well-directed every time we are asked to create it. 2. Understanding Service Registry Traditionally, when ...

Read More »

Get any image metadata with Spring Boot and Docker

This is the second part of a series of three articles, but I decided to condensate in two to give space to another article. The first part is available on this website at https://www.javaadvent.com/2017/12/microservices-architecture.html. In this part we’re going to develop a Microservice that reads metadata from an image as JSON or XML. I’m using Docker and Java (check part 1 if ...

Read More »

Spring Boot as a Windows Service in 5 minutes

java-interview-questions-answers

I recently had to deploy a Spring Boot application as a windows service and am surprised how easy it was using winsw. I’d previously written about using procrun – Java Programs as Windows Services, but winsw is much easier Getting Started There is a Section 59 of the Spring Boot documentation is about Installing Spring Boot applications, and points you ...

Read More »