請看以下代碼:
package com.stepforward.mirrorworld.p3_application_bean.Person;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface Person_Repository extends JpaRepository
{ }
當運行以下代碼:
Person_Repository Person_Repository=( Person_Repository) Application_Context.getBean( Person_Repository.class);
報錯:No qualifying bean of type 'com.stepforward.mirrorworld.p3_application_bean.Person.Person_Repository' available
請問錯在哪?@Repository不能由Spring容器管理嗎?