springjdbc中applicationContext.xml和web.xml配置信息
来源:互联网 发布:mac版酷狗音乐传歌 编辑:程序博客网 时间:2024/05/16 15:50
<?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:context="http://www.springframework.org/schema/context" xmlns:util="http://www.springframework.org/schema/util"
xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:jpa="http://www.springframework.org/schema/data/jpa" xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.2.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.2.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd">
<bean id="dbcp" class="org.apache.commons.dbcp.BasicDataSource">
<property name="username" value="root"></property>
<property name="password" value="1234"></property>
<property name="driverClassName" value="com.mysql.jdbc.Driver"></property>
<property name="url" value="jdbc:mysql:///jsd1507db?useUnicode=true&characterEncoding=utf8">
</property>
</bean>
<bean id="template" class="org.springframework.jdbc.core.JdbcTemplate">
<property name="dataSource" ref="dbcp"></property>
</bean>
<context:component-scan base-package="org.tarena"/>
<mvc:annotation-driven/>
<bean id="viewResovler" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/"></property>
<property name="suffix" value=".jsp"></property>
</bean>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context" xmlns:util="http://www.springframework.org/schema/util"
xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:jpa="http://www.springframework.org/schema/data/jpa" xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.2.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.2.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd">
<bean id="dbcp" class="org.apache.commons.dbcp.BasicDataSource">
<property name="username" value="root"></property>
<property name="password" value="1234"></property>
<property name="driverClassName" value="com.mysql.jdbc.Driver"></property>
<property name="url" value="jdbc:mysql:///jsd1507db?useUnicode=true&characterEncoding=utf8">
</property>
</bean>
<bean id="template" class="org.springframework.jdbc.core.JdbcTemplate">
<property name="dataSource" ref="dbcp"></property>
</bean>
<context:component-scan base-package="org.tarena"/>
<mvc:annotation-driven/>
<bean id="viewResovler" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/"></property>
<property name="suffix" value=".jsp"></property>
</bean>
</beans>
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<servlet>
<servlet-name>springjdbc</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>springjdbc</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
</web-app>
0 0
- springjdbc中applicationContext.xml和web.xml配置信息
- 在web.xml中配置,使用配置类替代springmvc.xml和applicationContext.xml
- SSH中 applicationcontext.xml与web.xml的配置
- spring web.xml applicationContext.xml常见配置
- beans.xml 和 applicationContext.xml配置区别
- S2SH的applicationContext.xml配置信息
- web.xml配置信息
- Spring中,applicationContext.xml 配置文件在web.xml中的配置详解
- Spring中,applicationContext.xml 配置文件在web.xml中的配置详解
- Spring中,applicationContext.xml 配置文件在web.xml中的配置详解
- spring中applicationContext.xml在web.xml中的配置路径说明
- Spring中,applicationContext.xml 配置文件在web.xml中的配置详解
- ssh整合源码一:配置Spring之applicationContext.xml和web.xml
- web.xml & Spring applicationContext.xml简单配置(备忘)
- spring+hibernate整合web.xml、applicationContext.xml配置
- spring+hibernate整合web.xml、applicationContext.xml配置
- spring的applicationContext.xml在web.xml中的配置详解
- applicationContext.xml 配置文件在web.xml中的配置详解
- maven学习七:maven基础总结
- 怎么在一个网页头部加小图片
- leetcode -- Flatten Binary Tree to Linked List -- 重点难点
- linux下安装oracle遇到的错误总结
- c语言学习总结
- springjdbc中applicationContext.xml和web.xml配置信息
- solr5.3.1搭建
- Linux文件操作命令
- 【LWJGL官方教程】批渲染
- JAVA-享元设计模式
- Android Studio——android中minLines和maxLines的区别
- WampServer 打造 https 站(上) 图文详解
- javascript基本学习
- 递归基础练习2