什么是grails 3.x中的新位置PROPERTY_INSTANCE_MAP

时间:2016-02-20 05:24:26

标签: grails

我正在尝试将我的项目从grails 2.1.1升级到3.1.1

在我的带有grails 2.1.1的项目中,这段代码对我来说运行良好..

def propertyInstanceMap = org.codehaus.groovy.grails.plugins.DomainClassGrailsPlugin.PROPERTY_INSTANCE_MAP

但是当我试图用grails 3.1.1运行时。我得到一些错误..如果我删除这一行,我的项目运行良好,没有错误..

此错误,我尝试使用“org.codehaus.groovy.grails.plugins.DomainClassGrailsPlugin.PROPERTY_INSTANCE_MAP”进行编译

ERROR grails.boot.GrailsApp - Application startup failed
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.akiong.maintenance.TemplateEmailController': Initialization of
bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'templateEmailService': Cannot create inner bean '(inner bean)
#57db4507' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#57db4507': B
ean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [java.lang.Object]: Factory method 'newIn
stance' threw exception; nested exception is org.grails.core.exceptions.NewInstanceCreationException: Could not create a new instance of class [com.akiong.TemplateEmailService]!
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.akiong.maintenance.TemplateEmailController': Initialization of bean failed; nested excepti
on is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'templateEmailService': Cannot create inner bean '(inner bean)#57db4507' while setting be
an property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#57db4507': Bean instantiation via facto
ry method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [java.lang.Object]: Factory method 'newInstance' threw exception; ne
sted exception is org.grails.core.exceptions.NewInstanceCreationException: Could not create a new instance of class [com.akiong.TemplateEmailService]!
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:547) ~[spring-beans-4.1.7.RELEASE.jar:4.1
.7.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:547)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7
.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingleto  at org.springframework.beans.factory.support.DefaultListableBeanFactory.preIns
tantiateSingletons(DefaultListableBeanFactory.java:755)
ns(DefaultListableBeanFactory.java:755) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757) ~[spring-context-4.1.7.RELEASE.jar:4.1.
7.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) ~[spring-context-4.1.7.RELEASE.jar:4.1.7.RELEASE]
        at org.springframework.boot.context.embedded.EmbeddedW  at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:
118) ~[spring-boot-1.2.6.RELEASE.jar:1.2.6.RELEASE]
ebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:687) ~[spring-boot-1.2.6.RELEASE.jar:1.2.6.RELEASE]
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:687)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:321) ~[spring-boot-1.2.6.RELEASE.jar:1.2.6.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:321)
        at grails.boot.GrailsApp.run(GrailsApp.groovy:52) [grails-core-3.0.9.jar:3.0.9]
        at grails.boot.GrailsApp.run(GrailsApp.groovy:52)
        at grails.boot.GrailsApp.run(GrailsApp.groovy:330) [grails-core-3.0.9.jar:3.0.9]
        at grails.boot.GrailsApp.run(GrailsApp.groovy:330)
        at grails.boot.GrailsApp.run(GrailsApp.groovy:319) [grails-core-3.0.9.jar:3.0.9]
        at grails.boot.GrailsApp.run(GrailsApp.groovy:319)
        at grails.boot.GrailsApp$run.call(Unknown Source) [grails-core-3.0.9.jar:3.0.9]
        at grails.boot.GrailsApp$run.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) [groovy-2.4.5.jar:2.4.5]
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) [groovy-2.4.5.jar:2.4.5]
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133) [groovy-2.4.5.jar:2.4.5]
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
        at vpcsmsmasking.Application.main(Application.groovy:8) [main/:na]
        at vpcsmsmasking.Application.main(Application.groovy:8)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'templateEmailService': Cannot create inner bean '(inner bean)#57db4507' while setti
ng bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#57db4507': Bean instantiation via
factory method failed; nested exception is org.springframework.beansCaused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'templateEmailSe
rvice': Cannot create inner bean '(inner bean)#57db4507' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error crea
ting bean with name '(inner bean)#57db4507': Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instant
iate [java.lang.Object]: Factory method 'newInstance' threw exception; nested exception is org.grails.core.exceptions.NewInstanceCreationException: Could not create a new instance of
 class [com.akiong.TemplateEmailService]!
.BeanInstantiationException: Failed to instantiate [java.lang.Object]: Factory method 'newInstance' threw exception; nested exception is org.grails.core.exceptions.NewInstanceCreatio
nException: Could not create a new instance of class [com.akiong.TemplateEmailService]!
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:313)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:313) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE
]
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:129)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:129) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.
RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1477)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1477) ~[spring-beans-4.1.7.RELEASE
.jar:4.1.7.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1222)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1222) ~[spring-beans-4.1.7.RELEASE.jar:4.
1.7.RELEASE]
        at org.spring   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537) ~[spring-beans-4.1.7
.RELEASE.jar:4.1.7.RELEASE]
framework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7
.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
        at org.spring   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
framework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByName(AbstractAutowireCapableBeanFactory.java:1240) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByName(AbstractAutowireCapableBeanFactory.java:1240)
        at org.grails.spring.beans.factory.OptimizedAutowireCapableBeanFactory.autowireByName(OptimizedAutowireCapableBeanFactory.java:160) ~[grails-core-3.0.9.jar:3.0.9]
        at org.grails.spring.beans.factory.OptimizedAutowireCapableBeanFactory.autowireByName(OptimizedAutowireCapableBeanFactory.java:160)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1190) ~[spring-beans-4.1.7.RELEASE.jar:4.
1.7.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1190)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537) ~[spring-beans-4.1.7.RELEASE.jar:4.1
.7.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)
        ... 19 common frames omitted
        ... 19 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#57db4507': Bean instantiation via factory method failed; nested except
