WonYong-Jang / Spring-Jquery-Project

0 stars 0 forks source link

Spring setting #1

Open WonYong-Jang opened 5 years ago

WonYong-Jang commented 5 years ago

Character breakup occurs

<!-- Character Set Filter -->
<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>
    <init-param>
        <param-name>forceEncoding</param-name>
        <param-value>true</param-value>
    </init-param>
</filter>
<filter-mapping>
    <filter-name>encodingFilter</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

the web system first consults web.xml to locate the files associated with the spring configuration and to reference those filse.

 <context-param>
       <param-name>contextConfigLocation</param-name>
       <param-value>classpath:spring/*-context.xml</param-value> 
</context-param>

<servlet>
    <servlet-name>appServlet</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <init-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath:servlet-context.xml</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
</servlet>

Controller URL

스크린샷 2019-09-02 오후 10 15 26
<beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
    <beans:property name="prefix" value="/WEB-INF/views/" />
    <beans:property name="suffix" value=".jsp" />
</beans:bean>

link : https://freehoon.tistory.com/101

WonYong-Jang commented 5 years ago

database setting

$ mysql -uroot -p mysql> show databases mysql > show create table [table명] // show create script

mysql> show warnings\g // show error log

스크린샷 2019-08-29 오후 10 15 58 스크린샷 2019-08-29 오후 10 16 04

참고 링크 : https://all-record.tistory.com/96