spring.freemarker.cache:false
spring.datasource.url=jdbc:mysql://localhost/mydb
spring.datasource.username=user
spring.datasource.password=pass
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
即时得到甚至与司机类名difined无法加载驱动程序类:com.mysql.jdbc.Driver春
java.lang.IllegalStateException此错误:无法加载驱动程序类: com.mysql.jdbc.Driver at org.springframework.util.Assert.state(Assert.java:392) 〜[spring-core-4.2.1.RELEASE.jar:4.2.1.RELEASE] at org。 springframework.boot.autoconfigure.jdbc.DataSourceProperties.getDriverClassName(DataSourceProperties.java:153) 〜[spring-boot-autoconfigure-1.3.0.M5.jar:1.3.0.M5] at org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration $ NonEmbeddedConfiguration.dataSource(DataSourceAutoConfiguration.java:119) 〜[spring-boot-autoconfigure-1.3.0.M5.jar:1.3.0.M5] at sun。反应.NativeMethodAccessorImpl.invoke0(Native Method) 〜[na:1.8.0_60] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 〜[na:1.8.0_60] at ......
而且如果你正在使用maven,将它添加到您的POM那张
Plz分享完整的堆栈跟踪和其他相关信息。 – Bikku
请告诉我们错误! – Teo
@UUIIUI:我不想听起来像某种清教徒,或刺,但...本网站旨在为专业人士。 “请”不拼写为“plz”。 – carlspring