自建网站(后端)遇到的问题
1.nginx部署包含websocket的项目,报错:Handshake failed due to invalid Upgrade header: null
原因:nginx 反向代理服务器忽略了headers中的:Upgrade:websocket。
解决办法:在 Nginx ,location 中添加以下代码:
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
2.idea打包项目报错:Process terminated
<parent>
<groupId>com.tian</groupId>
<artifactId>huanying</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath/>
</parent>
将其中的<relativePath/>标签删除即可
3.kaptcha在本地正常生成验证码图片,但在linux系统上运行报错
org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.InternalError: java.lang.reflect.InvocationTargetException
操作系统没有FontConfig组件,解决办法 安装相应字体配置组件,需要执行两条命令:
yum install fontconfig
fc-cache –force
浙公网安备 33010602011771号