私はmavenを使用していて、src/main/resourcesの下に自分のconfigファイルを "singleton-config.xml"として含めました。Springワイルドカードが動作しない
私はそれが正常に動作しているが、私は、ワイルドカード
ApplicationContext context = new ClassPathXmlApplicationContext("classpath:singleton-*.xml");
を使用する場合には、例外に
Exception in thread "main" org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'singleton' is defined.
おかげ
なぜclasspath *を教えてください? –
私はそれを私の答えに加えました。 –