Spring boot 继续获取 "required a single bean, but 10 were found" 尽管我只声明了一项服务

Spring boot Keep getting "required a single bean, but 10 were found" although I declared only one service

每当我 运行 我的 spring 启动应用程序时,我都会收到以下消息:

***************************
APPLICATION FAILED TO START
***************************

Description:

Field patchService in org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService required a single bean, but 10 were found:
    - org.hisp.dhis.patch.DefaultPatchService#0: defined in URL [file:/D:/001Learning/JavaEE/Projects_FromNet/eagleboard2/eagleboard-services/eagleboard-service-core/target/classes/META-INF/dhis/beans.xml]
    - org.hisp.dhis.patch.DefaultPatchService#1: defined in URL [file:/D:/001Learning/JavaEE/Projects_FromNet/eagleboard2/eagleboard-services/eagleboard-service-core/target/classes/META-INF/dhis/beans.xml]
    - org.hisp.dhis.patch.DefaultPatchService#2: defined in URL [file:/D:/001Learning/JavaEE/Projects_FromNet/eagleboard2/eagleboard-services/eagleboard-service-core/target/classes/META-INF/dhis/beans.xml]
    - org.hisp.dhis.patch.DefaultPatchService#3: defined in URL [file:/D:/001Learning/JavaEE/Projects_FromNet/eagleboard2/eagleboard-services/eagleboard-service-core/target/classes/META-INF/dhis/beans.xml]
    - org.hisp.dhis.patch.DefaultPatchService#4: defined in URL [file:/D:/001Learning/JavaEE/Projects_FromNet/eagleboard2/eagleboard-services/eagleboard-service-core/target/classes/META-INF/dhis/beans.xml]
    - org.hisp.dhis.patch.DefaultPatchService#5: defined in URL [file:/D:/001Learning/JavaEE/Projects_FromNet/eagleboard2/eagleboard-services/eagleboard-service-core/target/classes/META-INF/dhis/beans.xml]
    - org.hisp.dhis.patch.DefaultPatchService#6: defined in URL [file:/D:/001Learning/JavaEE/Projects_FromNet/eagleboard2/eagleboard-services/eagleboard-service-core/target/classes/META-INF/dhis/beans.xml]
    - org.hisp.dhis.patch.DefaultPatchService#7: defined in URL [file:/D:/001Learning/JavaEE/Projects_FromNet/eagleboard2/eagleboard-services/eagleboard-service-core/target/classes/META-INF/dhis/beans.xml]
    - org.hisp.dhis.patch.DefaultPatchService#8: defined in URL [file:/D:/001Learning/JavaEE/Projects_FromNet/eagleboard2/eagleboard-services/eagleboard-service-core/target/classes/META-INF/dhis/beans.xml]
    - org.hisp.dhis.patch.DefaultPatchService#9: defined in URL [file:/D:/001Learning/JavaEE/Projects_FromNet/eagleboard2/eagleboard-services/eagleboard-service-core/target/classes/META-INF/dhis/beans.xml]

Action:

Consider marking one of the beans as @Primary, updating the consumer to accept multiple beans, or using @Qualifier to identify the bean that should be consumed


Process finished with exit code 1

