1
我試圖使用Spring Cloud Zuul服務器作爲代理服務器,但是當我訪問我的默認上下文時,它不會重定向到url目標。如何將Spring Cloud Zuul服務器設置爲代理服務器
例如:
@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