Java
程序猿编程
这个作者很懒,什么都没留下…
展开
-
springboot项目启动rabbitmq报错org.springframework.amqp.AmqpIOException: java.io.IOException
解决方法:经排查,出现该异常的原因为:rabbitmq连接端口配置有误,注意,访问port是5672,15672是api和管理界面的port.解决:1.检查5672端口是否能访问 2.将15672更换为5672rabbitmq用户没授权Virtual Hosts,进入管理页面授权即可...原创 2021-08-26 15:21:10 · 445 阅读 · 0 评论 -
java请求报错(原因:CORS 头缺少 ‘Access-Control-Allow-Origin‘)
报错信息:已拦截跨源请求:同源策略禁止读取位于 http://localhost:8080/user/getUserSession 的远程资源。(原因:CORS 请求未能成功)。方法一:@RequestMapping(value = "/login", method = RequestMethod.POST)@ResponseBodypublic String signIn(@RequestParam String user, @RequestParam String password, HttpS原创 2021-08-25 22:30:14 · 1629 阅读 · 0 评论 -
jdbc url链接加时区正确方法
在使用mysql的6.0.x以上的jar的时候,需要在代码url的链接里面指定serverTimezone。否则就会出现异常。如果在url中未指定serverTimezoneurl: jdbc:mysql://127.0.0.1:3306/demo?useUnicode=true&characterEncoding=utf-8则会出现:Caused by: com.mysql.cj.core.exceptions.InvalidConnectionAttributeException:The原创 2021-08-22 22:44:16 · 7364 阅读 · 1 评论 -
Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException: The server time zone value
Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException: The server time zone value ‘Öйú±ê׼ʱ¼ä’ is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configurat原创 2021-08-22 15:19:44 · 59 阅读 · 0 评论 -
Could not resolve XML resource [null] with public ID [null], system ID [classes/ajax/dwr_web.xml]
项目运行报错Could not resolve XML resource [null] with public ID [null], system ID [classes/ajax/dwr_web.xml]在tomcat的配置文件context.xml中加上xmlBlockExternal="false"即可解决。原创 2020-12-08 15:28:13 · 602 阅读 · 0 评论 -
535 Login Fail. Please enter your authorization code to login. More information in http://service.ma
给邮箱发布邮件时报错535 Login Fail. Please enter your authorization code to login. More information in http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=28&&no=1001256解决方法:打开http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=28&&原创 2020-11-07 15:23:02 · 11771 阅读 · 0 评论 -
redirect重定向后https变成了http如何解决
spring mvc中,可以直接配置,将redirectHttp10Compatible属性设为false。如下:原创 2020-09-15 13:51:06 · 4092 阅读 · 0 评论 -
SSM项目启动报错More than one fragment with the name [spring_web] was found. This is not legal with relativ
解决办法在项目中的web.xml文件的标签内添加如下标签。如下图所示原创 2020-09-11 10:20:39 · 67 阅读 · 0 评论