IT/Java Spring

Spring MVC 기본 게시판 예제 만들기 - 0. 기본설정

Millennials 2020. 6. 17. 17:16

1) 새로운 Spring Legacy Project 생성



2)java library 설정



3) pom.xml 설정



4)OJDBC 설정



5)라이브러리 추가



6) web.xml 설정


<servlet-mapping>

        <servlet-name>appServlet</servlet-name>

        <url-pattern>*.do</url-pattern>

    </servlet-mapping>

        <!-- 필터 추가 -->

    <filter>

        <filter-name>encodingFilter</filter-name>

        <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>

        <init-param>

            <param-name>encoding</param-name>

            <param-value>UTF-8</param-value>

        </init-param>

    </filter>

    <filter-mapping>

        <filter-name>encodingFilter</filter-name>

        <url-pattern>/*</url-pattern>

    </filter-mapping>


7) servlet-content.xml 설정



8) sql 테이블 작성


SQL developer에서 테이블 및 시퀀스 생성

반응형