Friday, July 13, 2018

spring_note

https://docs.spring.io/spring/docs/4.3.8.RELEASE/spring-framework-reference/html/overview.html

1. BOM to resolve the version conflict
You can import the spring-framework-bom in your dependencyManagement section to ensure that all spring dependencies (both direct and transitive) are at the same version.
An added benefit of using the BOM is that you no longer need to specify the <version> attribute when depending on Spring Framework artifacts.
Artifacts specified in the <dependencies> section will ALWAYS be included as a dependency of the child module(s).
Artifacts specified in the <dependencyManagement> section, will only be included in the child module if they were also specified in the <dependencies> section of the child module itself.

2. Instantiation with a static factory method
<bean id="clientService"
    class="examples.ClientService"
    factory-method="createInstance"/>

No comments:

Post a Comment