HowToDoInJava

  • Java 8
  • Regex
  • Concurrency
  • Best Practices
  • Spring Boot
  • JUnit5
  • Interview Questions

Spring Boot Devtools Tutorial

By Lokesh Gupta | Filed Under: Spring Boot, Spring Boot 2

If you have worked on latest UI development frameworks e.g. Node, angular, gulp etc. then you must have appreciated the auto-reload of UI in browser whenever there is change in some code. Its pretty useful and saves a lot of time. Well, same feature can be utilized in spring boot applications using spring-boot-devtools dependency provided […]

Spring Boot war Packaging Example

By Lokesh Gupta | Filed Under: Spring Boot, Spring Boot 2

In Spring boot applications, default packaging is jar which is deployed in embedded servers. If you want to generate a war file for deployment in seperate application server instances such as Jboss, Weblogic or tomcat, then follow below instructions.

Spring Boot2 @SpringBootApplication Auto Configuration

By Lokesh Gupta | Filed Under: Spring Boot, Spring Boot 2

String boot is very easy to use and it does a lot of things under the hood, you might not be aware of. In future, a good developer will be who will know exactly what is going on behind spring boot auto configuration, how to use it in your favor and how to disable certain sections which you do not want into your project.

Spring Boot HATEOAS Example

By Lokesh Gupta | Filed Under: Spring Boot, Spring Boot 2

In this Spring HATEOAS example, we will learn to add HATEOAS links to existing REST APIs created in a spring boot project. We will use the class org.springframework.hateoas.ResourceSupport along with org.springframework.hateoas.mvc.ControllerLinkBuilder and org.springframework.hateoas.Link classes provided by spring HATEOAS module. To demo the creation of links, we will first create few REST APIs and see their […]

Spring-boot-starter-parent Example

By Lokesh Gupta | Filed Under: Spring Boot, Spring Boot 2

The spring-boot-starter-parent dependency is the parent POM providing dependency and plugin management for Spring Boot-based applications. It contains the default versions of Java to use, the default versions of dependencies that Spring Boot uses, and the default configuration of the Maven plugins.

Spring-boot-starter Maven Templates

By Lokesh Gupta | Filed Under: Spring Boot, Spring Boot 2

Spring Boot comes with over 50+ different starter modules, which provide ready-to-use integration libraries for many different frameworks, such as database connections that are both relational and NoSQL, web services, social network integration, monitoring libraries, logging, template rendering, and the list just keeps going on.

Spring Boot Actuator Endpoints Example

By Sajal Chakraborty | Filed Under: Spring Boot

In this Spring boot actuator tutorial, learn about inbuilt HTTP endpoints available to any boot application for different monitoring and management purpose.

Spring Boot SOAP Client – WebServiceTemplate Example

By Sajal Chakraborty | Filed Under: Spring Boot

Learn to build spring boot SOAP client in Spring boot applications and consume SOAP web services using WebServiceTemplate and auto client proxy code generation.

Spring boot RSS feed with rome

By Sajal Chakraborty | Filed Under: Spring Boot

In this tutorial, learn to create and consume RSS and Atom feed from spring boot application. You must have seen this in form of text or image buttons on various websites (like our RSS feed) inviting you to “Subscribe via RSS.” RSS is simple syndication API – often referred as Rich Site Summary. RSS revolutionized […]

Spring Boot SOAP Webservice Example

By Sajal Chakraborty | Filed Under: Spring Boot

In this spring boot soap tutorial, we will focus only in the Spring boot related configurations to see how easily we can create our contract first SOAP webservice.

Spring Boot SSL [https] Example

By Sajal Chakraborty | Filed Under: Spring Boot

In this spring boot example, learn to configure web application to run on SSL (HTTPS) with self-signed certificate. Also learn to create SSL cert, as well.

Spring Boot – Role Based Security with JAX-RS Annotations

By Lokesh Gupta | Filed Under: Spring Boot

Learn to create JAX-RS 2.0 REST APIs using Spring Boot and Jersey framework, and add role based security using JAX-RS annotations e.g. @PermitAll, @RolesAllowed or @DenyAll. Table of Contents Project Structure Create REST APIs Secure REST APIs with JAX-RS Annotations Write security filter using JAX-RS ContainerRequestFilter Demo Project Structure The project structure of application created […]

Spring Boot Jersey Example

By Lokesh Gupta | Filed Under: Spring Boot

Learn to configure and create JAX-RS 2.0 REST APIs using Spring Boot and Jersey framework. This example application uses Jersey’s ServletContainer to deploy the REST APIs.

Spring Boot JMSTemplate with Embedded ActiveMQ

By Lokesh Gupta | Filed Under: Spring Boot

Learn to configure Spring boot application with embedded ActiveMQ for sending and receiving JMS messages with help of JMSTemplate.

Spring Boot – Custom PropertyEditor Configuration Example

By Lokesh Gupta | Filed Under: Spring Boot

