내 Flex 응용 프로그램 내부에서 getBanks() (BankService 내부에 있음)라는 메서드를 호출하고 있습니다. 여기에 BankService 클래스는 다음과 같습니다파일을 찾을 수 없음 예외
@org.springframework.stereotype.Service("com.apollo.counterpartcontacts.service.BankService")
@org.springframework.flex.remoting.RemotingDestination("com.apollo.counterpartcontacts.service.IBankService")
public class BankService extends _BankService {
private Logger logger = LoggerFactory.getLogger(getClass());
private ApplicationContext applicationContext;
private List<String> configHostResources = new ArrayList<String>();
private List<String> configResources = new ArrayList<String>();
private PersistenceManager persistenceManager;
@BeforeClass
public void beforeClass() {
try {
addConfigResource("application.xml");
addConfigHostResource("application.xml");
}
catch (UnknownHostException e) {
logger.error("Error loading host specific resource", e);
}
List<String> aList = new ArrayList<String>();
aList.addAll(configHostResources);
aList.addAll(configResources);
String[] aConfigArray = new String[aList.size()];
aConfigArray = aList.toArray(aConfigArray);
applicationContext = new ClassPathXmlApplicationContext(aConfigArray);
persistenceManager = (PersistenceManager) applicationContext.getBean("persistenceManager");
}
void addConfigResource(String aConfigName) {
logger.info("Adding a config: " + aConfigName);
configResources.add(aConfigName);
}
public void addConfigHostResource(final String theSuffix) throws UnknownHostException {
String aHostName = InetAddress.getLocalHost().getHostName();
String aConfigName = aHostName.toLowerCase() + "." + theSuffix;
logger.info("Adding a host config: " + aConfigName);
configHostResources.add(aConfigName);
}
private org.springframework.orm.hibernate3.HibernateTemplate hibernateTemplate;
@org.springframework.beans.factory.annotation.Autowired
public void setHibernateTemplate(org.springframework.orm.hibernate3.HibernateTemplate hibernateTemplateValue) {
hibernateTemplate = hibernateTemplateValue;
}
public org.springframework.orm.hibernate3.HibernateTemplate getHibernateTemplate() {
return hibernateTemplate;
}
public List getBanks(){
beforeClass();
List allBanks = persistenceManager.getBanks();
return allBanks;
}
}
문제는 beforeClass()에 대한 호출은 다음과 같은 오류가 발생한다는 것입니다 :
flex.messaging.MessageException: org.springframework.beans.factory.BeanDefinitionStoreException : IOException parsing XML document from class path resource [apnycdtg7qgcq1.application.xml]; nested exception is java.io.FileNotFoundException: class path resource [apnycdtg7qgcq1.application.xml] cannot be opened because it does not exist
이것에 대해 호기심 것은 apnycdtg7qgcq1.application.xml
가 내 src 폴더에 위치한다는 것입니다, 오류가보고있는 곳과 같은 곳입니다. 누구나 여기서 문제를 볼 수 있습니까?