springboot
Y-Meta
这个作者很懒,什么都没留下…
展开
-
nginx代理后ip丢失问题
nginx.conf中配置请求头处理: proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 配置后请求头中ip将会采用累加的形式即:IP1,IP2,… 获取真实访问ip工具类如下: import org.apache.commons.lang3.StringUtils; import javax.servlet.http.HttpServletRequest; public class IpAddressUtil { /**原创 2021-04-20 09:15:59 · 1175 阅读 · 0 评论 -
logback-spring.xml文件配置参考
<?xml version="1.0" encoding="UTF-8"?> <configuration scan="true" scanPeriod="60 seconds" debug="false"> <contextName>logback</contextName> <!-- 日志级别排序为: TRACE < DEBUG < INFO < WARN < ERROR --> <!--控原创 2020-12-23 14:38:28 · 418 阅读 · 0 评论 -
Failed to start bean ‘documentationPluginsBootstrapper‘,引入swagger时guava报错
Failed to start bean ‘documentationPluginsBootstrapper’ 报错详情 2020-10-12 10:31:27.880 WARN 12548 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springfr原创 2020-10-12 10:36:22 · 787 阅读 · 0 评论