微服务SpringCloud关于使用GATEWAY后静态资源失效问题
我们都知道,既然gateway作为网关用来路由转发的话,静态资源自然也是可以通过网关转发自内网获取静态资源/static/**是静态资源的路由routes:- id: oauth2-api-routeuri: lb://micro-oauth2-apipredicates:- Path=/api/**,/static/**记得也要加上/static/<script th:src="@{/st
·
我们都知道,既然gateway作为网关用来路由转发的话,静态资源自然也是可以通过网关转发自内网获取静态资源
/static/**是静态资源的路由
routes:
- id: oauth2-api-route
uri: lb://micro-oauth2-api
predicates:
- Path=/api/**,/static/**
记得也要加上/static/
<script th:src="@{/static/js/app.js}"></script>
更多推荐
已为社区贡献1条内容
所有评论(0)