Spring Microservices-由以下原因导致:java.lang.ClassNotFoundException:org.springframework.expression.spel.support.SimpleEvaluationContext

时间:2018-08-18 12:21:13

标签: spring spring-boot microservices

我正在跟踪https://dzone.com/articles/quick-guide-to-microservices-with-spring-boot-20-e链接中的教程,而没有进行任何自定义。

我已经按照顺序成功启动了ratings = LOAD '/files/u.data' AS (userID:int, movieID:int,rating:int,ratingTime:int); metadata = LOAD '/files/u.item' USING PigStorage('|') AS (movieID:int, movieTitle:chararray,releaseDate:chararray, videoRelease:charArray,imdbLink:chararray); nameLookup = FOREACH metadata GENERATE movieID, movieTitle, ToUnixTime(ToDate(releaseDate,'dd-MMM-yyyy')) AS releaseTime; ratingsByMovie = GROUP ratings BY movieID; avgRatings = FOREACH ratingsByMovie GENERATE group AS movieID, AVG(ratings.rating) AS avgRating; fiveStarMovies = FILTER avgRatings BY avgRating > 4.0; fiveStarsWithData = JOIN fiveStarMovies BY movieID, nameLookup by movieID; oldestFiveStarMovies = ORDER fiveStarsWithData BY nameLookup::releaseTime; DUMP oldestFiveStarMovies; "config-service""discovery-service"

现在,当我只是尝试启动“网关服务”时,出现以下错误。

有人可以指导我吗?

"proxy-service"

使用Spring Boot Parent版本: enter image description here

1 个答案:

答案 0 :(得分:1)

我仍然不知道它是如何工作的。但是我从“配置服务器”模块中更改了以下“ gateway-service.yml”条目,它开始起作用。

我改变了

spring:
  cloud:
    gateway:
      discovery:
        locator:
          enabled: true

spring:
  cloud:
    gateway:
      discovery:
        locator:
          lowerCaseServiceId: true

我找到了一些很好的链接,可以帮助您进一步了解此问题-

  1. https://github.com/spring-cloud/spring-cloud-gateway/issues/344

  2. https://github.com/spring-cloud/spring-cloud-gateway/issues/123