spring-cloud-netflix
spring-cloud-netflix copied to clipboard
Spring Cloud and Spring Boot 2 not working properly
First of all, I remove the folders from .m2 and .gradle trying to solve the issue but nothing works. I'm trying yo create custom actuator inside eureka server similar as this custom actuator endpoint
My output is this :
2018-07-18 14:27:54.780 ERROR 3294 --- [ost-startStop-1] o.s.b.c.embedded.tomcat.TomcatStarter : Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. Message: Error creating bean with name 'traceFilterRegistration' defined in org.springframework.cloud.netflix.eureka.server.EurekaServerConfiguration: Unsatisfied dependency expressed through method 'traceFilterRegistration' parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'javax.servlet.Filter' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Qualifier(value=webRequestLoggingFilter)}
2018-07-18 14:27:54.804 WARN 3294 --- [ restartedMain] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
2018-07-18 14:27:54.906 ERROR 3294 --- [ restartedMain] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Parameter 0 of method traceFilterRegistration in org.springframework.cloud.netflix.eureka.server.EurekaServerConfiguration required a bean of type 'javax.servlet.Filter' that could not be found.
- Bean method 'resourceUrlEncodingFilter' in 'FreeMarkerAutoConfiguration.FreeMarkerWebConfiguration' not loaded because @ConditionalOnEnabledResourceChain did not find class org.webjars.WebJarAssetLocator
- Bean method 'remoteDevToolsDispatcherFilter' not loaded because @ConditionalOnProperty (spring.devtools.remote.secret) did not find property 'secret'
Action:
Consider revisiting the conditions above or defining a bean of type 'javax.servlet.Filter' in your configuration.
This is my application.yml:
server:
port: 8761
eureka:
client:
registerWithEureka: false
fetchRegistry: false
serviceUrl:
defaultZone: http://localhost:8761/eureka/
server:
waitTimeInMsWhenSyncEmpty: 0
eviction-interval-timer-in-ms: 5000
enableSelfPreservation: false
endpoints:
myhealth:
enabled: true
And these are my dependencies:
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:Camden.BUILD-SNAPSHOT"
}
}
dependencies {
compile group: 'org.springframework.boot', name: 'spring-boot-starter', version: '2.0.0.M7'
compile group: 'org.springframework', name: 'spring-webmvc', version: '5.0.7.RELEASE'
compile 'org.springframework.cloud:spring-cloud-starter-eureka-server'
compile 'org.springframework.cloud:spring-cloud-starter-config'
compile 'org.springframework.boot:spring-boot-starter-actuator'
compile group: 'org.springframework.ws', name: 'spring-ws', version: '1.5.2', ext: 'pom'
compile group: 'org.springframework.ws', name: 'spring-ws-core', version: '3.0.1.RELEASE'
compile group: 'org.springframework.boot', name: 'spring-boot-actuator', version: '2.0.2.RELEASE'
compile 'org.springframework.boot:spring-boot-starter-web'
compile 'org.springframework.boot:spring-boot-devtools'
compile 'org.projectlombok:lombok'
testCompile 'org.springframework.boot:spring-boot-starter-test'
testCompile "junit:junit"
}
Is there a reason for that? Compatibility problems?
Regards
I am not sure what is causing your issue, but you should get your dependencies in line: mavenBom "org.springframework.cloud:spring-cloud-dependencies:Finchley.RELEASE" mavenBom "org.springframework.boot:spring-boot-dependencies:2.0.3.RELEASE"
You should be able to remove the version from your dependencies.
Closing as answered