dashwood
dashwood

Reputation: 13

Spring Boot Properties Migrator

I'm trying to run an application(spring boot v1.5.9.0) with dependency:

<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-properties-migrator</artifactId>
  <scope>runtime</scope>
</dependency>

and getting this error:

org.springframework.boot.SpringApplication - Application startup failed
java.lang.NoClassDefFoundError: org/springframework/boot/context/properties/source/ConfigurationPropertySources

this error, apparently, did not occur before. How do I make the migrator work?

Do I have to change the spring-boot version to 2x before running the migrator? If so, i don't really get the migrator usage. As its scope is runtime - I have to make the app run before including it - which means I have to solve all the errors without migrator's advice? What do I use it for afterwards?

Upvotes: 0

Views: 7951

Answers (2)

Mark Bramnik
Mark Bramnik

Reputation: 42541

You've stated that you're running spring boot v1.5.9.0

It doesn't make sense to run the properties migrator with spring boot 1.5.x. Its primary intention is to "assist" in properties migrations that have changed during migration of spring boot 1.x to spring boot 2.x

As for the error, this specific class is available only since spring boot 2.0. See the comment @since in the sourcefile

Upvotes: 2

Abu K S
Abu K S

Reputation: 11

In your project, application.properties or application.yml is present or not? Spring boot is auto-configuration. I think those properties will be expecting..Also check what are the annotations used in Spring boot main class..Share that Spring boot main class as well..will check

Upvotes: 0

Related Questions