Я использую следующую команду для запуска Micronaut проекта с версией Gradle.5.4.1
[ОБНОВЛЕНИЕ: 1] Это зависает в обоих случаях, исключая возможность возникновения каких-либо проблем с Gradle.
gradle run
gradle run --continuous
Моя сборка часто застревает на шаге, когда она устанавливает соединение с сервером MySQL8, установленным на моей машине разработки.
В случае, если сборка застряла, последняя напечатанная строка будет
INFO org.hibernate.dialect.Dialect - HHH000400: Using dialect: org.hibernate.dialect.MySQL8Dialect
При нормальном выполнении печатаются следующие журналы
09:46:54.057 [main] INFO i.m.context.env.DefaultEnvironment - Established active environments: [dev]
09:46:55.932 [main] INFO i.m.c.h.g.HibernateDatastoreFactory - Starting GORM for Hibernate
09:46:56.948 [main] INFO org.hibernate.Version - HHH000412: Hibernate Core {5.4.0.Final}
09:46:56.948 [main] INFO org.hibernate.cfg.Environment - HHH000206: hibernate.properties not found
09:46:57.088 [main] INFO o.h.validator.internal.util.Version - HV000001: Hibernate Validator 6.0.13.Final
09:46:57.104 [main] INFO o.h.v.i.engine.ConfigurationImpl - HV000002: Ignoring XML configuration.
09:46:57.276 [main] INFO o.h.annotations.common.Version - HCANN000001: Hibernate Commons Annotations {5.1.0.Final}
09:46:57.401 [main] INFO org.hibernate.dialect.Dialect - HHH000400: Using dialect: org.hibernate.dialect.MySQL8Dialect
09:46:59.339 [main] INFO o.h.v.i.engine.ConfigurationImpl - HV000002: Ignoring XML configuration.
09:47:00.554 [main] WARN org.hibernate.orm.deprecation - HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated; use the JPA javax.persistence.criteria.CriteriaQuery instead
09:47:00.617 [main] WARN org.hibernate.orm.deprecation - HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated; use the JPA javax.persistence.criteria.CriteriaQuery instead
09:47:00.617 [main] WARN org.hibernate.orm.deprecation - HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated; use the JPA javax.persistence.criteria.CriteriaQuery instead
09:47:00.617 [main] WARN org.hibernate.orm.deprecation - HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated; use the JPA javax.persistence.criteria.CriteriaQuery instead
09:47:00.617 [main] WARN org.hibernate.orm.deprecation - HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated; use the JPA javax.persistence.criteria.CriteriaQuery instead
09:47:00.633 [main] WARN org.hibernate.orm.deprecation - HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated; use the JPA javax.persistence.criteria.CriteriaQuery instead
09:47:00.695 [main] WARN org.hibernate.orm.deprecation - HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated; use the JPA javax.persistence.criteria.CriteriaQuery instead
09:47:00.695 [main] WARN org.hibernate.orm.deprecation - HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated; use the JPA javax.persistence.criteria.CriteriaQuery instead
09:47:00.711 [main] WARN org.hibernate.orm.deprecation - HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated; use the JPA javax.persistence.criteria.CriteriaQuery instead
09:47:00.711 [main] WARN org.hibernate.orm.deprecation - HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated; use the JPA javax.persistence.criteria.CriteriaQuery instead
09:47:00.726 [main] INFO io.micronaut.runtime.Micronaut - Startup completed in 6984ms. Server Running: http://localhost:7070
Я использую MySQL8 с Micronaut1.1.2 на данный момент.Ниже моя конфигурация базы данных в application.yml
#Hibernate
hibernate:
hbm2ddl:
auto: update
cache:
queries: false
use_second_level_cache: false
use_query_cache: false
dataSource:
pooled: true
jmxExport: true
driverClassName: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://${database.host}:${database.port}/${database.name}
username: ${database.username}
password: ${database.password}