Aside from the first part, I would like to introduce Spring Boot 2 immediately.
Spring Boot is a framework based on the Model-View-Controller architecture that inherits Spring MVC.
However, in order to use these, it is necessary to build an environment by accurately combining a large number of libraries.
It seems that there is a background that it was quite difficult to create an application quickly.
(I think that you have experience if you write a lot of DI in xml and many errors occur ...)
After that, Spring Roo appeared as a library that complements Spring MVC.
The framework of the application can be automated to some extent, but it is still not enough.
Spring Boot 2 introduced this time is provided as a starter package for creating Web applications at high speed by combining Spring MVC and other Spring Framework libraries. So to speak, "Completed Spring MVC" < It will be / font>.
By writing a dedicated library in the xml file, it is possible to read a set of libraries, build an environment, and assemble at overwhelming speed.
Spring Boot Starter Data JPA that makes JPA easier to use, overwhelming convenience around the database "Repository", etc.
Also, in existing Web applications, creating a view using jsp was the basis.
As a strength of jsp, java source can be described in jsp, but therefore java source can be described without distinction.
The process becomes difficult to understand, and it seems that it is evaluated as not excellent in maintenance and management. </ Font>
(link: Dewa Blog) https://dewa.hatenadiary.org/entry/20080304/1204709346
Spring Boot has a template engine such as "Thymeleaf" </ font> that can solve this problem.
Processing can be incorporated by adding attributes such as th: hoge to HTML tags, and since it does not use unique tags, it has a high affinity for HTML etc.
The advantage is that it is easy to edit.
(link: teratail) https://teratail.com/questions/77163
Finally, I would like to conclude this article with an introduction to sample code that uses a powerful repository. (Source: Spring Boot2 cheat sheet) https://qiita.com/azul915/items/5f7003bb78917dff6bb1#jparepository%E3%81%AE%E3%83%A1%E3%82%BD%E3%83%83%E3%83%89%E5%AE%9F%E8%A3%85%E4%BE%8B
Recommended Posts