problem description
in the springcloud micro-service project, I have a service that is a front-end service, which contains some js, css static files and html pages. The project uses zuul as the gateway route, and then every time you visit the page, the static files needed for this page are routed directly through the zuul gateway, but too many static files are introduced, so it keeps causing timeouts. How to configure and handle them?
related codes
configuration of front-end services
server:
port: 8888
spring:
application:
name: web-service
redis:
host: 47.106.215.35
port: 6379
session:
store-type: redis
rabbitmq:
host: 47.106.215.35
username: guest
password: guest
port: 5672
eureka:
instance:
prefer-ip-address: true -sharpip
client:
service-url:
defaultZone: http://localhost:8761/eureka
routing configuration of zuul
zuul:
routes:
login-register:
path: /loginAndRegister/**
serviceId: login-register
redis-service:
path: /redisService/**
serviceId: redis-service
rabbitmq-service:
path: /rabbitmqService/**
serviceId: rabbitmq-service
web-service:
path: /Biri/**
serviceId: web-service
some static files referenced by the front-end page
**
**
if you use an absolute path when introducing static files, the static files under the zuul service will not time out, because there is no routing forwarding, how to configure them in order to learn micro-services.