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