Spring+springmvc+hibernate+springdatajap配置详解.docx
- 文档编号:6676631
- 上传时间:2023-01-08
- 格式:DOCX
- 页数:30
- 大小:52.84KB
Spring+springmvc+hibernate+springdatajap配置详解.docx
《Spring+springmvc+hibernate+springdatajap配置详解.docx》由会员分享,可在线阅读,更多相关《Spring+springmvc+hibernate+springdatajap配置详解.docx(30页珍藏版)》请在冰豆网上搜索。
Spring+springmvc+hibernate+springdatajap配置详解
spring+springmvc+hiberante+springdata-jpa配置详解
一、所需工具
ecplise,maven,mysql
项目文件结构:
二、创建一个maven的war工程,修改pom.xml文件,加载项目所需的jar包。
//maven.apache.org/POM/4.0.0"xmlns: xsi="http: //www.w3.org/2001/XMLSchema-instance"xsi: schemaLocation="http: //maven.apache.org/POM/4.0.0http: //maven.apache.org/xsd/maven-4.0.0.xsd"> --Springstart--> --Hibernate--> --Mysql--> --添加oraclejdbcdriver--> --log4j配置,视情况添加--> --文件上传--> --jackson--> --修改默认的jdk版本--> --maven装载tomcat7--> 二、配置application.xml文件 xmlversion="1.0"encoding="UTF-8"? > //www.springframework.org/schema/beans" xmlns: xsi="http: //www.w3.org/2001/XMLSchema-instance"xmlns: aop="http: //www.springframework.org/schema/aop" xmlns: tx="http: //www.springframework.org/schema/tx"xmlns: context="http: //www.springframework.org/schema/context" xmlns: p="http: //www.springframework.org/schema/p"xmlns: cache="http: //www.springframework.org/schema/cache" xmlns: jaxws="http: //cxf.apache.org/jaxws"xmlns: jpa="http: //www.springframework.org/schema/data/jpa" xsi: schemaLocation=" http: //www.springframework.org/schema/beans http: //www.springframework.org/schema/beans/spring-beans-3.1.xsd http: //www.springframework.org/schema/tx http: //www.springframework.org/schema/tx/spring-tx-3.1.xsd http: //www.springframework.org/schema/aop http: //www.springframework.org/schema/aop/spring-aop-3.1.xsd http: //www.springframework.org/schema/context http: //www.springframework.org/schema/context/spring-context-3.1.xsd http: //www.springframework.org/schema/cache http: //www.springframework.org/schema/cache/spring-cache-3.1.xsd http: //cxf.apache.org/jaxwshttp: //cxf.apache.org/schemas/jaxws.xsd http: //www.springframework.org/schema/data/jpahttp: //www.springframework.org/schema/data/jpa/spring-jpa.xsd" default-lazy-init="true"> --********************************************配置Spring***************************************--> --自动扫描--> component-scanbase-package="com.ssh"> --扫描时跳过@Controller注解的JAVA类(控制器)--> exclude-filtertype="annotation" expression="org.springframework.stereotype.Controller"/> component-scan> --**************************************
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Spring springmvc hibernate springdatajap 配置 详解