虽然下面只声明了一项服务xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:aop="http://www.springframework.org/schema/aop"
  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
    http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.3.xsd">

  <bean id="org.eagleboard.preheat.PreheatService" class="org.eagleboard.preheat.DefaultPreheatService" scope="prototype">
    <aop:scoped-proxy proxy-target-class="false" />
  </bean>

  <bean id="org.eagleboard.calendar.CalendarService" class="org.eagleboard.calendar.DefaultCalendarService" />

  <bean class="org.eagleboard.calendar.impl.Iso8601Calendar" />

  <bean class="org.eagleboard.calendar.impl.CopticCalendar" />

  <bean class="org.eagleboard.calendar.impl.EthiopianCalendar" />

  <bean class="org.eagleboard.calendar.impl.GregorianCalendar" />

  <bean class="org.eagleboard.calendar.impl.IslamicCalendar" />

  <bean class="org.eagleboard.calendar.impl.NepaliCalendar" />

  <bean class="org.eagleboard.calendar.impl.ThaiCalendar" />

  <bean class="org.eagleboard.calendar.impl.PersianCalendar" />

  <bean id="org.eagleboard.query.planner.QueryPlanner" class="org.eagleboard.query.planner.DefaultQueryPlanner" />

  <bean id="org.eagleboard.query.QueryParser" class="org.eagleboard.query.DefaultQueryParser" />

  <bean id="org.eagleboard.query.CriteriaQueryEngine" class="org.eagleboard.query.CriteriaQueryEngine" />

  <bean id="org.eagleboard.query.InMemoryQueryEngine" class="org.eagleboard.query.InMemoryQueryEngine" />

  <bean id="org.eagleboard.query.QueryService" class="org.eagleboard.query.DefaultQueryService" />

  <bean class="org.eagleboard.patch.DefaultPatchService" />

  <bean id="org.eagleboard.render.RenderService" class="org.eagleboard.render.DefaultRenderService" />

  <bean class="org.eagleboard.amqp.RabbitMQAmqpService" />


  <bean id="org.eagleboard.interpretation.InterpretationStore" class="org.eagleboard.interpretation.hibernate.HibernateInterpretationStore">
    <property name="clazz" value="org.eagleboard.interpretation.Interpretation" />
    <property name="sessionFactory" ref="sessionFactory" />
  </bean>

  <!--Eagle Board part-->

  <!-- Eagle Board Data Stores -->
  <bean id="com.eagleboard.datafield.DataFieldStore" class="org.eagleboard.eagleboard.datafield.hibernate.HibernateDataFieldStore">
    <property name="clazz" value="org.eagleboard.eagleboard.datafield.DataField" />
    <property name="sessionFactory" ref="sessionFactory" />
    <property name="jdbcTemplate" ref="jdbcTemplate" />
    <property name="cacheable" value="true" />
  </bean>

  <bean id="com.eagleboard.fieldset.FieldSetStore" class="org.eagleboard.eagleboard.fieldset.hibernate.HibernateFieldSetStore">
    <property name="clazz" value="org.eagleboard.eagleboard.fieldset.FieldSet" />
    <property name="sessionFactory" ref="sessionFactory" />
    <property name="jdbcTemplate" ref="jdbcTemplate" />
    <property name="cacheable" value="true" />
  </bean>

  <bean id="com.eagleboard.todotask.TodoTaskStore" class="org.eagleboard.eagleboard.todotask.hibernate.HibernateTodoTaskStore">
    <property name="clazz" value="org.eagleboard.eagleboard.todotask.TodoTask" />
    <property name="sessionFactory" ref="sessionFactory" />
    <property name="jdbcTemplate" ref="jdbcTemplate" />
    <property name="cacheable" value="true" />
  </bean>

  <bean id="com.eagleboard.activity.ActivityStore" class="org.eagleboard.eagleboard.activity.hibernate.HibernateActivityStore">
    <property name="clazz" value="org.eagleboard.eagleboard.activity.Activity" />
    <property name="sessionFactory" ref="sessionFactory" />
    <property name="jdbcTemplate" ref="jdbcTemplate" />
    <property name="cacheable" value="true" />
  </bean>

  <bean id="com.eagleboard.project.ProjectStore" class="org.eagleboard.eagleboard.project.hibernate.HibernateProjectStore">
    <property name="clazz" value="org.eagleboard.eagleboard.project.Project" />
    <property name="sessionFactory" ref="sessionFactory" />
    <property name="jdbcTemplate" ref="jdbcTemplate" />
    <property name="cacheable" value="true" />
  </bean>

  <!-- Eagle Board Services -->
  <bean id="org.eagleboard.eagleboard.datafield.DataFieldService" class="org.eagleboard.eagleboard.datafield.DefaultDataFieldService">
    <property name="dataFieldStore" ref="com.eagleboard.datafield.DataFieldStore" />
  </bean>

  <bean id="org.eagleboard.eagleboard.fieldset.DefaultFieldSetService" class="org.eagleboard.eagleboard.fieldset.DefaultFieldSetService">
    <property name="fieldSetStore" ref="com.eagleboard.fieldset.FieldSetStore" />
    <property name="currentUserService" ref="org.eagleboard.user.CurrentUserService" />
  </bean>

  <bean id="org.eagleboard.eagleboard.todotask.DefaultTodoTaskService" class="org.eagleboard.eagleboard.todotask.DefaultTodoTaskService">
    <property name="todoTaskStore" ref="com.eagleboard.todotask.TodoTaskStore" />
    <property name="currentUserService" ref="org.eagleboard.user.CurrentUserService" />
  </bean>

  <bean id="org.eagleboard.eagleboard.activity.DefaultActivityService" class="org.eagleboard.eagleboard.activity.DefaultActivityService">
    <property name="activityStore" ref="com.eagleboard.activity.ActivityStore" />
    <property name="currentUserService" ref="org.eagleboard.user.CurrentUserService" />
  </bean>

  <bean id="org.eagleboard.eagleboard.project.DefaultProjectService" class="org.eagleboard.eagleboard.project.DefaultProjectService">
    <property name="projectStore" ref="com.eagleboard.project.ProjectStore" />
    <property name="currentUserService" ref="org.eagleboard.user.CurrentUserService" />
  </bean>

  <!-- Eagle Board DeletionHandlers -->
  <bean id="org.eagleboard.eagleboard.datafield.DataFieldDeletionHandler" class="org.eagleboard.eagleboard.datafield.DataFieldDeletionHandler">
    <property name="jdbcTemplate" ref="jdbcTemplate" />
  </bean>

  <bean id="org.eagleboard.eagleboard.fieldset.FieldSetDeletionHandler" class="org.eagleboard.eagleboard.fieldset.FieldSetDeletionHandler">
    <property name="jdbcTemplate" ref="jdbcTemplate" />
  </bean>

  <bean id="org.eagleboard.eagleboard.todotask.TodoTaskDeletionHandler" class="org.eagleboard.eagleboard.todotask.TodoTaskDeletionHandler">
    <property name="jdbcTemplate" ref="jdbcTemplate" />
  </bean>

  <bean id="org.eagleboard.eagleboard.activity.ActivityDeletionHandler" class="org.eagleboard.eagleboard.activity.ActivityDeletionHandler">
    <property name="jdbcTemplate" ref="jdbcTemplate" />
  </bean>

  <bean id="org.eagleboard.eagleboard.project.ProjectDeletionHandler" class="org.eagleboard.eagleboard.project.ProjectDeletionHandler">
    <property name="jdbcTemplate" ref="jdbcTemplate" />
  </bean>

  <bean id="org.eagleboard.indicator.IndicatorStore" class="org.eagleboard.indicator.hibernate.HibernateIndicatorStore">
    <property name="clazz" value="org.eagleboard.indicator.Indicator" />
    <property name="sessionFactory" ref="sessionFactory" />
    <property name="cacheable" value="true" />
  </bean>

  <bean id="org.eagleboard.indicator.IndicatorTypeStore" class="org.eagleboard.common.hibernate.HibernateIdentifiableObjectStore">
    <property name="clazz" value="org.eagleboard.indicator.IndicatorType" />
    <property name="sessionFactory" ref="sessionFactory" />
    <property name="cacheable" value="true" />
  </bean>

  <bean id="org.eagleboard.indicator.IndicatorGroupStore" class="org.eagleboard.common.hibernate.HibernateIdentifiableObjectStore">
    <property name="clazz" value="org.eagleboard.indicator.IndicatorGroup" />
    <property name="sessionFactory" ref="sessionFactory" />
    <property name="cacheable" value="true" />
  </bean>

  <bean id="org.eagleboard.indicator.IndicatorGroupSetStore" class="org.eagleboard.common.hibernate.HibernateIdentifiableObjectStore">
    <property name="clazz" value="org.eagleboard.indicator.IndicatorGroupSet" />
    <property name="sessionFactory" ref="sessionFactory" />
    <property name="cacheable" value="true" />
  </bean>

  <bean id="org.eagleboard.period.PeriodStore" class="org.eagleboard.period.hibernate.HibernatePeriodStore">
    <property name="clazz" value="org.eagleboard.period.Period" />
    <property name="sessionFactory" ref="sessionFactory" />
    <property name="cacheable" value="true" />
    <property name="transientIdentifiableProperties" value="true" />
  </bean>

  <bean id="org.eagleboard.expression.ExpressionStore" class="org.eagleboard.hibernate.HibernateGenericStore">
    <property name="clazz" value="org.eagleboard.expression.Expression" />
    <property name="sessionFactory" ref="sessionFactory" />
    <property name="cacheable" value="true" />
  </bean>

  <bean id="org.eagleboard.user.UserStore" class="org.eagleboard.user.hibernate.HibernateUserStore">
    <property name="sessionFactory" ref="sessionFactory" />
    <property name="clazz" value="org.eagleboard.user.User" />
    <property name="cacheable" value="true" />
  </bean>

  <bean id="org.eagleboard.user.CurrentUserStore" class="org.eagleboard.user.hibernate.HibernateCurrentUserStore" />

  <bean id="org.eagleboard.user.UserSettingStore" class="org.eagleboard.user.hibernate.HibernateUserSettingStore">
    <property name="sessionFactory" ref="sessionFactory" />
  </bean>

  <bean id="org.eagleboard.user.UserAuthorityGroupStore" class="org.eagleboard.user.hibernate.HibernateUserAuthorityGroupStore">
    <property name="sessionFactory" ref="sessionFactory" />
    <property name="clazz" value="org.eagleboard.user.UserAuthorityGroup" />
    <property name="cacheable" value="true" />
  </bean>

  <bean id="org.eagleboard.user.UserCredentialsStore" class="org.eagleboard.user.hibernate.HibernateUserCredentialsStore">
    <property name="clazz" value="org.eagleboard.user.UserCredentials" />
    <property name="sessionFactory" ref="sessionFactory" />
    <property name="cacheable" value="true" />
  </bean>

  <bean id="org.eagleboard.user.UserGroupStore" class="org.eagleboard.common.hibernate.HibernateIdentifiableObjectStore">
    <property name="clazz" value="org.eagleboard.user.UserGroup" />
    <property name="sessionFactory" ref="sessionFactory" />
    <property name="cacheable" value="true" />
  </bean>

  <bean id="org.eagleboard.user.UserGroupAccessStore" class="org.eagleboard.hibernate.HibernateGenericStore">
    <property name="clazz" value="org.eagleboard.user.UserGroupAccess" />
    <property name="sessionFactory" ref="sessionFactory" />
  </bean>

  <bean id="org.eagleboard.user.UserAccessStore" class="org.eagleboard.hibernate.HibernateGenericStore">
    <property name="clazz" value="org.eagleboard.user.UserAccess" />
    <property name="sessionFactory" ref="sessionFactory" />
  </bean>

  <bean id="org.eagleboard.user.PasswordValidationService" class="org.eagleboard.user.DefaultPasswordValidationService" />

  <bean id="org.eagleboard.user.PasswordHistoryValidationRule" class="org.eagleboard.user.PasswordHistoryValidationRule" />

  <bean id="org.eagleboard.user.PasswordLengthValidationRule" class="org.eagleboard.user.PasswordLengthValidationRule" />

  <bean id="org.eagleboard.user.DigitPatternValidationRule" class="org.eagleboard.user.DigitPatternValidationRule" />

  <bean id="org.eagleboard.user.UpperCasePatternValidationRule" class="org.eagleboard.user.UpperCasePatternValidationRule" />

  <bean id="org.eagleboard.user.SpecialCharacterValidationRule" class="org.eagleboard.user.SpecialCharacterValidationRule" />

  <bean id="org.eagleboard.user.PasswordDictionaryValidationRule" class="org.eagleboard.user.PasswordDictionaryValidationRule" />

  <bean id="org.eagleboard.user.UserParameterValidationRule" class="org.eagleboard.user.UserParameterValidationRule" />

  <bean id="org.eagleboard.message.MessageConversationStore" class="org.eagleboard.message.hibernate.HibernateMessageConversationStore">
    <property name="clazz" value="org.eagleboard.message.MessageConversation" />
    <property name="sessionFactory" ref="sessionFactory" />
    <property name="jdbcTemplate" ref="jdbcTemplate" />
    <property name="statementBuilder" ref="statementBuilder" />
  </bean>

  <bean id="org.eagleboard.configuration.ConfigurationStore" class="org.eagleboard.hibernate.HibernateGenericStore">
    <property name="sessionFactory" ref="sessionFactory" />
    <property name="clazz" value="org.eagleboard.configuration.Configuration" />
    <property name="cacheable" value="true" />
  </bean>

  <bean id="org.eagleboard.constant.ConstantStore" class="org.eagleboard.common.hibernate.HibernateIdentifiableObjectStore">
    <property name="sessionFactory" ref="sessionFactory" />
    <property name="clazz" value="org.eagleboard.constant.Constant" />
    <property name="cacheable" value="true" />
  </bean>

  <bean id="org.eagleboard.scheduling.JobConfigurationStore" class="org.eagleboard.common.hibernate.HibernateIdentifiableObjectStore">
    <property name="sessionFactory" ref="sessionFactory" />
    <property name="clazz" value="org.eagleboard.scheduling.JobConfiguration" />
    <property name="cacheable" value="true" />
  </bean>

  <bean id="org.eagleboard.deletedobject.DeletedObjectStore" class="org.eagleboard.deletedobject.hibernate.HibernateDeletedObjectStore" />

  <bean id="org.eagleboard.version.VersionStore" class="org.eagleboard.version.hibernate.HibernateVersionStore">
    <property name="sessionFactory" ref="sessionFactory" />
    <property name="clazz" value="org.eagleboard.version.Version" />
    <property name="cacheable" value="true" />
  </bean>

  <bean id="org.eagleboard.metadata.version.MetadataVersionStore"
    class="org.eagleboard.metadata.version.hibernate.HibernateMetadataVersionStore">
    <property name="sessionFactory" ref="sessionFactory" />
    <property name="clazz" value="org.eagleboard.metadata.version.MetadataVersion" />
  </bean>

  <bean id="org.eagleboard.option.OptionSetStore" class="org.eagleboard.common.hibernate.HibernateIdentifiableObjectStore">
    <property name="clazz" value="org.eagleboard.option.OptionSet" />
    <property name="sessionFactory" ref="sessionFactory" />
    <property name="cacheable" value="true" />
  </bean>

  <bean id="org.eagleboard.option.OptionStore" class="org.eagleboard.option.hibernate.HibernateOptionStore">
    <property name="clazz" value="org.eagleboard.option.Option" />
    <property name="sessionFactory" ref="sessionFactory" />
    <property name="cacheable" value="true" />
  </bean>

  <bean id="org.eagleboard.option.OptionGroupStore" class="org.eagleboard.option.hibernate.HibernateOptionGroupStore">
    <property name="clazz" value="org.eagleboard.option.OptionGroup" />
    <property name="sessionFactory" ref="sessionFactory" />
    <property name="cacheable" value="true" />
  </bean>

  <bean id="org.eagleboard.option.OptionGroupSetStore" class="org.eagleboard.option.hibernate.HibernateOptionGroupSetStore">
    <property name="clazz" value="org.eagleboard.option.OptionGroupSet" />
    <property name="sessionFactory" ref="sessionFactory" />
    <property name="cacheable" value="true" />
  </bean>

  <bean id="org.eagleboard.legend.LegendSetStore"
    class="org.eagleboard.common.hibernate.HibernateIdentifiableObjectStore">
    <property name="clazz" value="org.eagleboard.legend.LegendSet" />
    <property name="sessionFactory" ref="sessionFactory" />
    <property name="cacheable" value="true" />
  </bean>


  <bean id="org.eagleboard.i18n.I18nLocaleStore" class="org.eagleboard.i18n.hibernate.HibernateI18nLocaleStore">
    <property name="clazz" value="org.eagleboard.i18n.locale.I18nLocale" />
    <property name="sessionFactory" ref="sessionFactory" />
  </bean>

  <bean id="org.eagleboard.keyjsonvalue.KeyJsonValueStore" class="org.eagleboard.keyjsonvalue.hibernate.HibernateKeyJsonValueStore">
    <property name="clazz" value="org.eagleboard.keyjsonvalue.KeyJsonValue" />
    <property name="sessionFactory" ref="sessionFactory" />
  </bean>

  <bean id="org.eagleboard.userkeyjsonvalue.UserKeyJsonValueStore"
    class="org.eagleboard.userkeyjsonvalue.hibernate.HibernateUserKeyJsonValueStore">
    <property name="clazz" value="org.eagleboard.userkeyjsonvalue.UserKeyJsonValue" />
    <property name="sessionFactory" ref="sessionFactory" />
  </bean>

  <bean id="org.eagleboard.fileresource.FileResourceStore" class="org.eagleboard.common.hibernate.HibernateIdentifiableObjectStore">
    <property name="clazz" value="org.eagleboard.fileresource.FileResource" />
    <property name="sessionFactory" ref="sessionFactory" />
  </bean>

  <bean id="org.eagleboard.fileresource.ExternalFileResourceStore"
    class="org.eagleboard.fileresource.hibernate.HibernateExternalFileResourceStore">
    <property name="clazz" value="org.eagleboard.fileresource.ExternalFileResource" />
    <property name="sessionFactory" ref="sessionFactory" />
  </bean>

  <bean id="org.eagleboard.fileresource.FileResourceContentStore" class="org.eagleboard.fileresource.JCloudsFileResourceContentStore">
    <property name="configurationProvider" ref="dhisConfigurationProvider" />
    <property name="locationManager" ref="locationManager" />
  </bean>
  <!-- File resource jobs -->

  <bean id="org.eagleboard.fileresource.FileResourceUploadCallback" class="org.eagleboard.fileresource.FileResourceUploadCallback" />

  <!--<bean id="fileResourceCleanUpJob" class="org.eagleboard.fileresource.FileResourceCleanUpJob" />-->

  <!-- Service definitions -->

  <!--<bean id="org.eagleboard.dataelement.DataElementGroupService" class="org.eagleboard.dataelement.DefaultDataElementGroupService" />-->

  <bean id="org.eagleboard.indicator.IndicatorGroupService" class="org.eagleboard.indicator.DefaultIndicatorGroupService">
    <property name="indicatorGroupStore" ref="org.eagleboard.indicator.IndicatorGroupStore" />
  </bean>

  <!--<bean id="org.eagleboard.dimension.DimensionService" class="org.eagleboard.dimension.DefaultDimensionService" />-->

  <bean id="org.eagleboard.fileresource.FileResourceService" class="org.eagleboard.fileresource.DefaultFileResourceService">
    <property name="fileResourceStore" ref="org.eagleboard.fileresource.FileResourceStore" />
    <property name="fileResourceContentStore" ref="org.eagleboard.fileresource.FileResourceContentStore" />
    <property name="schedulingManager" ref="org.eagleboard.scheduling.SchedulingManager" />
    <property name="uploadCallback" ref="org.eagleboard.fileresource.FileResourceUploadCallback" />
  </bean>

  <bean id="org.eagleboard.fileresource.ExternalFileResourceService" class="org.eagleboard.fileresource.DefaultExternalFileResourceService">
    <property name="externalFileResourceStore" ref="org.eagleboard.fileresource.ExternalFileResourceStore" />
  </bean>

  <bean id="org.eagleboard.indicator.IndicatorService" class="org.eagleboard.indicator.DefaultIndicatorService">
    <property name="indicatorStore" ref="org.eagleboard.indicator.IndicatorStore" />
    <property name="indicatorTypeStore" ref="org.eagleboard.indicator.IndicatorTypeStore" />
    <property name="indicatorGroupStore" ref="org.eagleboard.indicator.IndicatorGroupStore" />
    <property name="indicatorGroupSetStore" ref="org.eagleboard.indicator.IndicatorGroupSetStore" />
  </bean>

  <bean id="org.eagleboard.period.PeriodService" class="org.eagleboard.period.DefaultPeriodService">
    <property name="periodStore" ref="org.eagleboard.period.PeriodStore" />
  </bean>

  <bean id="org.eagleboard.expression.ExpressionService" class="org.eagleboard.expression.DefaultExpressionService">
    <property name="expressionStore" ref="org.eagleboard.expression.ExpressionStore" />
    <property name="dataFieldService" ref="org.eagleboard.eagleboard.datafield.DataFieldService" />
    <property name="constantService" ref="org.eagleboard.constant.ConstantService" />
    <property name="idObjectManager" ref="org.eagleboard.common.IdentifiableObjectManager" />
  </bean>

  <bean id="org.eagleboard.user.UserSettingService" class="org.eagleboard.user.DefaultUserSettingService">
    <property name="currentUserService" ref="org.eagleboard.user.CurrentUserService" />
    <property name="userSettingStore" ref="org.eagleboard.user.UserSettingStore" />
    <property name="userService" ref="org.eagleboard.user.UserService" />
    <property name="systemSettingManager" ref="org.eagleboard.setting.SystemSettingManager" />
  </bean>