PropertyEditor is originally part of the JavaBeans specification. Spring also heavily uses the PropertyEditors to be able to represent properties in a different way than the object itself e.g. parsing human readable inputs from http request params or displaying human readable values of pure java objects in view layer. Spring has a number of built-in […]

Spring boot @Scheduled annotation example

By Lokesh Gupta | Filed Under: Spring Boot

To schedule job in spring boot application to run periodically, spring boot provides @EnableScheduling and @Scheduled annotations. Lets learn to use Spring boot @Scheduled annotation. Let’s say you want to run job at every 10 seconds interval. You can achieve this job scheduling in below steps: 1. Add @EnableScheduling to Spring Boot Application class Add […]

Spring boot – CommandLineRunner interface example

By Lokesh Gupta | Filed Under: Spring Boot

Spring boot’s CommandLineRunner interface is used to run a code block only once in application’s lifetime – after application is initialized. How to use CommandLineRunner You can use CommandLineRunner interface in three ways: 1) Using CommandLineRunner as @Component This one is fairly easy. 2) Implement CommandLineRunner in @SpringBootApplication This is also possible. Sample code given […]

Spring Boot – Get all loaded beans with Class Type Information

By Lokesh Gupta | Filed Under: Spring Boot

Spring boot loads lots of beans internally to run your application with minimal configuration. In this example, we will learn to find out all those spring boot loaded beans and their class type information. Using ApplicationContext to get all loaded beans To execute a method automatically, when application is fully loaded, I am using CommandLineRunner […]

Spring Boot Logging with application.yml

By Lokesh Gupta | Filed Under: Spring Boot

Learn spring boot logging configuration via application.yml file in simple and easy to follow instructions. In the default structure of a Spring Boot web application, you can locate the application.yml file under the resources folder. Table of Contents Understand default spring boot logging Set logging level Set logging pattern Set logging output to file Using […]

Spring boot logging with application.properties

By Lokesh Gupta | Filed Under: Spring Boot

Learn spring boot logging configuration via application.properties file in simple and easy to follow instructions. In the default structure of a Spring Boot web application, we can locate the application.properties file under the resources folder. Table of Contents 1. Spring boot default logging 2. Spring boot logging levels 3. Spring boot logging patterns 4. Log […]

  • 1
  • 2
  • Next Page »

Search Tutorials

  • Email
  • Facebook
  • RSS
  • Twitter

Spring Boot 2 Tutorial

  • Spring Boot – Auto configuration
  • Spring Boot – Starter parent
  • Spring Boot – Starter templates
  • Spring Boot – Multi-module project
  • Spring Boot – DevTools
  • Spring Boot – WAR Packaging
  • Spring Boot – REST API
  • Spring Boot – Async Controller
  • Spring Boot – ResponseBodyEmitter
  • Spring Boot – SseEmitter
  • Spring Boot – POST with Headers
  • Spring Boot – Error Handling
  • Spring Boot – HATEOAS
  • Spring Boot – @Async
  • Spring Boot – log4j2 xml
  • Spring Boot – log4j2 properties
  • Spring Boot – Caching
  • Spring Boot – Retry
  • Spring Boot – JUnit
  • Spring Boot – BasicAuth
  • Spring Boot – MockMVC
  • Spring Boot – Mockito
  • Spring Boot – Test Async Controller
  • Spring Boot – TestRestTemplate
  • Spring Boot – RestTemplate GET
  • Spring Boot – RestTemplate POST
  • Spring – RestTemplate timeout
  • Spring – RestTemplate BasicAuth

Spring Boot Tutorial

  • Spring Boot – CommandLineRunner
  • Spring Boot – Configure Jetty Server
  • Spring Boot – Tomcat Default Port
  • Spring Boot – Change Application Root
  • Spring Boot – SSL [https]
  • Spring Boot – Get all loaded beans
  • Spring Boot – Custom PropertyEditor
  • Spring Boot – @EnableScheduling
  • Spring Boot – Jersey
  • Spring Boot – SOAP Webservice
  • Spring Boot – SOAP Client
  • Spring Boot – JMSTemplate
  • Spring Boot – REST APIs
  • Spring Boot – JSP View
  • Spring Boot – Logging yml Config
  • Spring Boot – Logging property Config
  • Spring Boot – Actuator endpoints
  • Spring Boot – Role Based Security
  • Spring Boot – RSS / ATOM Feed

Popular Tutorials

  • Java 8 Tutorial
  • Core Java Tutorial
  • Java Collections
  • Java Concurrency
  • Spring Boot Tutorial
  • Spring AOP Tutorial
  • Spring MVC Tutorial
  • Spring Security Tutorial
  • Hibernate Tutorial
  • Jersey Tutorial
  • Maven Tutorial
  • Log4j Tutorial
  • Regex Tutorial

Meta Links

  • Advertise
  • Contact Us
  • Privacy policy
  • About Me

Copyright © 2016 · HowToDoInjava.com · All Rights Reserved. | Sitemap