[JAVA] Touch all Spring "Guides" (updated from time to time)

What is Spring "Guides"?

https://spring.io/guides The so-called official tutorial. Various patterns of "Hello World" are prepared.


Why did you decide to touch Guides?

Spring can do many things with standard features. When defining requirements, I wondered if it would be possible to develop with less man-hours if I knew what Spring could do. (Maybe you should google each time) I think it's difficult to grasp the total amount of Spring, so I thought about trying the official guide first.


Overview of each Guide and major annotations and classes

I'll translate the Guide to give you a rough overview and a description of the main annotations. I hope it can be used as an index.


Building a RESTful Web Service https://spring.io/guides/gs/rest-service/ RESTful web service. It should be helpful when creating a so-called API. @RestController The class that defines it is the controller that returns the domain object, not the view. A collection of @Controller and @ResponseBody.

@RequestMapping Map methods and HTTP requests. It's like executing the greeting method when receiving an HTTP request to / greeting.

@RequestParam Bind the query parameter to the corresponding argument.


Scheduling Tasks https://spring.io/guides/gs/scheduling-tasks/ Batch processing that starts on time. @Scheduled You can set the startup interval and time (cron image).

@EnableScheduling Enable schedule processing.


Consuming a RESTful Web Service https://spring.io/guides/gs/consuming-rest/ You can easily call RESTful web services and objectify the results. It can also be used as a mock for unit testing.

RestTemplate class

You can call the API with GET or POST and convert the result to a Java object.


Building Java Projects with Gradle How to build with Gradle. Omitted.


Building Java Projects with Maven How to build with Gradle. Omitted.


Accessing Relational Data using JDBC with Spring https://spring.io/guides/gs/relational-data-access/ You can connect to RDB without writing xml or definition. If you do not specify the connection destination, use H2 (in-memory DB) Looks good when making a rough proto.


Updated from time to time ...!

Recommended Posts

Touch all Spring "Guides" (updated from time to time)
[Reverse lookup] Spring Security (updated from time to time)
Memorandum Poem (updated from time to time)
SpringBoot useful site collection (updated from time to time)
[Updated from time to time] Links that are indebted
[Updated from time to time] Ruby on Rails Convenient methods
[Eclipse] Summary of environment settings * Updated from time to time
Try Spring Boot from 0 to 100.
Personally recommended Intellij IDEA initial settings (updated from time to time)
Upgrade spring boot from 1.5 series to 2.0 series
Summary of results of research on object orientation [Updated from time to time]
How to convert param to hash with Rails controller (updated from time to time)
Convert from java UTC time to JST time
Story when moving from Spring Boot 1.5 to 2.1
Changes when migrating from Spring Boot 1.5 to Spring Boot 2.0
Transition from Struts2 to Spring MVC (Controller)
Changes when migrating from Spring Boot 2.0 to Spring Boot 2.2
I translated the grammar of R and Java [Updated from time to time]
Points I stumbled upon when creating an Android application [Updated from time to time]
Spring Boot --How to set session timeout time
To connect from Spring to MySQL on virtual server (unsolved)
Push delivery from Spring application to Firebase Cloud Messaging
My 1880's ~ Fixed time zone from LMT to JST ~