首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
您找到你想要的搜索结果了吗?
是的
没有找到

关于在服务器上发布网站遇到的两个问题之解决方案

背景:使用SSM框架+MySql编写的网站,在windows平台上发布。 在自己服务器以及本地发布都正常,交付客户是,在他的阿里云服务器上部署出现以下两个问题: 1.安装Java和Tomcat之后,打包放入网站,启动Tomcat服务器,正常,没有任何异常,但是通过IP地址,或者Localhost访问网站,页面数据能正常显示,但是所有的css,js,图片等静态资源全部都不能加载,network显示500异常。 2.程序某些表中的文件查询没有结果,但是控制台输出的sql语句直接粘贴在图形化软件中,能查询出数据。注:只是某些表查不出来数据。 解决方案: 1.从防火墙,到网络限制,等等都考虑了,无果,最后从网上看到原因是Jdk1.8不支持Spring3.x,无奈将1.8删除,安装1.7,然后正常了,接下来出现了2的问题。 2.删除数据库,重新导入数据文件,远程粘贴数据表,等等,也是尝试N多方案,最后想起来我新建数据库的时候没有选择字符编码,当时考虑会使用默认的编码方式(因为我安装数据库的时候都选择默认编码方式utf-8,有的mysql版本支持选择,有的不支持。),谁知道这个数据库别人没有选择,所以我又将数据库编码方式修改为utf-8,如下图

02

解决Java应用程序中的SQLException:服务器时区值未识别问题;MySQL连接问题:服务器时区值 ‘Öйú±ê׼ʱ¼ä‘ 未被识别的解决方法

java.sql.SQLException: 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 configuration property) to use a more specifc time zone value if you want to utilize time zone support. at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:127) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:95) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:87) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:61) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:71) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:76) at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:862) at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:444) at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:230) at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:226) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:247) at BookManagement.<init>(BookManagement.java:22) at BookManagement.main(BookManagement.java:64) 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 configuration property) to use a more specifc time zone value if you want to utilize time zone support. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.mysql.cj.exceptions.ExceptionFactory.cre

01
领券