Spring Boot convention over configuration

A, convention over configuration
convention over configuration (Convention Over Configuration), also referred to as agreed programming is a software design paradigm. The purpose is to reduce the number of software developers need to make decisions in order to obtain the benefits of simple, without losing the flexibility of them. Developers only need to apply the provisions of section does not comply with the contract. For example, if a class named Sale model, the corresponding database table will be designated as the default sales. Only when deviate from this convention, such as the table named "products_sold", will need to write the name of the relevant configuration. If agreed upon tools consistent with your expectations, you can omit the configuration used; on the contrary, you can configure to achieve the way you expect.

For example, usually the architect to build a software development project is the limit just write code, to develop a set of specifications that allow developers to develop encoding test and the like according to uniform requirements, thus strengthening the efficiency of the development and review of the code efficiency. So when you need to write code required name, so that the code will have a unified standard of good readability and maintainability of.

Added: convention over configuration is also known as habits over configuration, the configuration is greater than the agreed

Two, Spring Convention over configuration of the Boot
Spring the Boot is a new frame provided by Pivotal team, which is designed to simplify the development process and initial set up of new Spring application. The framework uses a particular manner be configured so that the developer is no longer necessary to define the configuration of the template. spring Boot manner using convention over configuration, greatly reduce the amount of use of the profile

spring-boot-starter-web contains Spring MVC dependent-related (including Json supported Jackson and data validation Hibernate Validator) and a built-in Tomcat container, which makes the development stage either directly via the main method independent JAR package run a WEB project. In the deployment phase can also be labeled as WAR package into production run.

Third, this is a new idea of what the new technology?
Not in JDK5.0 release, the use of metadata, introduce the concept of annotations (also called label), on behalf simplify the configuration of start, it is a kind of early "convention over configuration" of the expression; so it seems, springboot is not a new technology, the official said on the basis of spring, yes indeed on the basis of spring, fine-grained division of nothing more than complete annotation reduce configuration tools to quickly build the framework of the project fills;
many new framework uses the conventions excellent in the method configuration, including: Spring, Ruby on Rails, Kohana PHP, Grails, Grok, Zend Framework, CakePHP, symfony, Maven, ASP.NET MVC, web2py (MVC), Apache Wicket.
---------------------
Author: weixin_34191734
Source: CSDN
Original: https: //blog.csdn.net/weixin_34191734/article/details/87149619
Disclaimer: This article as a blogger original article, reproduced, please attach Bowen link!

Guess you like

Origin www.cnblogs.com/qyx2019/p/11024706.html