示例代码:
server.port=8080 server.servlet.context-path=/api server.tomcat.connectionTimeout=30000 server.tomcat.maxConnections=1000 server.tomcat.maxThreads=200 server.tomcat.maxHttpHeaderSize=16384 server.tomcat.accessLogEnabled=true
management.endpoint.health.show-details=always management.health.db.enabled=true management.health.db.time-to-live=10000 management.health.redis.enabled=true management.health.redis.time-to-live=10000 management.endpoint.health.cache.enabled=true management.endpoint.health.cache.time-to-live=10000
upstream api { server localhost:8080; }
server { listen 80;
location / { proxy_pass http://api; }
location /healthcheck { proxy_pass http://localhost:8080/actuator/health; } }