mvn构建springmybatis环境搭建.docx

上传人:b****5 文档编号:6007488 上传时间:2023-01-02 格式:DOCX 页数:18 大小:19.11KB
下载 相关 举报
mvn构建springmybatis环境搭建.docx_第1页
第1页 / 共18页
mvn构建springmybatis环境搭建.docx_第2页
第2页 / 共18页
mvn构建springmybatis环境搭建.docx_第3页
第3页 / 共18页
mvn构建springmybatis环境搭建.docx_第4页
第4页 / 共18页
mvn构建springmybatis环境搭建.docx_第5页
第5页 / 共18页
点击查看更多>>
下载资源
资源描述

mvn构建springmybatis环境搭建.docx

《mvn构建springmybatis环境搭建.docx》由会员分享,可在线阅读,更多相关《mvn构建springmybatis环境搭建.docx(18页珍藏版)》请在冰豆网上搜索。

mvn构建springmybatis环境搭建.docx

mvn构建springmybatis环境搭建

1、mvn构建

mvnarchetype:

generate-DgroupId=com.persia-DartifactId=yamissm-DarchetypeArtifactId=maven-archetype-webapp-DinteractiveMode=false

2、配置pom.xml

//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/maven-v4_0_0.xsd">

4.0.0

com.persia

yamissm

war

1.0-SNAPSHOT

yamissmMavenWebapp

http:

//maven.apache.org

3.2.4.RELEASE

UTF-8

--MyBatisintegration-->

org.mybatis

mybatis-spring

1.2.1

org.mybatis

mybatis

3.2.3

--cglib-->

cglib

cglib

2.2

--servlet3-->

javax.servlet

javax.servlet-api

3.0.1

provided

--freemarker-->

org.freemarker

freemarker

2.3.20

--Jackson-->

org.codehaus.jackson

jackson-mapper-asl

1.9.13

--utils-->

com.google.guava

guava

15.0-rc1

--ApacheCommons-->

commons-lang

commons-lang

2.6

commons-collections

commons-collections

3.2.1

commons-beanutils

commons-beanutils

1.8.3

commons-dbutils

commons-dbutils

1.5

commons-fileupload

commons-fileupload

1.3

commons-codec

commons-codec

1.8

commons-configuration

commons-configuration

1.10

--slf4j-->

org.slf4j

slf4j-log4j12

1.7.2

--mysqldriver-->

mysql

mysql-connector-java

5.1.15

--c3p0datasource-->

c3p0

c3p0

0.9.1.2

--JUnit-->

junit

junit

4.11

provided

--spring-->

org.springframework

spring-core

${org.springframework-version}

org.springframework

spring-webmvc

${org.springframework-version}

org.springframework

spring-context

${org.springframework-version}

--ExcludeCommonsLogginginfavorofSLF4j-->

commons-logging

commons-logging

org.springframework

spring-orm

${org.springframework-version}

---->

--org.springframework-->

--spring-aspects-->

--${org.springframework-version}-->

---->

org.springframework

spring-expression

${org.springframework-version}

org.springframework

spring-context-support

${org.springframework-version}

org.springframework

spring-web

${org.springframework-version}

---->

--org.springframework-->

--spring-jdbc-->

--${org.springframework-version}-->

---->

org.springframework

spring-aop

${org.springframework-version}

org.springframework

spring-beans

${org.springframework-version}

org.springframework

spring-tx

${org.springframework-version}

---->

--org.springframework-->

--spring-jms-->

--${org.springframework-version}-->

---->

---->

--org.springframework-->

--spring-test-->

--${org.springframework-version}-->

--test-->

---->

--AspectJ-->

org.aspectj

aspectjrt

1.7.4

org.aspectj

aspectjweaver

1.7.4

yamissm

3、配置web.xml

xmlns:

xsi="http:

//www.w3.org/2001/XMLSchema-instance"

xsi:

schemaLocation="

version="3.0">

--CreatestheSpringContainersharedbyallServletsandFilters-->

org.springframework.web.context.ContextLoaderListener

contextConfigLocation

classpath*:

applicationContext-mybatis.xml

--Processesapplicationrequests-->

dispatcherServlet

org.springframework.web.servlet.DispatcherServlet

contextConfigLocation

classpath*:

applicationContext-web.xml

1

true

dispatcherServlet

/

--DisablesServletContainerwelcomefilehandling.NeededforcompatibilitywithServlet3.0andTomcat7.0-->

4、配置applicationContext-web.xml

xmlversion="1.0"encoding="UTF-8"standalone="no"?

>

//www.springframework.org/schema/beans"xmlns:

xsi="http:

//www.w3.org/2001/XMLSchema-instance"

xmlns:

context="http:

//www.springframework.org/schema/context"xmlns:

mvc="http:

//www.springframework.org/schema/mvc"

xmlns:

aop="http:

//www.springframework.org/schema/aop"

xsi:

schemaLocation="http:

//www.springframework.org/schema/mvc

http:

//www.springframework.org/schema/mvc/spring-mvc-3.0.xsd

http:

//www.springframework.org/schema/beans

http:

//www.springframework.org/schema/beans/spring-beans-3.0.xsd

http:

//www.springframework.org/schema/context

http:

//www.springframework.org/schema/context/spring-context-3.0.xsd

http:

//www.springframework.org/schema/aophttp:

//www.springframework.org/schema/aop/spring-aop-3.0.xsd">

--启动对@Aspectj的支持-->

aspectj-autoproxyproxy-target-class="true"/>

component-scanbase-package="com.yami.controller"/>

annotation-driven/>

text/plain;charset=UTF-8

text/plain;charset=UTF-8

application/json;charset=UTF-8

--freemarker的配置-->

class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer">

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

当前位置:首页 > 求职职场 > 简历

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

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