Hi there, similarly to issue #348, I'm having problems upgrading from Finchley.SR2 to Finchley.RELEASE.
Although I use the AmazonS3ClientBuilder to build an AmazonS3Client Bean, it fails to be available in the context:
...Unsatisfied dependency expressed through constructor parameter 0;
nested exception is
org.springframework.beans.factory.NoSuchBeanDefinitionException:
No qualifying bean of type 'com.amazonaws.services.s3.AmazonS3Client' available:
expected at least 1 bean which qualifies as autowire candidate.
Dependency annotations: {}
All I do is change the spring cloud version for this error to arise.
These are my relevant configurations and classes:
build.gradle
buildscript {
ext {
springBootVersion = '2.0.2.RELEASE'
}
...
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath('io.spring.gradle:dependency-management-plugin:1.0.5.RELEASE')
}
}
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:Finchley.SR2"
}
}
dependencies {
...
compile('org.springframework.boot:spring-boot-starter-web')
compile('org.springframework.cloud:spring-cloud-starter-aws')
compile('org.springframework.cloud:spring-cloud-starter-config'
...
}
...
S3Config.java
...
@Configuration
public class S3Config {
@Bean
public AmazonS3 amazonS3() {
return AmazonS3ClientBuilder.standard()
.withCredentials(new DefaultAWSCredentialsProviderChain())
.build();
}
}
Would injecting a org.springframework.cloud.aws.core.io.s3.SimpleStorageProtocolResolver be an appropriate solution, as suggested in the other issue?
I tried to reproduce your issue, but I have no issues with _Finchley.RELEASE_ for your _build.gradle_ , all is ok. Can you reproduce it in a simple project and share it?
Sure, I'll post it as soon as I can :slightly_smiling_face:
Ok, I've scrapped everything I could from the project to generate this sample project:
https://github.com/cavpolloosigu/sample-finchley-release
The only difference is in the build.gradle file.
At work we use Artifactory to keep track of stuff, so we point to it in the repository parts instead of mavenCentral() as I've configured on my sample project. That's why I've been able to point to the RC1 and RC2 versions (not available in maven.apache.org).
And yes, I tested my sample project with the mavenCentral version just to rule out our artifactory copies were somehow broken. Didn't work either. :sweat:
If it is of any help, this is the successful output of the sample project when running on SR2:
/usr/lib/jvm/java-8-oracle/bin/java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:46852,suspend=y,server=n -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=40960 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -javaagent:/home/cavpollo/IntelliJ/plugins/Groovy/lib/agent/gragent.jar -javaagent:/home/cavpollo/IntelliJ/lib/rt/debugger-agent.jar=file:/tmp/capture.props -Dfile.encoding=UTF-8 -classpath /usr/lib/jvm/java-8-oracle/jre/lib/charsets.jar:/usr/lib/jvm/java-8-oracle/jre/lib/deploy.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/cldrdata.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/jaccess.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/jfxrt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/nashorn.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunec.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/zipfs.jar:/usr/lib/jvm/java-8-oracle/jre/lib/javaws.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jce.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jfr.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jfxswt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jsse.jar:/usr/lib/jvm/java-8-oracle/jre/lib/management-agent.jar:/usr/lib/jvm/java-8-oracle/jre/lib/plugin.jar:/usr/lib/jvm/java-8-oracle/jre/lib/resources.jar:/usr/lib/jvm/java-8-oracle/jre/lib/rt.jar:/home/cavpollo/projects/sample_finchley_release/out/production/classes:/opt/gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-web/2.0.2.RELEASE/b6ef0cf4d0a7c6c7e93ff524b84cd1d8f87f67d9/spring-boot-starter-web-2.0.2.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-starter-aws/2.0.0.RC2/75b5e1e5ed64e494ad3c1751be70f40744293744/spring-cloud-starter-aws-2.0.0.RC2.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-starter-config/2.0.0.RC2/21097b488138cd06e2d84c2adb374749bdf5bda8/spring-cloud-starter-config-2.0.0.RC2.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-json/2.0.2.RELEASE/5edda979838ced5314b8f58a958fe9d6b4b3badd/spring-boot-starter-json-2.0.2.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-starter/2.0.0.RC2/bffd52bcb84ffb0ce3e33a2c8f7a61d7d1bff950/spring-cloud-starter-2.0.0.RC2.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter/2.0.2.RELEASE/1cda94f0dfcf2b065191782a54b84d2abf96391/spring-boot-starter-2.0.2.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-tomcat/2.0.2.RELEASE/cedbfb18762e1c220007c768bfc5b773f5b30f8a/spring-boot-starter-tomcat-2.0.2.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.hibernate.validator/hibernate-validator/6.0.9.Final/b149e4cce82379f11f6129eb3187ca8ae5404005/hibernate-validator-6.0.9.Final.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework/spring-webmvc/5.0.6.RELEASE/1361c5d1cf46665ee01de5dc1ca447c3be174c19/spring-webmvc-5.0.6.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-config-client/2.0.0.RC2/a18284d442fbe01ce88710acff1d66ec3a5c3b86/spring-cloud-config-client-2.0.0.RC2.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework/spring-web/5.0.6.RELEASE/89e89de3025165998118590613aedc6df8d64af6/spring-web-5.0.6.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-aws-autoconfigure/2.0.0.RC2/8f494276e680517394642a8e59255a3c0b3221dc/spring-cloud-aws-autoconfigure-2.0.0.RC2.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-aws-context/2.0.0.RC2/3ec1786511ba9a898870a43ecdaa49154ee4b9b9/spring-cloud-aws-context-2.0.0.RC2.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-aws-core/2.0.0.RC2/8b4c9355f14dc3579c0ce4c19b1ea4cc2f23db61/spring-cloud-aws-core-2.0.0.RC2.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-logging/2.0.2.RELEASE/b56d7d1931792d6e58dbd41f956912359ba85238/spring-boot-starter-logging-2.0.2.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-classic/1.2.3/7c4f3c474fb2c041d8028740440937705ebb473a/logback-classic-1.2.3.jar:/opt/gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-to-slf4j/2.10.0/f7e631ccf49cfc0aefa4a2a728da7d374c05bd3c/log4j-to-slf4j-2.10.0.jar:/opt/gradle/caches/modules-2/files-2.1/org.slf4j/jul-to-slf4j/1.7.25/af5364cd6679bfffb114f0dec8a157aaa283b76/jul-to-slf4j-1.7.25.jar:/opt/gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-api/1.7.25/da76ca59f6a57ee3102f8f9bd9cee742973efa8a/slf4j-api-1.7.25.jar:/opt/gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.datatype/jackson-datatype-jdk8/2.9.3/75004a75b8a4d5927211141a679951d39999e6c4/jackson-datatype-jdk8-2.9.3.jar:/opt/gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.9.3/7d739db3f7975d082acbbade17986d018dc473c2/jackson-datatype-jsr310-2.9.3.jar:/opt/gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.module/jackson-module-parameter-names/2.9.3/34c22452e76a4074ef47070c2f5e7a1f0ff95d7/jackson-module-parameter-names-2.9.3.jar:/opt/gradle/caches/modules-2/files-2.1/com.amazonaws/aws-java-sdk-s3/1.11.251/bc737d413156ff6c245402c558bc3768cf04822d/aws-java-sdk-s3-1.11.251.jar:/opt/gradle/caches/modules-2/files-2.1/com.amazonaws/aws-java-sdk-ec2/1.11.251/5fa392ea5e7aea760e5d5fada58f6ec24bd2580f/aws-java-sdk-ec2-1.11.251.jar:/opt/gradle/caches/modules-2/files-2.1/com.amazonaws/aws-java-sdk-cloudformation/1.11.251/2bbd880dfb672a54a8643811faa92fcc0608a16/aws-java-sdk-cloudformation-1.11.251.jar:/opt/gradle/caches/modules-2/files-2.1/com.amazonaws/aws-java-sdk-kms/1.11.251/27ce96e7c63f09d4314ccba21acda7faebaa030e/aws-java-sdk-kms-1.11.251.jar:/opt/gradle/caches/modules-2/files-2.1/com.amazonaws/aws-java-sdk-core/1.11.251/e24f4a18e7fd2211344ef47b15ffb49d6a65132e/aws-java-sdk-core-1.11.251.jar:/opt/gradle/caches/modules-2/files-2.1/com.amazonaws/jmespath-java/1.11.251/4ef07cfbe6cee2507422a589a8d082509c8a7d99/jmespath-java-1.11.251.jar:/opt/gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-databind/2.9.3/193b96ef555b2f2573b576887ba9a93e4bf48e8c/jackson-databind-2.9.3.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-autoconfigure/2.0.2.RELEASE/f4b25e753e4955337a138d8b1550236b5efe5b3b/spring-boot-autoconfigure-2.0.2.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot/2.0.2.RELEASE/15012cf02e9f77938244e554f0598535fdd1cb38/spring-boot-2.0.2.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/javax.annotation/javax.annotation-api/1.3.2/934c04d3cfef185a8008e7bf34331b79730a9d43/javax.annotation-api-1.3.2.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework/spring-context/5.0.6.RELEASE/8b73b742ef0ddce04f0f1068f305de240b00ce0d/spring-context-5.0.6.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework/spring-expression/5.0.6.RELEASE/dec57ae5e6f0dfd4c6cfc199aa13ed268c3e1a65/spring-expression-5.0.6.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework/spring-aop/5.0.6.RELEASE/74078df698992054c1c1a8f705763a6c7b4b914c/spring-aop-5.0.6.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework/spring-beans/5.0.6.RELEASE/d609b83cd8a71650a70778cf8d02c9a05b9161fe/spring-beans-5.0.6.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework/spring-core/5.0.6.RELEASE/984a52455b1be596b7f1a29f62d21d2f483eb764/spring-core-5.0.6.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.yaml/snakeyaml/1.19/2d998d3d674b172a588e54ab619854d073f555b5/snakeyaml-1.19.jar:/opt/gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-websocket/8.5.31/6564e716b89de5eaa0dd234ae7989576503ddf3/tomcat-embed-websocket-8.5.31.jar:/opt/gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-core/8.5.31/f5adf7ed8c34aa005b22b6a2dc7b6796e10e9c79/tomcat-embed-core-8.5.31.jar:/opt/gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-el/8.5.31/3a536e1ac71b82627c3a7408eb38fa0704cb9034/tomcat-embed-el-8.5.31.jar:/opt/gradle/caches/modules-2/files-2.1/javax.validation/validation-api/2.0.1.Final/cb855558e6271b1b32e716d24cb85c7f583ce09e/validation-api-2.0.1.Final.jar:/opt/gradle/caches/modules-2/files-2.1/org.jboss.logging/jboss-logging/3.3.2.Final/3789d00e859632e6c6206adc0c71625559e6e3b0/jboss-logging-3.3.2.Final.jar:/opt/gradle/caches/modules-2/files-2.1/com.fasterxml/classmate/1.3.4/3d5f48f10bbe4eb7bd862f10c0583be2e0053c6/classmate-1.3.4.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-context/2.0.0.RC2/f6d84a868d3d67cc4426c23f2ab9280d77c7f400/spring-cloud-context-2.0.0.RC2.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-commons/2.0.0.RC2/2bca59a30163c6cc84e6730629b27a54cbc9da54/spring-cloud-commons-2.0.0.RC2.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.security/spring-security-rsa/1.0.5.RELEASE/31bd1111ada2f455eb0f492ed09e39deda18ca99/spring-security-rsa-1.0.5.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-annotations/2.9.0/7c10d545325e3a6e72e06381afe469fd40eb701/jackson-annotations-2.9.0.jar:/opt/gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.dataformat/jackson-dataformat-cbor/2.9.3/3e6557add7dfacd1b2d20808486c1298b52f8425/jackson-dataformat-cbor-2.9.3.jar:/opt/gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-core/2.9.3/ea9b6fc7bc3ccba9777b0827091f9aa1f8580371/jackson-core-2.9.3.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework/spring-jcl/5.0.6.RELEASE/295ee4e8657e9c1fd327735c01d5fbce339cc44d/spring-jcl-5.0.6.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.security/spring-security-crypto/5.0.5.RELEASE/23256a0513b1a3c0ede42ae605d6fa25c1241ad/spring-security-crypto-5.0.5.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.bouncycastle/bcpkix-jdk15on/1.56/4648af70268b6fdb24674fb1fd7c1fcc73db1231/bcpkix-jdk15on-1.56.jar:/opt/gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-core/1.2.3/864344400c3d4d92dfeb0a305dc87d953677c03c/logback-core-1.2.3.jar:/opt/gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-api/2.10.0/fec5797a55b786184a537abd39c3fa1449d752d6/log4j-api-2.10.0.jar:/opt/gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpclient/4.5.5/1603dfd56ebcd583ccdf337b6c3984ac55d89e58/httpclient-4.5.5.jar:/opt/gradle/caches/modules-2/files-2.1/software.amazon.ion/ion-java/1.0.2/ee9dacea7726e495f8352b81c12c23834ffbc564/ion-java-1.0.2.jar:/opt/gradle/caches/modules-2/files-2.1/joda-time/joda-time/2.9.9/f7b520c458572890807d143670c9b24f4de90897/joda-time-2.9.9.jar:/opt/gradle/caches/modules-2/files-2.1/org.bouncycastle/bcprov-jdk15on/1.56/a153c6f9744a3e9dd6feab5e210e1c9861362ec7/bcprov-jdk15on-1.56.jar:/opt/gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.4.9/a86ce739e5a7175b4b234c290a00a5fdb80957a0/httpcore-4.4.9.jar:/opt/gradle/caches/modules-2/files-2.1/commons-codec/commons-codec/1.11/3acb4705652e16236558f0f4f2192cc33c3bd189/commons-codec-1.11.jar:/home/cavpollo/IntelliJ/lib/idea_rt.jar com.sample.Application
Connected to the target VM, address: '127.0.0.1:46852', transport: 'socket'
2018-07-02 19:51:52.253 INFO 17748 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@5be46f9d: startup date [Mon Jul 02 19:51:52 CST 2018]; root of context hierarchy
2018-07-02 19:51:52.671 INFO 17748 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$7db5e173] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.0.2.RELEASE)
2018-07-02 19:51:52.909 INFO 17748 --- [ main] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at: http://localhost:8888
2018-07-02 19:51:57.559 INFO 17748 --- [ main] c.c.c.ConfigServicePropertySourceLocator : Located environment: name=application, profiles=[default], label=null, version=31a8f6cc638d5ac9728655aee04e6a20c0f9486b, state=null
2018-07-02 19:51:57.559 INFO 17748 --- [ main] b.c.PropertySourceBootstrapConfiguration : Located property source: CompositePropertySource {name='configService', propertySources=[MapPropertySource {name='configClient'}, MapPropertySource {name='https://github.com/pay-code/config-repo.git/application.yml'}]}
2018-07-02 19:51:57.600 INFO 17748 --- [ main] com.sample.Application : No active profile set, falling back to default profiles: default
2018-07-02 19:51:57.620 INFO 17748 --- [ main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@1b28f282: startup date [Mon Jul 02 19:51:57 CST 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@5be46f9d
2018-07-02 19:52:01.113 INFO 17748 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=21a3bda8-7bfe-39fc-a889-72703298fce7
2018-07-02 19:52:01.581 INFO 17748 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$7db5e173] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-07-02 19:52:01.975 INFO 17748 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2018-07-02 19:52:01.997 INFO 17748 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2018-07-02 19:52:01.997 INFO 17748 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.31
2018-07-02 19:52:02.002 INFO 17748 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
2018-07-02 19:52:02.128 INFO 17748 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2018-07-02 19:52:02.128 INFO 17748 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 4508 ms
2018-07-02 19:52:02.237 INFO 17748 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Servlet dispatcherServlet mapped to [/]
2018-07-02 19:52:02.241 INFO 17748 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2018-07-02 19:52:02.241 INFO 17748 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2018-07-02 19:52:02.241 INFO 17748 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2018-07-02 19:52:02.241 INFO 17748 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2018-07-02 19:52:02.360 INFO 17748 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-07-02 19:52:02.595 INFO 17748 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@1b28f282: startup date [Mon Jul 02 19:51:57 CST 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@5be46f9d
2018-07-02 19:52:02.654 INFO 17748 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2018-07-02 19:52:02.656 INFO 17748 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2018-07-02 19:52:02.686 INFO 17748 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-07-02 19:52:02.686 INFO 17748 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-07-02 19:52:03.007 INFO 17748 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2018-07-02 19:52:03.016 INFO 17748 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'configurationPropertiesRebinder' has been autodetected for JMX exposure
2018-07-02 19:52:03.017 INFO 17748 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'environmentManager' has been autodetected for JMX exposure
2018-07-02 19:52:03.018 INFO 17748 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'refreshScope' has been autodetected for JMX exposure
2018-07-02 19:52:03.022 INFO 17748 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'environmentManager': registering with JMX server as MBean [org.springframework.cloud.context.environment:name=environmentManager,type=EnvironmentManager]
2018-07-02 19:52:03.035 INFO 17748 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'refreshScope': registering with JMX server as MBean [org.springframework.cloud.context.scope.refresh:name=refreshScope,type=RefreshScope]
2018-07-02 19:52:03.045 INFO 17748 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'configurationPropertiesRebinder': registering with JMX server as MBean [org.springframework.cloud.context.properties:name=configurationPropertiesRebinder,context=1b28f282,type=ConfigurationPropertiesRebinder]
2018-07-02 19:52:03.079 INFO 17748 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2018-07-02 19:52:03.083 INFO 17748 --- [ main] com.sample.Application : Started Application in 11.888 seconds (JVM running for 13.549)
And this is the unsuccessful output when running on RELEASE:
/usr/lib/jvm/java-8-oracle/bin/java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:46408,suspend=y,server=n -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=35951 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -javaagent:/home/cavpollo/IntelliJ/plugins/Groovy/lib/agent/gragent.jar -javaagent:/home/cavpollo/IntelliJ/lib/rt/debugger-agent.jar=file:/tmp/capture.props -Dfile.encoding=UTF-8 -classpath /usr/lib/jvm/java-8-oracle/jre/lib/charsets.jar:/usr/lib/jvm/java-8-oracle/jre/lib/deploy.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/cldrdata.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/jaccess.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/jfxrt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/nashorn.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunec.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/zipfs.jar:/usr/lib/jvm/java-8-oracle/jre/lib/javaws.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jce.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jfr.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jfxswt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jsse.jar:/usr/lib/jvm/java-8-oracle/jre/lib/management-agent.jar:/usr/lib/jvm/java-8-oracle/jre/lib/plugin.jar:/usr/lib/jvm/java-8-oracle/jre/lib/resources.jar:/usr/lib/jvm/java-8-oracle/jre/lib/rt.jar:/home/cavpollo/projects/sample_finchley_release/out/production/classes:/opt/gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-web/2.0.2.RELEASE/b6ef0cf4d0a7c6c7e93ff524b84cd1d8f87f67d9/spring-boot-starter-web-2.0.2.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-starter-aws/2.0.0.RELEASE/e3ab0e67844acd1d30bf6d8a7796142271862354/spring-cloud-starter-aws-2.0.0.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-starter-config/2.0.0.RELEASE/42f8c6a92ef1a09239e38a1cf65293ffde1b181c/spring-cloud-starter-config-2.0.0.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-json/2.0.2.RELEASE/5edda979838ced5314b8f58a958fe9d6b4b3badd/spring-boot-starter-json-2.0.2.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-starter/2.0.0.RELEASE/247ea27d9483e9806f539f6031af135a6a3645f/spring-cloud-starter-2.0.0.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter/2.0.2.RELEASE/1cda94f0dfcf2b065191782a54b84d2abf96391/spring-boot-starter-2.0.2.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-tomcat/2.0.2.RELEASE/cedbfb18762e1c220007c768bfc5b773f5b30f8a/spring-boot-starter-tomcat-2.0.2.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.hibernate.validator/hibernate-validator/6.0.9.Final/b149e4cce82379f11f6129eb3187ca8ae5404005/hibernate-validator-6.0.9.Final.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework/spring-webmvc/5.0.6.RELEASE/1361c5d1cf46665ee01de5dc1ca447c3be174c19/spring-webmvc-5.0.6.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-config-client/2.0.0.RELEASE/7a3f4447664c61ff674c29a9b2ff0dc988dee316/spring-cloud-config-client-2.0.0.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework/spring-web/5.0.6.RELEASE/89e89de3025165998118590613aedc6df8d64af6/spring-web-5.0.6.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-aws-autoconfigure/2.0.0.RELEASE/5b106890732906c6f86b3a63ac1ccbb988d625a8/spring-cloud-aws-autoconfigure-2.0.0.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-aws-context/2.0.0.RELEASE/c4a129410cbe7103ceb2da46c92bea9fb05a06f6/spring-cloud-aws-context-2.0.0.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-aws-core/2.0.0.RELEASE/475c8517a5aae1da038134c1f61f146335456edd/spring-cloud-aws-core-2.0.0.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-logging/2.0.2.RELEASE/b56d7d1931792d6e58dbd41f956912359ba85238/spring-boot-starter-logging-2.0.2.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-classic/1.2.3/7c4f3c474fb2c041d8028740440937705ebb473a/logback-classic-1.2.3.jar:/opt/gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-to-slf4j/2.10.0/f7e631ccf49cfc0aefa4a2a728da7d374c05bd3c/log4j-to-slf4j-2.10.0.jar:/opt/gradle/caches/modules-2/files-2.1/org.slf4j/jul-to-slf4j/1.7.25/af5364cd6679bfffb114f0dec8a157aaa283b76/jul-to-slf4j-1.7.25.jar:/opt/gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-api/1.7.25/da76ca59f6a57ee3102f8f9bd9cee742973efa8a/slf4j-api-1.7.25.jar:/opt/gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.datatype/jackson-datatype-jdk8/2.9.5/23e37f085279ba316c0df923513b81609e1d1f6/jackson-datatype-jdk8-2.9.5.jar:/opt/gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.9.5/d1f0d11e816bc04e222a261106ca138801841c2d/jackson-datatype-jsr310-2.9.5.jar:/opt/gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.module/jackson-module-parameter-names/2.9.5/f824c60751ffb7bfc3a0d30dfe0e42317d8e67f5/jackson-module-parameter-names-2.9.5.jar:/opt/gradle/caches/modules-2/files-2.1/com.amazonaws/aws-java-sdk-s3/1.11.336/94eabca535897b3f71de7df4536e61eec159ad0/aws-java-sdk-s3-1.11.336.jar:/opt/gradle/caches/modules-2/files-2.1/com.amazonaws/aws-java-sdk-ec2/1.11.336/72113ebc397efd44a8911cccbfe0f6bcdb29392f/aws-java-sdk-ec2-1.11.336.jar:/opt/gradle/caches/modules-2/files-2.1/com.amazonaws/aws-java-sdk-cloudformation/1.11.336/7d1d56be2787c9385e0fcef737802e0c56f3eba1/aws-java-sdk-cloudformation-1.11.336.jar:/opt/gradle/caches/modules-2/files-2.1/com.amazonaws/aws-java-sdk-kms/1.11.336/acb59583e19fb1daaafaa0cc8d94daaf6ee56d85/aws-java-sdk-kms-1.11.336.jar:/opt/gradle/caches/modules-2/files-2.1/com.amazonaws/aws-java-sdk-core/1.11.336/843b0108a4a0d437182c3b155cda229d78c66c47/aws-java-sdk-core-1.11.336.jar:/opt/gradle/caches/modules-2/files-2.1/com.amazonaws/jmespath-java/1.11.336/2ffaab56cec055a6e63aeb569d69fead74261dc5/jmespath-java-1.11.336.jar:/opt/gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-databind/2.9.5/3490508379d065fe3fcb80042b62f630f7588606/jackson-databind-2.9.5.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-autoconfigure/2.0.2.RELEASE/f4b25e753e4955337a138d8b1550236b5efe5b3b/spring-boot-autoconfigure-2.0.2.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot/2.0.2.RELEASE/15012cf02e9f77938244e554f0598535fdd1cb38/spring-boot-2.0.2.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/javax.annotation/javax.annotation-api/1.3.2/934c04d3cfef185a8008e7bf34331b79730a9d43/javax.annotation-api-1.3.2.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework/spring-context/5.0.6.RELEASE/8b73b742ef0ddce04f0f1068f305de240b00ce0d/spring-context-5.0.6.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework/spring-expression/5.0.6.RELEASE/dec57ae5e6f0dfd4c6cfc199aa13ed268c3e1a65/spring-expression-5.0.6.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework/spring-aop/5.0.6.RELEASE/74078df698992054c1c1a8f705763a6c7b4b914c/spring-aop-5.0.6.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework/spring-beans/5.0.6.RELEASE/d609b83cd8a71650a70778cf8d02c9a05b9161fe/spring-beans-5.0.6.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework/spring-core/5.0.6.RELEASE/984a52455b1be596b7f1a29f62d21d2f483eb764/spring-core-5.0.6.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.yaml/snakeyaml/1.19/2d998d3d674b172a588e54ab619854d073f555b5/snakeyaml-1.19.jar:/opt/gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-websocket/8.5.31/6564e716b89de5eaa0dd234ae7989576503ddf3/tomcat-embed-websocket-8.5.31.jar:/opt/gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-core/8.5.31/f5adf7ed8c34aa005b22b6a2dc7b6796e10e9c79/tomcat-embed-core-8.5.31.jar:/opt/gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-el/8.5.31/3a536e1ac71b82627c3a7408eb38fa0704cb9034/tomcat-embed-el-8.5.31.jar:/opt/gradle/caches/modules-2/files-2.1/javax.validation/validation-api/2.0.1.Final/cb855558e6271b1b32e716d24cb85c7f583ce09e/validation-api-2.0.1.Final.jar:/opt/gradle/caches/modules-2/files-2.1/org.jboss.logging/jboss-logging/3.3.2.Final/3789d00e859632e6c6206adc0c71625559e6e3b0/jboss-logging-3.3.2.Final.jar:/opt/gradle/caches/modules-2/files-2.1/com.fasterxml/classmate/1.3.4/3d5f48f10bbe4eb7bd862f10c0583be2e0053c6/classmate-1.3.4.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-context/2.0.0.RELEASE/3f0d28344c0dc74eb8594f3f3dd6f82c687be198/spring-cloud-context-2.0.0.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-commons/2.0.0.RELEASE/54ba9a1ace0a8c8e0dd0cdf30e59def4700ab854/spring-cloud-commons-2.0.0.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.security/spring-security-rsa/1.0.5.RELEASE/31bd1111ada2f455eb0f492ed09e39deda18ca99/spring-security-rsa-1.0.5.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-annotations/2.9.0/7c10d545325e3a6e72e06381afe469fd40eb701/jackson-annotations-2.9.0.jar:/opt/gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.dataformat/jackson-dataformat-cbor/2.9.5/e3ceeb7bbfcc3d36a1abcc5ed9544d5298e65f39/jackson-dataformat-cbor-2.9.5.jar:/opt/gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-core/2.9.5/a22ac51016944b06fd9ffbc9541c6e7ce5eea117/jackson-core-2.9.5.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework/spring-jcl/5.0.6.RELEASE/295ee4e8657e9c1fd327735c01d5fbce339cc44d/spring-jcl-5.0.6.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.springframework.security/spring-security-crypto/5.0.5.RELEASE/23256a0513b1a3c0ede42ae605d6fa25c1241ad/spring-security-crypto-5.0.5.RELEASE.jar:/opt/gradle/caches/modules-2/files-2.1/org.bouncycastle/bcpkix-jdk15on/1.56/4648af70268b6fdb24674fb1fd7c1fcc73db1231/bcpkix-jdk15on-1.56.jar:/opt/gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-core/1.2.3/864344400c3d4d92dfeb0a305dc87d953677c03c/logback-core-1.2.3.jar:/opt/gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-api/2.10.0/fec5797a55b786184a537abd39c3fa1449d752d6/log4j-api-2.10.0.jar:/opt/gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpclient/4.5.5/1603dfd56ebcd583ccdf337b6c3984ac55d89e58/httpclient-4.5.5.jar:/opt/gradle/caches/modules-2/files-2.1/software.amazon.ion/ion-java/1.0.2/ee9dacea7726e495f8352b81c12c23834ffbc564/ion-java-1.0.2.jar:/opt/gradle/caches/modules-2/files-2.1/joda-time/joda-time/2.9.9/f7b520c458572890807d143670c9b24f4de90897/joda-time-2.9.9.jar:/opt/gradle/caches/modules-2/files-2.1/org.bouncycastle/bcprov-jdk15on/1.56/a153c6f9744a3e9dd6feab5e210e1c9861362ec7/bcprov-jdk15on-1.56.jar:/opt/gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.4.9/a86ce739e5a7175b4b234c290a00a5fdb80957a0/httpcore-4.4.9.jar:/opt/gradle/caches/modules-2/files-2.1/commons-codec/commons-codec/1.11/3acb4705652e16236558f0f4f2192cc33c3bd189/commons-codec-1.11.jar:/home/cavpollo/IntelliJ/lib/idea_rt.jar com.sample.Application
Connected to the target VM, address: '127.0.0.1:46408', transport: 'socket'
2018-07-02 19:53:02.197 INFO 18039 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@6c61a903: startup date [Mon Jul 02 19:53:02 CST 2018]; root of context hierarchy
2018-07-02 19:53:02.599 INFO 18039 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$6311e07d] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.0.2.RELEASE)
2018-07-02 19:53:02.911 INFO 18039 --- [ main] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at : http://localhost:8888
2018-07-02 19:53:07.817 INFO 18039 --- [ main] c.c.c.ConfigServicePropertySourceLocator : Located environment: name=application, profiles=[default], label=null, version=31a8f6cc638d5ac9728655aee04e6a20c0f9486b, state=null
2018-07-02 19:53:07.818 INFO 18039 --- [ main] b.c.PropertySourceBootstrapConfiguration : Located property source: CompositePropertySource {name='configService', propertySources=[MapPropertySource {name='configClient'}, MapPropertySource {name='https://github.com/pay-code/config-repo.git/application.yml'}]}
2018-07-02 19:53:07.856 INFO 18039 --- [ main] com.sample.Application : No active profile set, falling back to default profiles: default
2018-07-02 19:53:07.868 INFO 18039 --- [ main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@6a988392: startup date [Mon Jul 02 19:53:07 CST 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@6c61a903
2018-07-02 19:53:12.046 INFO 18039 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=f47205de-05ac-38fd-936b-8f903a6327be
2018-07-02 19:53:12.115 INFO 18039 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$6311e07d] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-07-02 19:53:12.354 INFO 18039 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2018-07-02 19:53:12.377 INFO 18039 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2018-07-02 19:53:12.377 INFO 18039 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.31
2018-07-02 19:53:12.384 INFO 18039 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
2018-07-02 19:53:12.472 INFO 18039 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2018-07-02 19:53:12.472 INFO 18039 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 4604 ms
2018-07-02 19:53:12.627 INFO 18039 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Servlet dispatcherServlet mapped to [/]
2018-07-02 19:53:12.632 INFO 18039 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2018-07-02 19:53:12.633 INFO 18039 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2018-07-02 19:53:12.633 INFO 18039 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2018-07-02 19:53:12.633 INFO 18039 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2018-07-02 19:53:12.668 WARN 18039 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'storageService' defined in file [/home/cavpollo/projects/sample_finchley_release/out/production/classes/com/sample/storage/service/StorageService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.amazonaws.services.s3.AmazonS3Client' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
2018-07-02 19:53:12.669 INFO 18039 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2018-07-02 19:53:12.684 INFO 18039 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2018-07-02 19:53:12.784 ERROR 18039 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Parameter 0 of constructor in com.sample.storage.service.StorageService required a bean of type 'com.amazonaws.services.s3.AmazonS3Client' that could not be found.
Action:
Consider defining a bean of type 'com.amazonaws.services.s3.AmazonS3Client' in your configuration.
Disconnected from the target VM, address: '127.0.0.1:46408', transport: 'socket'
Process finished with exit code 1
You expect here an AmazonS3Client, but you provide a bean with only an AmazonS3.
During components scan phase and autowiring there is no yet a target instance information, that's how Spring fails to find AmazonS3Client bean, because there is just now one with this type.
I'm sure when you change AmazonS3 amazonS3() bean to return an AmazonS3Client type it is going to work well.
The problem with the previous version that BeanPostProcessor for S3 eagerly loaded beans from the application context, too early.
So, that worked for your just coincidental, but that doesn't mean that solution was correct before.
Also I would suggest to make that amazonS3() bean definition as static method do not cause any "early BeanFactory access" syndromes. Just because a new SimpleStorageProtocolResolver is still for early application context phase.
@artembilan Thanks for your time and through explanation =)
What you say makes sense. I'll update the code as soon as I can and let you know how things go.
As suggested, I've casted the response as an AmazonS3Client and made the method static, and things are back to normal:
@Configuration
public class S3Config {
@Bean
public static AmazonS3Client amazonS3Client() {
return (AmazonS3Client) AmazonS3ClientBuilder.standard()
.withCredentials(new DefaultAWSCredentialsProviderChain())
.build();
}
}
Thanks for the help :grin:
Closing as answered.
Most helpful comment
As suggested, I've casted the response as an
AmazonS3Clientand made the methodstatic, and things are back to normal:Thanks for the help :grin: