내 user.properties 파일을 사용하여 WEB-INF 폴더에 저장된 데이터베이스에 액세스했습니다. GGTS (Groovy Grail Tool Suite)를 실행하면서 올바르게 작동합니다. Apache Tomcat에 배포 할 때 등록 정보 파일에 액세스 할 수 없습니다.
나는 데이터 소스에 내가 독립
로 실행 그것의 작업을
Properties prop = new Properties();
prop.load(DataSource.class.getClassLoader().getResourceAsStream("user.properties"));
을 사용하지만 내가 바람둥이 서버에 자사의 전쟁 파일을 생성하고 배포 할 때 그 작동하지 않습니다.
내 user.properties는 WEB-INF 폴더에 있습니다. 오류를 adavance에서
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException
감사를 표시
. 제발 도와주세요
경을 구축
WEB-INF/classes
폴더에 user.properties를 해결, 내가 무엇을해야 지금 말씀 해주십시오? – Rahul파일을 WEB-INF/classes로 이동하여 클래스 경로에 있도록하십시오. –
선생님, 고맙습니다. 당신은 대단합니다. .... 바람둥이를 배우는 데 도움이 될만한 블로그가 있다면, 그것에 대해 새 소개를 부탁드립니다. 다시 감사드립니다. – Rahul