我正在使用Grails 3.0.9
application.yml:
hibernate:
cache:
queries: false
use_second_level_cache: true
use_query_cache: false
region.factory_class: 'org.hibernate.cache.ehcache.EhCacheRegionFactory'
endpoints:
jmx:
unique-names: true
dataSource:
pooled: true
jmxExport: true
driverClassName: com.mysql.jdbc.Driver
dialect: org.hibernate.dialect.MySQL5InnoDBDialect
username: root
password: 123
environments:
development:
dataSource:
dbCreate: update
driverClassName: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost:3306/blereview?useUnicode=true&characterEncoding=UTF-8
在
grails run-app
上,在控制台上没有错误,但在数据库中未创建表。我正在使用的域类
DataRequest {
String token;
static constraints = { }
}
最佳答案
在Windows上,我的一位 friend 也遇到了同样的问题。他通过使用cygwin(cygwin的grails run-app)设置GRAILS-HOME修复了该问题,并且对他有效。
希望对您有帮助。
关于grails - 在Grails 3中未创建表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34462917/