IT/Java Spring

MVC 01 기본 세팅

Millennials 2020. 6. 11. 11:53

encoding 폰트를 자동으로 맞춰주는 설정을 추가해주는 작업

설정 파일 경로

 

1
2
3
4
5
6
7
8
9
10
11
12
13
    <!-- 필터 추가 -->
    <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>
cs

-href="http://

 

1
2
3
4
<servlet-mapping>
        <servlet-name>appServlet</servlet-name>
        <url-pattern>*.do</url-pattern>
</servlet-mapping>
cs

 

 

반응형