ssm integration of applicationContext.xml profile

<?xml version="1.0" encoding="UTF-8"?>

<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
    <property name="driverClassName" value="com.mysql.cj.jdbc.Driver"></property>
    <property name="url" value="jdbc:mysql://localhost:3306/anbow?serverTimezone=GMT"></property>
    <property name="username" value="root"></property>
    <property name="password" value="root"></property>
</bean>
<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
    <property name="dataSource" ref="dataSource"></property>
</bean>
<bean id="student" class="com.anbow.ssm.StudentImpl">
    <property name="jdbcTemplate" ref="jdbcTemplate"></property>
</bean>



Published 33 original articles · won praise 4 · Views 6013

Guess you like

Origin blog.csdn.net/amspony/article/details/104751311
Recommended