spring boot itself is a framework that serves the spring framework. It can simplify configuration files, quickly build micro-blog applications, build tomcat built-in, and run directly without packaging deployment.
and one of the features I find most convenient is convention over configuration, which allows programmers to focus more on the business logic.
where EnableAntoConfiguration defaults to the dependent starter for automatic
springboot automatic assembly principle is :
1.Spring application.run implementation process has refreshContext(context), which internally parsed the label on our configuration class, and the annotation @enableantoconfiguration
2. Parses @ EnableAntoConfiguration this annotation of @ the configuration of the Import into class @ AntoConfigurationImportSelector
3. @ AntoConfigurationImportSelector. This class has methods SpringFactoriesLoder loadFactoryNames (getStringFactoriesLoaderFactoryClass (), getBeanClasLoader ()); The purpose is to read the meta-inf /spring.factories file
. Spring.factories file in the project in jarbao configure the Configuration class to be assembled automatically.
Read More:
- Automatic configuration of springboot and application.yml
- How to handle exception in springboot
- The @ Autowired annotation in springboot is invalid in ordinary classes. How to solve and use the null pointer exception java.lang.nullpointerexception
- Using UMI plugin keep alive to realize keep alive state storage in UMI Ant Design
- There is no automatic completion of unity in vs2019
- Java uses lock to realize multithread sequential alternate execution mode 2
- Using xrdp to realize windows remote desktop Ubuntu Linux
- Python parallel processing makes full use of CPU to realize acceleration
- Learn English together | three ways to realize digital factorial with JavaScript
- Realize the simplest recursive call, simulate exception in thread “main” java.lang.stackoverflowerror exception
- Prompt “failed to load file or assembly” when VTK uses renderwindowcontrol
- Java docking PayPal to achieve automatic renewal function
- Servicetask synchronization failed to set automatic retrying
- Deploy mongodb fragment combined with replica set to realize distributed storage of MySQL database files (step 10)
- How to solve the problem of artifact contains illegal characters when creating springboot project with idea
- An error occurred during the installation of assembly
- Eclipse automatic prompt setting method and optimization
- Ida assembly instruction invalid operate
- 【arm】arm-assembly-print-register-value-in-decimal
- Failed to initialize nvml driver / library version mismatch due to automatic update of NVIDIA driver