Submitted by heartin on Sun, 10/23/2016 - 04:36
For externalized configurations, Spring Boot supports file formats such as YAML and the .properties file.
While properties file works with @PropertySource annotation, YAML does not. While we can configure more than one Spring profiles per properties file, we can have any with YAML files.
@ConfigurationProperties [node:read-more:link]
Submitted by heartin on Sun, 10/23/2016 - 01:16
EnableAutoConfiguration
-
EnableAutoConfiguration annotation attempt to guess and configure beans that you are likely to need.
-
Auto-configuration classes are usually applied based on the presence or absence of, files or libraries in your classpath, beans you have defined, and properties.
-
Auto-configuration is always applied after user-defined beans have been registered.
Submitted by heartin on Sat, 10/22/2016 - 23:47
If you need to run some specific code once the SpringApplication has started, you can implement the ApplicationRunner or CommandLineRunner interfaces. Both interfaces work in the same way and offer a single run method which will be called just before SpringApplication.run(…) completes.
The CommandLineRunner interfaces provides access to application arguments as a simple string array, whereas the ApplicationRunner uses the ApplicationArguments interface.
[node:read-more:link]
Submitted by heartin on Sat, 10/22/2016 - 23:45
Spring Boot has no mandatory logging dependency, except for the Commons Logging API, of which there are many implementations to choose from.
Spring Boot attempts to configure logging based on the content of the classpath if you use spring-boot-starter-logging. Other starters such as spring-boot-starter-web depends transitively on the logging starter, and hence it is automatically added if they are being used.
[node:read-more:link]
Submitted by heartin on Sat, 10/22/2016 - 23:43
Bill of Materials
Spring boot calls its collection of dependencies as BOM or bill of materials.
The Spring Boot starter parent is responsible for most of the default configurations, plugins etc. which aides in the BOM. When adding dependencies, Spring boot tries to add matching dependency versions which will work together well. Your starter dependencies such as spring-boot-starter-web will not have to specify any versions. [node:read-more:link]
Pages