Microservices-With-Spring-Student-Files icon indicating copy to clipboard operation
Microservices-With-Spring-Student-Files copied to clipboard

Guide doesn't support java 11+

Open iaroslav-vak opened this issue 6 years ago • 0 comments

I was unable to run lab4 guide with latest spring boot atm(2.2.1.RELEASE) and java 11. Even if I add jaxb dependencies here is the cause

...Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'traceFilterRegistration' defined in class path resource [org/springframework/cloud/netflix/eureka/server/EurekaServerAutoConfiguration.class]: 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="httpTraceFilter")}...

After I downgrade spring boot to 2.1.10.RELEASE and added JAXB

    <dependency>
      <groupId>com.sun.xml.bind</groupId>
      <artifactId>jaxb-core</artifactId>
      <version>2.3.0.1</version>
    </dependency>
    <dependency>
      <groupId>javax.xml.bind</groupId>
      <artifactId>jaxb-api</artifactId>
      <version>2.3.1</version>
    </dependency>
    <dependency>
      <groupId>com.sun.xml.bind</groupId>
      <artifactId>jaxb-impl</artifactId>
      <version>2.3.1</version>
    </dependency>

it worked out.

iaroslav-vak avatar Nov 24 '19 14:11 iaroslav-vak