CreditEase Pratt & Whitney believes that Spring Boot can be said to be an extension of the Spring framework. It eliminates the XML configuration required to set up Spring applications, follows the principle that conventions are greater than configurations, and greatly reduces the complexity of project construction through its own default configuration, which provides assistance for more efficient development of ecosystems. In addition, the use of a large number of comments in Spring Boot makes the code look more concise and improves the efficiency of development.
Speaking of comments commonly used in Spring Boot projects, CreditEase Pratt & Whitney thinks that we can refer to the following types: @Controller indicates that this class is a controller class, and @RequestMapping is used to intercept requests. If the method does not indicate the way of request, the default is to intercept get and post requests; @RestController is a combination of @Controller and @ResponseBody. When a class is annotated with @RestController, it is no longer necessary to add @ responsebody; @Service, this annotation is used to mark the components of the business layer. We will add this annotation to the classes processed by the business logic and give them to the spring container: @ repository: @ repository annotates the classes as DAO objects to manage the objects that operate the database; @Transactional: This annotation can be used to declare a transaction, which can be added to a class or method.
According to CreditEase Pratt & Whitney, the uniqueness of Spring Boot lies in the following aspects: independent Spring projects can be created; Built-in Tomcat and Jetty containers; Provide a starter POMs to simplify Maven configuration; It provides a series of common non-functional features in large-scale projects, such as safety, indicators, health inspection, external configuration, etc. There is no code generation and xml configuration file at all.
CreditEase Pratt & Whitney believes that the use of Spring Boot is beneficial for enterprises to manage and deal with the complex configuration problems of large enterprise applications and avoid manually searching for compatible jar during the upgrade. Spring Boot will ensure that our applications are upgraded to the correct version.
(Disclaimer: This article only represents the author’s personal views and has nothing to do with this website. Its originality and the words and contents stated in this article have not been confirmed by this website, and this website does not make any guarantee or commitment to the authenticity, completeness and timeliness of this article and all or part of its contents and words. Readers are invited to make reference only, and please verify the relevant contents by yourself. )