I have a very vanilla setup of Spring Cloud Config Server. Git functionality works great. Wanting to connect it to GCP Secret Manager. Problem 1 is the documentation is lacking and I haven't been able to find many resources online so AI is not very good at it either, but it is really all I have been able to work with.
Main issue is I finally get it to run but it throws an error on start
2025-06-26T21:15:10.202-06:00 ERROR 29793 --- [haloaiconfig] [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Unsatisfied dependency expressed through method 'healthContributorRegistry' parameter 2: Error creating bean with name 'configServerHealthIndicator' defined in class path resource [org/springframework/cloud/config/server/config/EnvironmentRepositoryConfiguration$ConfigServerActuatorConfiguration.class]: Unsatisfied dependency expressed through method 'configServerHealthIndicator' parameter 0: Error creating bean with name 'searchPathCompositeEnvironmentRepository' defined in class path resource [org/springframework/cloud/config/server/config/CompositeConfiguration.class]: Unsatisfied dependency expressed through method 'searchPathCompositeEnvironmentRepository' parameter 0: Error creating bean with name 'googleSecretManagerEnvironmentRepository' defined in class path resource [org/springframework/cloud/config/server/config/GoogleSecretManagerRepositoryConfiguration.class]: Failed to instantiate [org.springframework.cloud.config.server.environment.GoogleSecretManagerEnvironmentRepository]: Factory method 'googleSecretManagerEnvironmentRepository' threw exception with message: com/google/api/client/json/jackson2/JacksonFactory
full stack trace omitted
Caused by: java.lang.NoClassDefFoundError: com/google/api/client/json/jackson2/JacksonFactory
at org.springframework.cloud.config.server.environment.secretmanager.GoogleSecretManagerAccessStrategyFactory.forVersion(GoogleSecretManagerAccessStrategyFactory.java:37) ~[spring-cloud-config-server-4.2.1.jar:4.2.1]
at org.springframework.cloud.config.server.environment.GoogleSecretManagerEnvironmentRepository.<init>(GoogleSecretManagerEnvironmentRepository.java:60) ~[spring-cloud-config-server-4.2.1.jar:4.2.1]
at org.springframework.cloud.config.server.environment.GoogleSecretManagerEnvironmentRepositoryFactory.build(GoogleSecretManagerEnvironmentRepositoryFactory.java:39) ~[spring-cloud-config-server-4.2.1.jar:4.2.1]
at org.springframework.cloud.config.server.config.GoogleSecretManagerRepositoryConfiguration.googleSecretManagerEnvironmentRepository(EnvironmentRepositoryConfiguration.java:606) ~[spring-cloud-config-server-4.2.1.jar:4.2.1]
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[na:na]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.lambda$instantiate$0(SimpleInstantiationStrategy.java:171) ~[spring-beans-6.2.8.jar:6.2.8]
... 74 common frames omitted
Caused by: java.lang.ClassNotFoundException: com.google.api.client.json.jackson2.JacksonFactory
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[na:na]
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na]
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) ~[na:na]
... 81 common frames omitted
I'm using what I believe to be compatible versions: Spring Boot 3.4.7 Spring Cloud 2024.0.1 Spring Cloud GCP 6.2.2
With the following core dependencies in the build.gradle
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.cloud:spring-cloud-config-server'
implementation 'com.google.cloud:spring-cloud-gcp-starter-secretmanager'
application.yaml
server:
port: 8888
spring:
cloud:
config:
server:
gcp-secret-manager:
order: 1
token-mandatory: false
gcp:
project-id: my-project-id
secretmanager:
enabled: true
allow-default-secret: true
application:
name: config-server
profiles:
active: secret-manager
I'm running it locally for the time being. It is using my Google Application Credentials file which I have full access to the project and can access all secrets via gcloud. As best I can tell I've included the correct gradle dependencies but class not found would imply I'm missing something. Is this an issue or is the configuration incorrect.