ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • ContextLoaderListener등록
    Spring_FrameWork 2018. 11. 23. 18:33
    ContextLoaderListener등록

    WEB.XML에 설정

    <!– ContextLoaderListener의 읽어들이는 위치 설정 (default는 /WEB-INF/applicationContext.xml)–>
    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath:applicationContext.xml</param-value>
    </context-param>
    <!– ContextLoaderListener 등록 –>
    <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>

    그냥 등록하면  default는 /WEB-INF/applicationContext.xml로 경로를 인식하기 

    때문에 위 resource폴더로 바꿔주기위해 <context-param>설정을 추가한다


    오류 

    전과 비슷한 biz/index.jsp 으로 이상하게 인식함 

    오토와이어에서 오류도 남  전에 해결한 방법쓰고도 안됨 

    다른문제 

    그러고보니 boardDAO를 쓰지 않고 JDBCTemplet 으로 구현한 

    boardSpringDAO를 boardImpl에 @AutoWired함 

    그냥 BoardDAO로 바꾸고 하니까 됨 

    아마 객체등록이 상관있거나 아니면 다른문제가 있는거같지만

    일단 예제대로 진행한다.


    'Spring_FrameWork' 카테고리의 다른 글

    5.1 파일 업로드 처리  (0) 2018.11.23
    스프링컨테이너의관계  (0) 2018.11.23
    2-Layered 아키텍처  (0) 2018.11.23
    Simple Spring Web Maven 초기설정  (0) 2018.11.23
    @ModelAttribute  (0) 2018.11.23
Designed by Tistory.