Closed benneq closed 7 years ago
And this is not a problem in Dalston or Edgware?
I downloaded another sample project and set up a similar configuration to mine. I don't know if it's Dalston or Edgware.
I can tell that It's using spring-cloud-starter-zuul 1.2.3 and spring-boot 1.4.4
This works without specifying stripPrefix
.
When I update this project to use Spring Boot 2.0.0 M1 and Finchley.BUILD-SNAPSHOT I again get the exception above.
FYI we are not compatible with Spring Boot 2.0.0 M1. only BUILD-SNAPSHOT
It doesn't make much sense to me as they are unrelated. Can you try with spring boot snapshots?
I will try Spring Boot Snapshot in a few minutes. Will report soon.
Btw: According to your release schedule Finchley M1 will be out in 6 days. Will this be working with Spring Boot 2.0.0 M1?
It will need to be adjusted as we are waiting for Spring Boot 2.0.0.M2
I now deleted my whole ~/.m2/
folder and let maven redownload all snapshot builds.
It downloaded Spring Boot 2.0.0 SNAPSHOT, Spring 5.0.0 SNAPSHOT and Spring Cloud Starter 2.0.0 SNAPSHOT
Now I can't even start, because:
Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/context/ApplicationEvent
at org.demo.eurekaserver.EurekaServerApplication.main(EurekaServerApplication.java:13)
at org.demo.app.Application.main(Application.java:12)
Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationEvent
But this sounds more like a Spring Boot SNAPSHOT bug to me, unrelated to Spring Cloud.
Here's my pom.xml
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.0.BUILD-SNAPSHOT</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<spring-cloud.version>Finchley.BUILD-SNAPSHOT</spring-cloud.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-config-server</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-eureka-server</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zuul</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
EDIT the error above was some maven problem, it downloaded a corrupt file. will report the results soon
RESULTS
This seems to work as expected 👍 using Spring Cloud Starter 2.0.0 SNAPSHOT, Spring Boot 2.0.0 SNAPSHOT and Spring 5.0.0 SNAPSHOT
--
Now I'm back at Spring Cloud Starter 2.0.0 SNAPSHOT, Spring Boot 2.0.0 M1 and Spring 5.0.0 RC1 again getting the error from above.
--
Though I guess you can close this, and it will magically work with the next release 👍
Thank you!
I'm using Spring Boot 2.0.0 M1 and Spring Cloud Finchley.BUILD-SNAPSHOT
Really strange behavior. My Zuul Config looks like this:
When I set
stripPrefix
totrue
orfalse
everything works as expected.But when I don't specify it, every call to
/articles/...
results in an exception: