我有一个项目,其中有一个域名类Participant.groovy。关键是我不再需要它,因此也想消除它,但是,当我删除它并使用run-app命令时,出现以下错误:
> org.springframework.beans.factory.UnsatisfiedDependencyException:
> Error creating bean with name 'methodValidationPostProcessor' defined
> in class path resource
> [org/springframework/boot/autoconfigure/validation/ValidationAutoConfiguration.class]:
> Unsatisfied dependency expressed through method
> 'methodValidationPostProcessor' parameter 0; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'hibernateDatastoreServiceRegistry': Cannot
> resolve reference to bean 'hibernateDatastore' while setting
> constructor argument; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'hibernateDatastore': Bean instantiation via
> constructor failed; nested exception is
> org.springframework.beans.BeanInstantiationException: Failed to
> instantiate [org.grails.orm.hibernate.HibernateDatastore]: Constructor
> threw exception; nested exception is
> java.lang.TypeNotPresentException: Type
> project.Participant not present
实际上,我没有在任何其他文件(控制器,视图或服务)中使用它,所以我不明白为什么grails需要该文件。现在,我已经重新创建它,因为如果不能,我将无法运行该项目,但是它唯一的代码如下:
class Participant {
}