I'm trying to use spring data and spring config together in a small standalone application.
...
public static void main( String[] args )
{
ApplicationContext ctx = new AnnotationConfigApplicationContext(AppConfig.class);
...
}
1. My question is how can I discover the spring data repositories without using
<jpa:repositories base-package="foo.repositories" />
by spring config ?
2. If not, can I use 'ClassPathXmlApplicationContext' and 'AnnotationConfigApplicationContext' together somehow ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…