Spring Boot Profile integration practice with Maven profile2017-07-04 SPRING BOOT MAVEN article catalog 1. Summary 2. The meaning of integration 3. Maven Filter 3.1. Filtering 3.2. The default configuration of the Spring Boot Resource plugin is 4. Spring Boot Profile 4.1. Spring Maven Default configuration 5. Integration 5.1. Engineering structure 5.1.1. The default engineering structure for the demo instance is: 5.1.2. Jdbc.properties 5.1.3. Application.properties 5.1.4. Application-${profile}.properties 5.2. The profile parameter 5.3 is defined in the POM. Override the default resource plug-in configuration 5.4. Use of Filter 5.5. Use MAVEN to activate Spring profile 5.6. Package Deployment 5.6.1. Run the MAVEN directive to package 5.6.2. Results View 5.7. Source code 5.8. Summary 6. Good book recommended 7. Reference
Summary
In the modern project development the multi-person collaboration, the multi-environment deployment already is the essential software development Way, the author is currently developing one based on the Spring Boot project environment to have four sets of many, including (local, test, walkthrough, production). In particular, the development of large-scale modern projects, complex construction, a large number of participants, and so on, making efficient construction tools indispensable. And Maven is a great Java Engineering Building tool.
This article focuses on how MAVEN profile is integrated with spring Boot profiles. A word of summary is that two types of profiles can achieve the functions of both different and cross, the purpose of this article is to fully use their own advantages to achieve a reasonable construction of the project.
the meaning of integration
As a build tool, Maven focuses on a larger granularity, focusing on the overall environment configuration of the project, the dependency management of the project, and the configuration file management in various environments. Of course, Maven can also implement the configuration of attributes.
Spring Boot profile, as a feature of spring, is known by spring's most core IOC capabilities and is more focused on the multi-environment configuration of spring Beans and the configuration of attribute fields.
Thus, the meaning of integration is to use MAVEN to achieve multi-environment configuration file management, dependency management, and spring boot profile to implement the properties, as well as spring boot automatically assemble the properties of the bean configuration.