PatchService接口:

public interface PatchService
{
    Patch diff( PatchParams params );
    void apply( Patch patch, Object target );
}

DefaultPatchService.java 实现该接口

public class  DefaultPatchService implements PatchService
{
    private static final Log log = LogFactory.getLog( DefaultPatchService.class );

    private final SchemaService schemaService;

    private final QueryService queryService;

    private final AmqpService amqpService;

    private final MetadataAuditService metadataAuditService;

    private final CurrentUserService currentUserService;

    private final RenderService renderService;

    private final SystemService systemService;

    public DefaultPatchService( SchemaService schemaService, QueryService queryService, AmqpService amqpService,
        MetadataAuditService metadataAuditService, CurrentUserService currentUserService, RenderService renderService, SystemService systemService )
    {
        this.schemaService = schemaService;
        this.queryService = queryService;
        this.amqpService = amqpService;
        this.metadataAuditService = metadataAuditService;
        this.currentUserService = currentUserService;
        this.renderService = renderService;
        this.systemService = systemService;
    }
...

DefaultObjectBundleService.java 其中 DefaultPatchServiceAutowired 使用它实现的接口 PatchService 仅由它实现,没有其他服务实现此接口。

    @Service
    @Transactional
    public class DefaultObjectBundleService implements ObjectBundleService
    {
        private static final LoggingManager.Logger log = LoggingManager
            .createLogger( DefaultObjectBundleService.class );

