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]( (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)

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)
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)

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)

Recommended Posts