Spring boot quick guide | Building an Application with Spring Boot
Spring Boot tutorial for beginners
In this article we will see a quick guide for spring boot tutorials. Spring Boot is the Java Enterprise Framework that makes it easy to create Spring powered applications that are stand-alone, production-ready and to create it with a minimum of efforts.
If we talk about In spring mvc we need a lot of xml configuration to create a application . As we knew that xml configuration are error prone also . But In spring boot we can create application with minimum effort .
You can create spring boot application just fill simple information using start.spring.io .
Just fill simple details like groupId and Artifact and add dependencies as per your requirement after that click on generate project . i will generate spring boot project and downloaded as zip file . Unzip this project and import in your IDE like eclipse , STS etc. You can follow this How to create spring boot project article for more details .
How to change port in Spring Boot ? When you run your application in your machine it is used by default 8080 port . You can change it in multiple ways .
Very simple method is just add server.port property in properties file.
server.port = 8090
Now you application run on 8090 port . We have also more method for this How to Change the default port in Spring Boot
How to Create a REST API With Spring Boot?
In this very easy task to creating rest api in spring boot if you know how to devolve rest api in spring mvc . you just need to create controller and use @ RestController Annotation .This is very nice restful web services example in java . You can follow other nice Spring Boot example also .
How Reload Changes Without Restarting the Server ?
We can reload changes of spring boot application without restart application using devtools just add dependency in pom file and reload changes automatically .
How to Print all beans loaded by Spring Boot We get all beans from application context using getBeanDefinitionNames() method. as
String[] beans = appContext.getBeanDefinitionNames();
How to Read value From application.properties in spring boot We have different method to read values from application properties .
- How to read values from application.properties Using @Value annotation
- How to read values from application.properties Using @ConfigurationProperties annotation
- How to read values from application.properties Using Environment object These are some more good examples of spring boot
Spring Boot @ConfigurationProperties Property Validation
Spring Boot – Example of RESTful Web Service with XML
How to Deploy a Spring Boot WAR to Tomcat Server
Spring Boot – RESTful Web Service with POST Request in XML Example
This article have good basic example for spring boot learning . See how to create react js application for beginners .
You can learn java program for practice like Java max example , default value of int etc .