亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

數據庫問題

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]


正在回答

5 回答

我能正常啟動,但是沒有生成表。大哥碰見過這個問題嗎

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)


0 回復 有任何疑惑可以回復我~

該問題是MySql本身的時區設置的問題導致的,MySql安裝默認設置為美國時區,而北京時間比美國遲8小時


0 回復 有任何疑惑可以回復我~

url:?jdbc:mysql://127.0.0.1:3306/luckymoney?serverTimezone=Asia/Shanghai

UTC是全球標準時間

保證MySQL和JAVA插入的時區一致應該就行


0 回復 有任何疑惑可以回復我~

我也是這個問題,感謝

0 回復 有任何疑惑可以回復我~

serverTimezone=UTC?網上查找后確實有用,但是不明白為什么會出現這個問題

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
2小時上手SpringBoot
  • 參與學習       11887    人
  • 解答問題       115    個

2小時上手SpringBoot,實戰開發紅包表白程序,體現程序員專屬花式浪漫

進入課程

數據庫問題

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號