Introducing Spring Boot2, a Java framework for web development (for beginners)

Introducing Spring Boot 2, "Java Framework for Web Development".

The following is the popularity of representative Java frameworks for the past two years from September 16th, 2019 using Google Trends. ![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/497973/b6e39074-87ad-0ce9-d923-a9e8055a1395.png) (I feel that the search method of Spring Boot is a little sloppy because I want to introduce it as the main subject ...)



From the above, you can see that Spring Boot is attracting attention as a Java framework for web development.
There are various design ideas and foundations as the foundation of Web applications, and using frameworks in the recent development style based on team development by multiple people is to share intentions, ease of management, and improve work efficiency. I think it is indispensable above. Against this background, purchasing framework trends may be a great weapon in business.
(link: Spring Boot or Play Framework, which is better? Experts thoroughly explain from 5 perspectives) https://employment.en-japan.com/engineerhub/entry/2019/03/15/103000




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.

image.png 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. image.png (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