Spring+springmvc+hibernate+springdatajap配置详解.docx

上传人:b****6 文档编号:6676631 上传时间:2023-01-08 格式:DOCX 页数:30 大小:52.84KB
下载 相关 举报
Spring+springmvc+hibernate+springdatajap配置详解.docx_第1页
第1页 / 共30页
Spring+springmvc+hibernate+springdatajap配置详解.docx_第2页
第2页 / 共30页
Spring+springmvc+hibernate+springdatajap配置详解.docx_第3页
第3页 / 共30页
Spring+springmvc+hibernate+springdatajap配置详解.docx_第4页
第4页 / 共30页
Spring+springmvc+hibernate+springdatajap配置详解.docx_第5页
第5页 / 共30页
点击查看更多>>
下载资源
资源描述

Spring+springmvc+hibernate+springdatajap配置详解.docx

《Spring+springmvc+hibernate+springdatajap配置详解.docx》由会员分享,可在线阅读,更多相关《Spring+springmvc+hibernate+springdatajap配置详解.docx(30页珍藏版)》请在冰豆网上搜索。

Spring+springmvc+hibernate+springdatajap配置详解.docx

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">

4.0.0

com.ssh

spring-springmvc-springdate-jpa-hibernate

0.0.1-SNAPSHOT

war

4.12

3.0-alpha-1

1.2

1.1.2

1.2.17

4.1.3.RELEASE

1.3.2.RELEASE

4.3.11.Final

1.3.1

5.1.38

11.1.0.6.0

1.2.2

junit

junit

${junit.version}

javax.servlet

servlet-api

${servlet.version}

provided

javax.servlet

jstl

${jstl.version}

taglibs

standard

${taglibs.version}

--Springstart-->

org.springframework

spring-orm

${spring.version}

org.springframework

spring-webmvc

${spring.version}

org.springframework

spring-context

${spring.version}

org.springframework

spring-beans

${spring.version}

org.springframework

spring-web

${spring.version}

org.springframework

spring-jdbc

${spring.version}

org.springframework

spring-aop

${spring.version}

org.springframework

spring-tx

${spring.version}

org.springframework

spring-core

${spring.version}

org.springframework.data

spring-data-jpa

${jpa.version}

--Hibernate-->

org.hibernate

hibernate-core

${hibernat.version}

org.hibernate

hibernate-entitymanager

${hibernat.version}

org.hibernate

hibernate-ehcache

${hibernat.version}

--Mysql-->

mysql

mysql-connector-java

${mysql.version}

--添加oraclejdbcdriver-->

com.oracle

ojdbc6

${oracleVersion}

commons-dbcp

commons-dbcp

${dhcp.version}

--log4j配置,视情况添加-->

log4j

log4j

${log4jVersion}

org.slf4j

slf4j-api

1.7.12

--文件上传-->

commons-fileupload

commons-fileupload

${fileuploadVersion}

com.jolbox

bonecp

0.8.0.RELEASE

com.jolbox

bonecp-spring

0.8.0.RELEASE

com.jolbox

bonecp-provider

0.8.0-alpha1

org.aspectj

aspectjweaver

1.6.11

cglib

cglib-nodep

3.2.0

commons-collections

commons-collections

3.2.1

ant

ant

1.6.5

org.apache.avro

avro

1.7.7

commons-beanutils

commons-beanutils

1.9.2

commons-io

commons-io

2.4

mons

commons-lang3

3.4

dom4j

dom4j

1.6.1

net.sf.ezmorph

ezmorph

1.0.6

com.google.guava

guava

18.0

org.javassist

javassist

3.20.0-GA

org.jboss.logging

jboss-logging

3.3.0.Final

--jackson-->

com.fasterxml.jackson.core

jackson-databind

2.5.0

com.fasterxml.jackson.core

jackson-core

2.5.0

com.fasterxml.jackson.core

jackson-annotations

2.5.0

--修改默认的jdk版本-->

org.apache.maven.plugins

maven-compiler-plugin

3.1

1.7

1.7

--maven装载tomcat7-->

org.apache.tomcat.maven

tomcat7-maven-plugin

/

JPA

二、配置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>

--**************************************

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 解决方案 > 学习计划

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1