I find @ConfigurationProperties annotation very useful to get a HashMap out of my properties when I work with Spring Boot. But I have this old project which is using Spring 4.2.9RELEASE version which I cannot change and apparently it donot have @ConfigurationProperties or I am not aware of its dependency in 4.2.9RELEASE. Could anyone suggest the best way to have it in the project. If I include spring boot dependency along with spring 4.2.9RELEASE it is not creating any conflicts as of now but is it advisable to do that? Below is my POM:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.2.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<spring.version>4.2.9.RELEASE</spring.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
</dependencies>