データベースを変更する必要があります。このために、データベース移行プラグインをインストールしました。
plugins {
…
runtime ':database-migration:1.3.2'
}
このプラグインの使用法に関するチュートリアルを見つけました。
私の手順は次のとおりです。
grails dbm-generate-changelog changelog.groovy
grails dbm-changelog-sync
これらの 2 つの手順の後、1 つのドメイン クラスを次のように変更しました。
class Event {
...
Date lastAccessed
}
に:
class Event {
...
Date dateCreated
Date lastUpdated
}
チュートリアルとドキュメントによると、今実行する必要があるのは次のとおりです。
grails dbm-gorm-diff
これは私がしました
grails dbm-gorm-diff add-timestamps-to-event.groovy --add
この部分で、エラーが発生しています。
スタックトレース:
| Starting dbm-gorm-diff
12:38:20,561 - ERROR - org.codehaus.groovy.grails.plugins.DefaultGrailsPlugin - Error configuration scaffolding: Error creating bean with name 'instanceControllersApi': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'instanceControllersApi': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
at java.lang.Thread.run(Thread.java:722)
これがどこから来たのか私にはわかりません。
ご提案いただきありがとうございます。