[12] 스프링(Spring Tools 4) root-context.xml에서 <beans>의 속성 변경
1. 스프링(Spring Tools 4) root-context.xml에서 <beans>의 속성 변경
> WEB-INF > Spring > root-context.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xsi:schemaLocation="http://www.springframework.org/schema/jdbc
http://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-3.1.xsd">
<!-- Root Context: defines shared resources visible to all other web components -->
<bean name="dsdbcp" class="org.apache.commons.dbcp2.BasicDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="url" value="jdbc:mysql://localhost:3306/jspdb?characterEncoding=utf8"/>
<property name="username" value="root"/>
<property name="password" value="1234"/>
<property name="initialSize" value="5"/>
<property name="maxIdle" value="5"/>
</bean>
<bean id="jdbcTmp" class="org.springframework.jdbc.core.JdbcTemplate">
<constructor-arg ref="dsdbcp"/>
</bean>
</beans>
'IT I 프로그래밍 > 자바 I 스프링 설정' 카테고리의 다른 글
[13] 스프링(Spring Tools 4) DAO 대신 처리하는 JDBC 템플릿 설정 (0) | 2021.10.19 |
---|---|
[11] 스프링(Spring Tools 4)pom.xml의 Dependency 설정(Jar파일) (0) | 2021.10.12 |
[10] 스프링(Spring Tools 4) 컨트롤러 경로& jsp파일 지정 세팅 (0) | 2021.10.12 |
[9] 스프링(Spring Tools 4) EL 사용(템플릿 설정) (0) | 2021.10.12 |
[8] 스프링(Spring Tools 4) 필터 설정(한글처리) Web.xml (0) | 2021.10.12 |