I'm trying to add gcloud secret manager to an old 1.5.2 Spring-boot version but I encountered some problems.
I've tried adding both and some other versions but none of them worked.
implementation("org.springframework.cloud:spring-cloud-gcp-starter-secretmanager:1.2.2.RELEASE")
implementation 'com.google.cloud:spring-cloud-gcp-starter-secretmanager:3.1.0'
I'm receiving the error:
java.lang.NoSuchMethodError: org.springframework.boot.builder.SpringApplicationBuilder.<init>([Ljava/lang/Class;)V
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:186)
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:117)
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:74)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:122)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:75)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:53)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:320)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:295)
at com.johnlewis.contactcentre.Application$Companion.main(Application.kt:48)
at com.johnlewis.contactcentre.Application.main(Application.kt)
So, as far as I understood I'm mixing the dependency for spring cloud 1.x with 2.x but I'm not sure how to solve this and use the secret manager on this version of spring.
If you have any idea I would appreciate.
Thanks