SW과정 Spring 13일차 - 0811
Java Resources
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/mvc https://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context.xsd">
<annotation-driven />
<resources mapping="/resources/**" location="/resources/" />
<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>
<beans:bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<beans:property name="maxUploadSize" value="100000000"/>
</beans:bean>
<context:component-scan base-package="com.ksa.fullstack" />
</beans:beans>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ksa.fullstack.bbs.dao.BBSDao">
<insert id="write" parameterType="article" >
insert into bbs values(bbs_seq.nextval,#{id},#{title},#{content},sysdate)
</insert>
<select id="list" resultType="article">
select articleNum, id, title
from bbs
order by articleNum desc
</select>
<select id="content" parameterType="int" resultType="article">
select *
from bbs
where articleNum=#{articleNum}
</select>
<select id="login" parameterType="String" resultType="String">
select pass
from login
where id=#{id}
</select>
<delete id="delete" parameterType="String">
delete
from bbs
where articleNum=#{articleNum}
</delete>
<select id="getUpdateArticle" parameterType="String" resultType="article">
select articleNum, title, content
from bbs
where articleNum=#{articleNum}
</select>
<update id="updateArticle" parameterType="article">
update bbs
set title=#{title}, content=#{content}
where articleNum=#{articleNum}
</update>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<settings>
<setting name="cacheEnabled" value="true"/>
<setting name="lazyLoadingEnabled" value="false"/>
<setting name="multipleResultSetsEnabled" value="true"/>
<setting name="useColumnLabel" value="true"/>
<setting name="useGeneratedKeys" value="false"/>
<setting name="defaultExecutorType" value="SIMPLE"/>
<setting name="defaultStatementTimeout" value="25000"/>
<setting name="mapUnderscoreToCamelCase" value="false"/>
<setting name="jdbcTypeForNull" value="VARCHAR" />
</settings>
<typeAliases>
<typeAlias type="com.ksa.fullstack.bbs.dto.BBSDto" alias="article"/>
</typeAliases>
</configuration>