Will keep on adding samples/examples as I come across...
If you are getting error & your Spring Boot application is not starting due to some missing class or class definition.
And you are sure that your POM file is correct & complete.
Then before trying other solutions, just try to delete all the files from .m2 folder on your machine & let all the required files be downloaded again.
Or directly use SpringBoot version - 2.0.4 or 1.4.2.RELEASE
If you are getting error & your Spring Boot application is not starting due to some missing class or class definition.
And you are sure that your POM file is correct & complete.
Then before trying other solutions, just try to delete all the files from .m2 folder on your machine & let all the required files be downloaded again.
Or directly use SpringBoot version - 2.0.4 or 1.4.2.RELEASE
Below is the URL to see different properties which you can play with in application.properties file
docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html
Good quick tutorial to build one running Spring Boot application -
https://www.callicoder.com/spring-boot-rest-api-tutorial-with-mysql-jpa-hibernate/
I will be posting the working project taken from the above blog & below attached pdf. And I had to make a few changes in that to make it working & did some refactoring.
So will attach all the files here as .zip which you can use on your local.
I have added few of my comments in the attached file which may help you while practising. I have studied 5 chapters only from this book & added my comments & highlighted important words or lines there.
docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html
Good quick tutorial to build one running Spring Boot application -
https://www.callicoder.com/spring-boot-rest-api-tutorial-with-mysql-jpa-hibernate/
I will be posting the working project taken from the above blog & below attached pdf. And I had to make a few changes in that to make it working & did some refactoring.
So will attach all the files here as .zip which you can use on your local.
I have added few of my comments in the attached file which may help you while practising. I have studied 5 chapters only from this book & added my comments & highlighted important words or lines there.
spring_boot_in_action.pdf | |
File Size: | 6693 kb |
File Type: |
A Quick sample for REST in SpringBoot
Some suggested best practises while developing springboot services-
Spring Boot Microservices Coding Style Guidelines and Best Practices | by Wenqi Glantz | CodeX | Medium
Switching from RestTemplate to WebClient: A Reactive Tale - Lowie Cuypers — Ordina JWorks Tech Blog (ordina-jworks.github.io)
Spring Boot Microservices Coding Style Guidelines and Best Practices | by Wenqi Glantz | CodeX | Medium
Switching from RestTemplate to WebClient: A Reactive Tale - Lowie Cuypers — Ordina JWorks Tech Blog (ordina-jworks.github.io)
While developing any application, it is always good to handle the corner scenarios & handle the situations if something goes
out of the hand. In short it always good to handle the exceptions occuring in the application & try to wrap them under your
business specific exceptions which should be Runtime Exceptions & have meaningful messages to the client with relevant error codes.
For this you will be defining your own Business specific exceptions & use them while returning any exception.
Check a quick guide about this in your SpringBoot app : Dynamic Proxies in Java | Baeldung
out of the hand. In short it always good to handle the exceptions occuring in the application & try to wrap them under your
business specific exceptions which should be Runtime Exceptions & have meaningful messages to the client with relevant error codes.
For this you will be defining your own Business specific exceptions & use them while returning any exception.
Check a quick guide about this in your SpringBoot app : Dynamic Proxies in Java | Baeldung
While writting SpringBoot application, you will also be writting the test classes & I agree with below pic, that many of your test classes can be written using some or all the given features.
Below poc has been taken from : https://www.youtube.com/watch?v=Ekr4jxOIf4c
Below poc has been taken from : https://www.youtube.com/watch?v=Ekr4jxOIf4c
Overview of Spring Boot Dev Tools |Baeldung
Streaming Data with Spring Boot RESTful Web Service (technicalsand.com)
Streaming Data with Spring Boot RESTful Web Service (technicalsand.com)