        @Autowired
        private CurrentUserService currentUserService;

        @Autowired
        private PreheatService preheatService;

        @Autowired
        private SchemaService schemaService;

        @Autowired
        private SessionFactory sessionFactory;

        @Autowired
        private IdentifiableObjectManager manager;

        @Autowired
        private DbmsManager dbmsManager;

        @Autowired
        private HibernateCacheManager cacheManager;

        @Autowired
        private Notifier notifier;

        @Autowired
        private MergeService mergeService;

        @Autowired
        private DeletedObjectService deletedObjectService;

        @Autowired
        private PatchService patchService;

        @Autowired
        private MetadataAuditService metadataAuditService;

        @Autowired
        private RenderService renderService;

        @Autowired
        private SystemService systemService;

        @Autowired
        private AmqpService amqpService;

        @Autowired( required = false )
        private List<ObjectBundleHook> objectBundleHooks = new ArrayList<>();

        @Override
        public ObjectBundle create( ObjectBundleParams params )
        {
            PreheatParams preheatParams = params.getPreheatParams();

            if ( params.getUser() == null )
            {
                params.setUser( currentUserService.getCurrentUser() );
            }

            preheatParams.setUser( params.getUser() );
            preheatParams.setObjects( params.getObjects() );

            ObjectBundle bundle = new ObjectBundle( params, preheatService.preheat( preheatParams ), params.getObjects() );
            bundle.setObjectBundleStatus( ObjectBundleStatus.CREATED );
            bundle.setObjectReferences( preheatService.collectObjectReferences( params.getObjects() ) );

            return bundle;
        }
...
...

谁能帮帮我,还有这个项目有多个模块,模块之间的依赖关系是否与问题有关

我更改了服务 xml 的定义:

<bean class="org.eagleboard.patch.DefaultPatchService" />

对此:

<bean id="org.eagleboard.patch.PatchService" class="org.eagleboard.patch.DefaultPatchService" />

错误不再出现。 非常感谢大家。