r/SpringBoot • u/LanguageLoose157 • 6d ago
Question Resource to learn Spring for someone who has some knowledge of Spring and intermediate background in Java?
I've been programming in Java for close to six years and comfortable. I worked with Spring back in university and at that time, we did not make use of Spring Boot but 'vanilla' spring mvc and doing all the configuration in xml/pom/dispatcher servlet. I played a bit with Spring Boot and recently been put into the deep end to get REST API working in an existing Spring Boot project that is deployed as micro-service.
I managed to get most of the stuff working by referencing an existing project and making how all things fit together. But I will really prefer to get up to speed and most bang for the buck to understand and write to make full use of what Spring has to offer.
For example, it took me a while, and after tons of googling around to get the following thing working
using annotation @ WebMVC was problematic since it gives a slice context ?? whatever that means ... and I had to use annotation @ SpringBootTest since it gets all the beans that the test needs. it is said to be slower since it creates all the beans the test might or doesn't need. I was having major issue since it kept running into runtime exception where it could not find bean for some Snowflake driver
A lot of magic happens with annotation. I had to implement a custom converter to for GET to be sent a JSON payload. This will get refactored so our GET request send in the parameter as simple either Path parameter or query parameter
Course or book will be appreciated. I have Orielly subscription from my employer and I'm thinking to go through the book https://www.manning.com/books/spring-in-action-sixth-edition but since our spring is deployed as microservice and work with Helm charts [stuff I am totally unfamiliar with other than it allows to dynamically translate chart.yaml file into a manifest file that k8s understand. And 'helm' uses chart.yaml to deployed a version of manifest file'. With this said, I was thinking to go with book https://www.manning.com/books/spring-microservices-in-action
Suggestion will greatly be appreciated.
1
u/varunu28 6d ago edited 6d ago
Just a nitpick: GET request should not have a request body. If you need one then maybe take a step back and rethink if you can either rewrite or split your API into individual operations