In this Spring boot actuator tutorial, learn about inbuilt HTTP endpoints available to any boot application for different monitoring and management purpose.
Learn to consume SOAP webservices using spring’s WebServiceTemplate and auto client proxy class generation using JAXB maven plugin. Creating a SOAP webservice is out of scope of this tutorial, but you may learn it here.
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 […]
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.
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.
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 […]
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.
Learn to configure Spring boot application with embedded ActiveMQ for sending and receiving JMS messages with help of JMSTemplate.
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 […]
To schedule job in spring boot application to run periodically, spring boot provides @EnableScheduling and @Scheduled annotations. Lets learn to use them. Let’s say you want to run job at every 10 seconds interval. You can achieve this job scheduling in below steps: 1) @EnableScheduling to Spring Boot Application class Add @EnableScheduling annotation to your […]
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 @Component over CommandLineRunner implementation class This one is fairly easy. 2) Implement CommandLineRunner in SpringBootWebApplication itself This is also possible. […]
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 […]
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 […]
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, you can locate the application.properties 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 […]
By default, Spring boot uses embedded tomcat server to run the application. At times, you may need to use jetty server in place of tomcat server. Spring Boot provides Tomcat and Jetty dependencies bundled together as separate starters to help make this process as easy as possible. You can use jetty with following simple steps. […]
By default, Spring boot applications started with embedded tomcat server start at port 8080. You can change default tomcat port to any other port, using any one of below technique. 1) Change default server port from application.properties file You can do lots of wonderful things by simply making few entries in application.properties file in any […]
By default, Spring boot applications are accessed by context path “/” which is default for embedded servers i.e. you can access the application directly at http://localhost:PORT/. But in production, you will deploy the application under some context root – so that you can refer the URLs for other places. Also, it is desirable to configure […]
Learn to create and configure spring boot application which uses JSP template files to render view layer. It uses embedded Tomcat server to run the application. Sourcecode Structure The files in this application are placed as given structure in image. Maven dependencies – pom.xml This application uses given below dependencies. Spring Boot Application Initializer The […]
Spring boot is sub-project developed by developers of spring framework – to create stand-alone, production-grade application with minimum configuration possible. Spring boot applications are typically bundled as fat/uber jar files and can be deployed in any platform as a simple jar file. This is why spring boot applications are a good candidate for building microservices in java.