我们都知道,既然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>