數據庫問題
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) ~[na:1.8.0_121]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_121]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_121]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_121]
2020-02-07
我能正常啟動,但是沒有生成表。大哥碰見過這個問題嗎
2020-02-07 09:42:09.125? INFO 9824 --- [? ? ? ? ? ?main] c.i.luckymoney.LuckymoneyApplication? ? ?: Starting LuckymoneyApplication on v_rslv-NB2 with PID 9824 (D:\softwore\Idea\Project\luckymoney\target\classes started by v_rslv in D:\softwore\Idea\Project\luckymoney)
2020-02-07 09:42:09.128? INFO 9824 --- [? ? ? ? ? ?main] c.i.luckymoney.LuckymoneyApplication? ? ?: The following profiles are active: dev
2020-02-07 09:42:09.946? INFO 9824 --- [? ? ? ? ? ?main] o.s.b.w.embedded.tomcat.TomcatWebServer? : Tomcat initialized with port(s): 8081 (http)
2020-02-07 09:42:09.960? INFO 9824 --- [? ? ? ? ? ?main] o.apache.catalina.core.StandardService? ?: Starting service [Tomcat]
2020-02-07 09:42:09.960? INFO 9824 --- [? ? ? ? ? ?main] org.apache.catalina.core.StandardEngine? : Starting Servlet engine: [Apache Tomcat/9.0.16]
2020-02-07 09:42:09.965? INFO 9824 --- [? ? ? ? ? ?main] o.a.catalina.core.AprLifecycleListener? ?: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [C:\Program Files\Java\jdk1.8.0_191\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\Java\jdk1.8.0_191;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\libnvvp;D:\softwore\Anaconda;D:\softwore\Anaconda\Library\mingw-w64\bin;D:\softwore\Anaconda\Library\usr\bin;D:\softwore\Anaconda\Library\bin;D:\softwore\Anaconda\Scripts;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;D:\softwore\MATLAB\runtime\win64;D:\softwore\MATLAB\bin;D:\softwore\Python36\Scripts;D:\softwore\Python36;D:\softwore\Node\;C:\Users\v_rslv\AppData\Roaming\npm\node_modules\npm;D:\softwore\Go\bin;D:\softwore\Git\Git\cmd;C:\Program Files\Java\jdk1.8.0_191\bin;C:\Program Files\Java\jre1.8.0_191\bin;C:\Program Files\MySQL\MySQL Server 5.7\bin;D:\softwore\Maven\apache-maven-3.6.3-bin\apache-maven-3.6.3\bin;C:\Program Files\MySQL\MySQL Shell 8.0\bin\;D:\softwore\Python36\Scripts\;D:\softwore\Python36\;C:\Users\v_rslv\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Java;C:\Users\v_rslv\AppData\Roaming\npm;D:\softwore\VScode\Microsoft VS Code\bin;C:\Users\v_rslv\go\bin;D:\softwore\SSH secure shell client;D:\softwore\Idea\IntelliJ IDEA 2019.3.2\bin;;.]
2020-02-07 09:42:10.097? INFO 9824 --- [? ? ? ? ? ?main] o.a.c.c.C.[.[localhost].[/luckymoney]? ? : Initializing Spring embedded WebApplicationContext
2020-02-07 09:42:10.097? INFO 9824 --- [? ? ? ? ? ?main] o.s.web.context.ContextLoader? ? ? ? ? ? : Root WebApplicationContext: initialization completed in 940 ms
2020-02-07 09:42:10.258? INFO 9824 --- [? ? ? ? ? ?main] o.s.s.concurrent.ThreadPoolTaskExecutor? : Initializing ExecutorService 'applicationTaskExecutor'
2020-02-07 09:42:10.403? INFO 9824 --- [? ? ? ? ? ?main] o.s.b.w.embedded.tomcat.TomcatWebServer? : Tomcat started on port(s): 8081 (http) with context path '/luckymoney'
2020-02-07 09:42:10.405? INFO 9824 --- [? ? ? ? ? ?main] c.i.luckymoney.LuckymoneyApplication? ? ?: Started LuckymoneyApplication in 1.587 seconds (JVM running for 2.372)
2020-02-05
該問題是MySql本身的時區設置的問題導致的,MySql安裝默認設置為美國時區,而北京時間比美國遲8小時
2020-01-28
UTC是全球標準時間
保證MySQL和JAVA插入的時區一致應該就行
2020-01-15
我也是這個問題,感謝
2019-11-22
serverTimezone=UTC?網上查找后確實有用,但是不明白為什么會出現這個問題