java - IntelliJ IDEA cannot resolve spring imported files -



java - IntelliJ IDEA cannot resolve spring imported files -

i have multimodule maven project parent pom file , 2 modules (named "app" , "modules"). in test resources of "app" have spring config next content:

<?xml version="1.0" encoding="utf-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> <import resource="file:src/main/webapp/web-inf/spring-config/security.xml"/> <import resource="file:src/main/webapp/web-inf/spring-config/mvc-servlet.xml"/> <import resource="file:src/main/webapp/web-inf/spring-config/common.xml"/> <import resource="db-test.xml"/> <import resource="utilscontext.xml"/> </beans>

intellij thought 13 , 14 cannot find files imported resources in case (security.xml, mvc-servlet.xml , common.xml) , thought cannot resolve injection of objects spring context. if alter path file:app/src/main/webapp/web-inf/spring-config/security.xml works fine, crashes maven tests.

please, show me how config intellij ideas spring files resolutions.

at runtime path src/main/webapp doesn't exists available @ build time. utilize /web-inf/spring-config (no file: prefix) instead.

if want them available tests suggest moving files out of web-inf directory somewhere on classpath i.e. src/main/resources/meta-inf instance. classpath:/meta-inf/spring-config/security.xml

java spring maven intellij-idea

Comments

Popular posts from this blog

java Multi query from Mysql using netbeans -

c# - DotNetZip fails with "stream does not support seek operations" -

c++ - StartServiceCtrlDispatcher don't can access 1063 error -