我正在尝试在我的计算机上本地运行jhipster应用程序。我已经安装了mysql服务器和 .sql
通过mysql workbench导入的文件。
但是,每次我跑 mvnw
在项目目录中,我得到:
:: JHipster ? :: Running Spring Boot 1.3.6.RELEASE ::
:: http://jhipster.github.io ::
2018-09-15 16:23:12.401 INFO 8296 --- [ main] com.myapp.ExampleApp : Starting MyApp on DESKTOP-JA21435 with PID 1234 (E:\My_projects\myapp\target\classes started by myName in E:\My_projects\myapp)
2018-09-15 16:23:12.401 DEBUG 8296 --- [ main] com.myapp.MyApp : Running with Spring Boot v1.3.6.RELEASE, Spring v4.2.7.RELEASE
2018-09-15 16:23:12.401 INFO 8296 --- [ main] com.myapp.MyApp : The following profiles are active: swagger,dev
2018-09-15 16:23:15.051 DEBUG 8296 --- [kground-preinit] org.jboss.logging : Logging Provider: org.jboss.logging.Slf4jLoggerProvider found via system property
2018-09-15 16:23:18.650 DEBUG 8296 --- [ main] com.myapp.config.AsyncConfiguration : Creating Async Task Executor
2018-09-15 16:23:19.428 DEBUG 8296 --- [ main] com.myapp.config.MetricsConfiguration : Registering JVM gauges
2018-09-15 16:23:19.443 DEBUG 8296 --- [ main] com.myapp.config.MetricsConfiguration : Initializing Metrics JMX reporting
2018-09-15 16:23:21.774 INFO 8296 --- [ost-startStop-1] com.myapp.config.WebConfigurer : Web application configuration, using profiles: [swagger, dev]
2018-09-15 16:23:21.774 DEBUG 8296 --- [ost-startStop-1] com.myapp.config.WebConfigurer : Initializing Metrics registries
2018-09-15 16:23:21.790 DEBUG 8296 --- [ost-startStop-1] com.myapp.config.WebConfigurer : Registering Metrics Filter
2018-09-15 16:23:21.790 DEBUG 8296 --- [ost-startStop-1] com.myapp.config.WebConfigurer : Registering Metrics Servlet
2018-09-15 16:23:21.790 INFO 8296 --- [ost-startStop-1] com.myapp.config.WebConfigurer : Web application fully configured
2018-09-15 16:23:22.370 DEBUG 8296 --- [ost-startStop-1] com.myapp.config.DatabaseConfiguration : Configuring Datasource
2018-09-15 16:23:22.887 DEBUG 8296 --- [ost-startStop-1] com.myapp.config.DatabaseConfiguration : Configuring Liquibase
2018-09-15 16:23:22.919 WARN 8296 --- [argo-Executor-1] c.c.c.liquibase.AsyncSpringLiquibase : Starting Liquibase asynchronously, your database might not be ready at startup!
2018-09-15 16:23:24.097 ERROR 8296 --- [argo-Executor-1] c.c.a.ExceptionHandlingAsyncTaskExecutor : Caught async exception
com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: Could not create connection to database server.
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:528)
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:118)
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:94)
at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:388)
at com.myapp.config.liquibase.AsyncSpringLiquibase.initDb(AsyncSpringLiquibase.java:66)
at com.myapp.config.liquibase.AsyncSpringLiquibase.lambda$afterPropertiesSet$0(AsyncSpringLiquibase.java:49)
at com.myapp.async.ExceptionHandlingAsyncTaskExecutor.lambda$createWrappedRunnable$1(ExceptionHandlingAsyncTaskExecutor.java:47)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
我的数据库中的数据源信息 application-dev
文件中有以下几行对应于在我的电脑上设置的mysql用户名和密码:
datasource:
url: jdbc:mysql://localhost:3306/myApp?useUnicode=true&characterEncoding=utf8&useSSL=false
name:
username: root
password: root
hikari:
data-source-properties:
cachePrepStmts: true
prepStmtCacheSize: 250
prepStmtCacheSqlLimit: 2048
useServerPrepStmts: true
如果您能提供任何帮助或提示,我们将不胜感激。
暂无答案!
目前还没有任何答案,快来回答吧!