如何在myeclipse中搭建ssm框架( 二 )



7然后是applicationContext.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:mvc="http://www.springframework.org/schema/mvc"    xmlns:context="http://www.springframework.org/schema/context"      xmlns:tx="http://www.springframework.org/schema/tx"       xmlns:aop="http://www.springframework.org/schema/aop"      xsi:schemaLocation="http://www.springframework.org/schema/beans                         http://www.springframework.org/schema/beans/spring-beans.xsd                          http://www.springframework.org/schema/context                         http://www.springframework.org/schema/context/spring-context-3.0.xsd                          http://www.springframework.org/schema/tx                          http://www.springframework.org/schema/tx/spring-tx-3.0.xsd                          http://www.springframework.org/schema/aop                         http://www.springframework.org/schema/aop/spring-aop-3.0.xsd                        http://www.springframework.org/schema/mvc                         http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">         <!-- 开启注解 -->    <context:annotation-config/>       <!-- 扫描包设置 -->    <context:component-scan base-package="com.tbdz.*"/>     <!-- 启用3.0新注解 -->    <mvc:annotation-driven />        <!-- 启动Spring MVC的注解功能 , 完当作请乞降注解POJO的映射 -->    <bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"/>        <!-- 设置装备摆设数据源 -->    <context:property-placeholder location="classpath:jdbc.properties"/>    <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">        <property name="username" value=https://vvvtt.com/article/"${jdbc.user}">

推荐阅读