<?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:tx="http://www.springframework.org/schema/tx"
	   xmlns:aop="http://www.springframework.org/schema/aop"

	   xsi:schemaLocation="http://www.springframework.org/schema/beans
	    https://www.springframework.org/schema/beans/spring-beans.xsd
	    http://www.springframework.org/schema/tx
	    http://www.springframework.org/schema/tx/spring-tx.xsd
	    http://www.springframework.org/schema/aop
	    https://www.springframework.org/schema/aop/spring-aop.xsd">


	<!-- Root Context: defines shared resources visible to all other web components -->

	<bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource"
		  destroy-method="close">
		<property name="driverClassName" value="org.mariadb.jdbc.Driver" />
		<property name="url" value="jdbc:mariadb://coon.myds.me:3307/NookSearch" />
		<property name="username" value="minechost" />
		<property name="password" value="Ahstmxj5zos1!" />
	</bean>

	<!-- Spring JDBC 설정 -->
	<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
		<property name="dataSource" ref="dataSource" />
	</bean>


	<bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
		<property name="dataSource" ref="dataSource" />
	</bean>
	<!--
	<tx:advice id="txAdvice" transaction-manager="txManager">
		<tx:attributes>
			<tx:method name="get*" read-only="true"/>
			<tx:method name="*" />
		</tx:attributes>
	</tx:advice>

	<aop:config>
		<aop:pointcut id="txPointcut" expression="execution(* co.nook.app..*(..))" />
		<aop:advisor pointcut-ref="txPointcut" advice-ref="txAdvice" />
	</aop:config> -->



</beans>
