Spring A framework for Java development. Strong against change. The code is highly readable. Highly reusable.
DI Dependency Injection Instance management
AOP Aspect Oriented Programing Summary of common processing
DevTools Automatically restart the WEB application
Lombok Use of Lombok
H2 Test environment DB
JDBC Database access
Thymeleaf HTML template engine
Web Using SpringMVC Spring Boot
Controller Request processing to the Model class for the request.
Model Data acquisition and calculation from DB.
Viwe Screen display.
HelloWorld
Used when getting information from the server Information that you do not want others to see is not sent by GET Text data transmission
SpringSampleApplication.java A program that runs Spring.
@Controller Controller class.
GetMapping Handles GET method of HTTP request. Add get to the beginning of the method name. For the return value, specify the html file name without the extension.
html xmlns:th="http://www.thymeleeaf.org" Described to use timeleaf.
th:value You can pass values from the screen to the controller class.
@PostMapping Processing when the POST method is sent.
@RequestParam Allows you to receive input from the screen.
model.addAttribute Register the value received from the screen in Model. Set the key and value. Key: Variable name
application.properties A file for setting environment-specific settings.
https://qiita.com/YAKINIKU/items/bba6d8f0cb2a418ea0ea
https://qiita.com/niwasawa/items/024a01c502962eb90b1d
findOne() Access all documents
@Repository Granted to the repository class.
@Autowired Instance creation.
@Data Automatic creation of getter / setter.
A class to pass to and from the repository class and service class. (DTO)
@Servise Service class.
Recommended Posts