It seems that it is a big feature that it is possible to program ignoring the existence of Servlet like other languages by using annotations.
Annotation | Overview |
---|---|
@ Conponent | The most basic annotation to register as a bean in the DI container |
@ Configuration | Annotation for Java-based bean definition * I don't understand what you mean, so I will explain it later. |
@ Repository | Annotation indicating a class for handling data storage and loading. When using a database such as Spring Data, there are cases where it has a special meaning, such as allowing the table to be accessed automatically by specifying this annotation. |
@ Controller | Annotation indicating that it is an MVC controller class. |
@ Service | Annotation indicating a class for handling business logic etc. |
As a special thing in each subproject, different annotations are defined, overriding these annotations.
Annotation | Overview |
---|---|
@ SpringBootApplication | Annotations used as a convention to specify the main program of a Spring Boot application |
@ RestController | Annotation for registering as a controller for REST |
@ RestControllerAdvice | Annotation for defining common processing such as conversion of input data format common to each controller and error processing. |
--When using maven
--If you list the dependency packages in the pom.xlm
file, the required packages will be loaded automatically.
--ʻApplication.properties` A place to list the settings used in each package.
--When using gradle
――I plan to use it from now on
https://qiita.com/ughirose/items/5d691adc677aa08636b8
https://qiita.com/NagaokaKenichi/items/34356c72e8ac0279e1a0
https://qiita.com/MizoguchiKenji/items/2a041f3a3eb13274e55c
http://terasolunaorg.github.io/guideline/5.5.1.RELEASE/ja/ArchitectureInDetail/DataAccessDetail/DataAccessJpa.html How to use when you want to search by adding more conditions https://qiita.com/ksh-fthr/items/44ecc0550a77f4280ea7
https://qiita.com/rubytomato@github/items/4f0c64eb9a24eaceaa6e https://reasonable-code.com/spring-boot-scheduling-tasks/
https://qiita.com/kurukuruz/items/44743a6cd45037061548
Spring Boot Actuator A service that provides functions such as monitoring, metrics, and auditing. Just deploy and automatically apply audit, health, and metric collection to your application.
As a caveat, if the endpoint is set to a point without authentication, there is a risk that the security information of the server will be disclosed, so it is necessary to carefully develop the endpoint disclosure.
Spring Boot Actuator documentation
Recommended Posts