Я пытаюсь установить sh соединение с базой данных MySQL с помощью Springboot, при соединении с базой данных я ожидаю, что hibernate автоматически создаст таблицы базы данных, но я не получаю никакого регистрации соединения базы данных hibernate во время работы. Я проверил мою библиотеку зависимостей gradle и все, что я перечислил в моем build.gradle, есть там, но всякий раз, когда я запускаю свое приложение, я получаю
2020-02-13 17:09:42.046 INFO 42960 --- [ restartedMain] c.s.silhouette.SilhouetteApplication : No active profile set, falling back to default profiles: default
2020-02-13 17:09:42.092 INFO 42960 --- [ restartedMain] o.s.b.devtools.restart.ChangeableUrls : The Class-Path manifest attribute in C:\Users\Daniel Still\.gradle\caches\modules-2\files-2.1\org.glassfish.jaxb\jaxb-runtime\2.3.2\5528bc882ea499a09d720b42af11785c4fc6be2a\jaxb-runtime-2.3.2.jar referenced one or more files that do not exist: file:/C:/Users/Daniel%20Still/.gradle/caches/modules-2/files-2.1/org.glassfish.jaxb/jaxb-runtime/2.3.2/5528bc882ea499a09d720b42af11785c4fc6be2a/jakarta.xml.bind-api-2.3.2.jar,file:/C:/Users/Daniel%20Still/.gradle/caches/modules-2/files-2.1/org.glassfish.jaxb/jaxb-runtime/2.3.2/5528bc882ea499a09d720b42af11785c4fc6be2a/txw2-2.3.2.jar,file:/C:/Users/Daniel%20Still/.gradle/caches/modules-2/files-2.1/org.glassfish.jaxb/jaxb-runtime/2.3.2/5528bc882ea499a09d720b42af11785c4fc6be2a/istack-commons-runtime-3.0.8.jar,file:/C:/Users/Daniel%20Still/.gradle/caches/modules-2/files-2.1/org.glassfish.jaxb/jaxb-runtime/2.3.2/5528bc882ea499a09d720b42af11785c4fc6be2a/stax-ex-1.8.1.jar,file:/C:/Users/Daniel%20Still/.gradle/caches/modules-2/files-2.1/org.glassfish.jaxb/jaxb-runtime/2.3.2/5528bc882ea499a09d720b42af11785c4fc6be2a/FastInfoset-1.2.16.jar,file:/C:/Users/Daniel%20Still/.gradle/caches/modules-2/files-2.1/org.glassfish.jaxb/jaxb-runtime/2.3.2/5528bc882ea499a09d720b42af11785c4fc6be2a/jakarta.activation-api-1.2.1.jar
2020-02-13 17:09:42.092 INFO 42960 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2020-02-13 17:09:42.092 INFO 42960 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2020-02-13 17:09:43.209 INFO 42960 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2020-02-13 17:09:43.218 INFO 42960 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2020-02-13 17:09:43.218 INFO 42960 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.30]
2020-02-13 17:09:43.310 INFO 42960 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2020-02-13 17:09:43.310 INFO 42960 --- [ restartedMain] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1217 ms
2020-02-13 17:09:43.484 INFO 42960 --- [ restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2020-02-13 17:09:43.540 INFO 42960 --- [ restartedMain] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page template: index
2020-02-13 17:09:43.660 INFO 42960 --- [ restartedMain] .s.s.UserDetailsServiceAutoConfiguration :
Using generated security password: 7b1ec838-94cd-48f3-b5f3-7834387bf73e
2020-02-13 17:09:43.732 INFO 42960 --- [ restartedMain] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@183faf72, org.springframework.security.web.context.SecurityContextPersistenceFilter@1724cae4, org.springframework.security.web.header.HeaderWriterFilter@16da706, org.springframework.security.web.csrf.CsrfFilter@51a542c6, org.springframework.security.web.authentication.logout.LogoutFilter@40a3e0be, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@39fa0e6c, org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter@26e733f8, org.springframework.security.web.authentication.ui.DefaultLogoutPageGeneratingFilter@661de239, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@6046c98f, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@30cd39d, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@2e971390, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@2b002ea3, org.springframework.security.web.session.SessionManagementFilter@1f801b77, org.springframework.security.web.access.ExceptionTranslationFilter@5de0841f, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@26853594]
2020-02-13 17:09:43.777 INFO 42960 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2020-02-13 17:09:43.816 INFO 42960 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2020-02-13 17:09:43.819 INFO 42960 --- [ restartedMain] c.s.silhouette.SilhouetteApplication : Started SilhouetteApplication in 2.085 seconds (JVM running for 2.542)
Я не совсем уверен, что я даже подключен к база данных или нет, и я не знаю, как проверить. Вот мой build.gradle вместе со свойствами приложения.
build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.springframework.boot:spring-boot-gradle-plugin:1.5.21.RELEASE'
classpath 'org.springframework:springloaded:1.2.0.RELEASE'
}
}
plugins {
id 'org.springframework.boot' version '2.2.4.RELEASE'
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
id 'java'
}
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
group = 'com.silhouette'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation('org.springframework.boot:spring-boot-starter-security')
implementation('org.springframework.boot:spring-boot-starter-thymeleaf')
implementation('org.springframework.boot:spring-boot-starter-web')
implementation('org.springframework.boot:spring-boot-starter-data-jpa')
implementation('mysql:mysql-connector-java')
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("mysql:mysql-connector-java")
runtime('org.springframework.boot:spring-boot-devtools')
test {
useJUnitPlatform()
}
}
application.properties
# ======================
# = DATA SOURCE
# ======================
# Database connection settings
spring.datasource.url=jdbc:mysql://localhost:3306/silhouette-data
spring.datasource.username=silhouette-data
spring.datasource.password=Consignment
# Specify the DBMS
spring.jpa.database = MYSQL
# Show or not log for each sql query
spring.jpa.show-sql = false
# Hibernate ddl auto (create, create-drop, update)
spring.jpa.hibernate.ddl-auto = update
# Use spring.jpa.properties.* for Hibernate native properties (the prefix is
# stripped before adding them to the entity manager)
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect