【发布时间】:2016-05-07 17:50:46
【问题描述】:
我尝试使用 Spring Cloud Zuul 服务器作为代理服务器,但是当我访问我的默认上下文时,它不会重定向到 url 目标。
例如:
@EnableZuulServer
@SpringBootApplication
public class ZuulServerApp {
private static final Logger LOGGER = LoggerFactory.getLogger(ZuulServerApp.class);
public static void main(String[] args) throws Exception {
// Start Spring application
SpringApplication.run(ZuulServerApp.class, args);
LOGGER.warn("Startup completed and listening");
}
}
application.properties
###################
### Spring Boot ###
###################
server.port=8765
spring.main.show-banner=false
zuul.routes.resource.path=/**
zuul.routes.resource.url=http://www.uol.com.br
zuul.routes.resource.stripPrefix=true
是否缺少任何配置?
http://localhost:8765/ does not redirect to http://www.uol.com.br
【问题讨论】:
标签: java spring spring-boot spring-cloud