ion is org.springframework.beans.BeanInstantiationException: Failed to instantiate [java.lang.Object]: Factory method 'newInstance' threw exception; nested exception is org.grails.co
re.exceptions.NewInstanceCreationException: Could not create a new instance of class [com.akiong.TemplateEmailService]!
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#57db4507': Bean instantiation via factory method failed; nested except
ion is org.springframework.beans.BeanInstantiationException: Failed to instantiate [java.lang.Object]: Factory method 'newInstance' threw exception; nested exception is org.grails.co
re.exceptions.NewInstanceCreationException: Could not create a new instance of class [com.akiong.TemplateEmailService]!
        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1119) ~[spring-beans-4.1
.7.RELEASE.jar:4.1.7.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:  at org.springframework
.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1014) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
1119)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504) ~[spring-beans-4.1.7.RELEASE.jar:4.1
.7.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1014)
        at org.springframework.beans.factory.support.Abs        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBe
anFactory.java:504)
tractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:299) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE
]
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:299)
        ... 32 common frames omitted
        ... 32 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [java.lang.Object]: Factory method 'newInstance' threw exception; nested exception is org.grail
s.core.exceptions.NewInstanceCreationException: Could not create a new instance of class [com.akiong.TemplateEmailService]!
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [java.lang.Object]: Factory method 'newInstance' threw exception; nested exception is org.grail
s.core.exceptions.NewInstanceCreationException: Could not create a new instance of class [com.akiong.TemplateEmailService]!
        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
        ... 37 common frames omitted
        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
Caused by: org.grails.core.exceptions.NewInstanceCreationException: Could not create a new instance of class [com.akiong.TemplateEmailService]!
        ... 37 more
        at org.grails.core.AbstractGrailsClass.newInstance(AbstractGrailsClass.java:138) ~[grails-core-3.0.9.jar:3.0.9]
Caused by: org.grails.core.exceptions.NewInstanceCreationException: Could not create a new instance of class [com.akiong.TemplateEmailService]!
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_75]
        at org.grails.core.AbstractGrailsClass.newInstance(AbstractGrailsClass.java:138)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_75]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_75]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_75]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1426) ~[springloaded-1.2.4.RELEASE.jar:1.2.4.RELEASE]
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1426)
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
        ... 38 common frames omitted
        ... 38 more
Caused by: groovy.lang.MissingPropertyException: Caused by: groovy.lang.MissingPropertyException: No such property: PROPERTY_INSTANCE_MAP for class: org.grails.plugins.domain.DomainC
lasNo such property: PROPERTY_INSTANCE_MAP for class: org.grails.plugins.domain.DomainClassGrailsPlugin
sGrailsPlugin
        at groovy.lang.MetaClassImpl.invokeStaticMissingProperty(MetaClassImpl.java:999) ~[groovy-2.4.5.jar:2.4.5]
        at groovy.lang.MetaClassImpl.invokeStaticMissingProperty(MetaClassImpl.java:999)
        at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1854) ~[groovy-2.4.5.jar:2.4.5]
        at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1854)
        at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1830) ~[groovy-2.4.5.jar:2.4.5]
        at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1830)
        at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:3737) ~[groovy-2.4.5.jar:2.4.5]
        at org.codehaus.groovy.runtime.callsite.ClassMetaClassGetPropertySite.getProperty(ClassMetaClassGetPropertySite.java:51) ~[groovy-2.4.5.jar:2.4.5]
        at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:3737)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:296) [groovy-2.4.5.jar:2.4.5]
        at org.codehaus.groovy.runtime.callsite.ClassMetaClassGetPropertySite.getProperty(ClassMetaClassGetPropertySite.java:51)
        at com.akiong.TemplateEmailService.<init>(TemplateEmailService.groovy) ~[main/:na]
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:296)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.7.0_75]
        at com.akiong.TemplateEmailService.<init>(TemplateEmailService.groovy)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) ~[na:1.7.0_75]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.7.0_75]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526) ~[na:1.7.0_75]
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrConstructorNewInstance(ReflectiveInterceptor.java:1075) ~[springloaded-1.2.4.RELEASE.jar:1.2.4.RELEASE]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
        at org.grails.core.AbstractGrailsClass.newInstance(AbstractGrailsClass.java:128) ~[grails-core-3.0.9.jar:3.0.9]
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrConstructorNewInstance(ReflectiveInterceptor.java:1075)
        ... 44 common frames omitted
        at org.grails.core.AbstractGrailsClass.newInstance(AbstractGrailsClass.java:128)
        ... 44 more

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':bootRun'.
> Process 'command 'C:\Program Files\Java\jdk1.7.0_75\bin\java.exe'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
| Error Failed to start server (Use --stacktrace to see the full trace)

任何人都知道我在grails 3.1.1中找到PROPERTY_INSTANCE_MAP的位置?

=============================================== =======================

这是我的代码来自grails 2.1.1 ..我正在尝试将此代码更改为grails 3.1.1

def propertyInstanceMap = org.codehaus.groovy.grails.plugins.DomainClassGrailsPlugin.PROPERTY_INSTANCE_MAP
def cleanUpGorm() {
    def session = sessionFactory.currentSession
    session.flush()
    session.clear()
    propertyInstanceMap.get().clear()
}

如何在grails 3.x中清除会话?

我知道如果没有优化,你将面临outOfMemory问题。

0 个答案:

没有答案