본문 바로가기

빌드관리시스템

[WAR] java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener



pom.xml 에 war로 안해서 톰캣 구동시 notfoundexception이 뜬다.

- 에러 내용 : java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener



폼에 빌드 설정을 추가한다

<packaging>war</packaging>


<build>

    <plugins>

        <plugin>

            <groupId>org.apache.maven.plugins</groupId>

            <artifactId>maven-war-plugin</artifactId>

            <configuration>

                <webXml>web\WEB-INF\web.xml</webXml>

            </configuration>

        </plugin>

    </plugins>

</build>


참고

- http://stackoverflow.com/questions/6083501/maven-dependencies-not-visible-in-web-inf-lib