我试图在一个小型独立应用程序中一起使用spring数据和spring配置.
...
public static void main( String[] args )
{
ApplicationContext ctx = new AnnotationConfigApplicationContext(AppConfig.class);
...
}
Run Code Online (Sandbox Code Playgroud)
1.我的问题是如何在不使用的情况下发现spring数据存储库
<jpa:repositories base-package="foo.repositories" />
Run Code Online (Sandbox Code Playgroud)
通过spring config?
2.如果没有,我可以以某种方式一起使用'ClassPathXmlApplicationContext'和'AnnotationConfigApplicationContext'吗?