亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

maven搭建spring項(xiàng)目(圖文教程)

 更新時(shí)間:2017年06月01日 08:04:49   投稿:jingxian  
下面小編就為大家?guī)?lái)一篇maven搭建spring項(xiàng)目(圖文教程)。小編覺(jué)得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧

開(kāi)發(fā)工具:MyEclipse2014版(jdk1.7)+Maven3.9。

新建Maven項(xiàng)目:

Step1:

Step2:

Step3:這里選maven-archetype-webapp,因?yàn)楹竺娴捻?xiàng)目講解都是web項(xiàng)目。如果是純java項(xiàng)目,可以選擇 maven-archetype-quickstart。

      

Step4:

Step5:右鍵項(xiàng)目,build path,修改jdk運(yùn)行環(huán)境。

到這里,maven的web項(xiàng)目初建完畢。

修改:pom.xml

<project xmlns="http://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.0 http://maven.apache.org/maven-v4_0_0.xsd">
 <modelVersion>4.0.0</modelVersion>
 <groupId>com.elstar</groupId>
 <artifactId>spring</artifactId>
 <packaging>war</packaging>
 <version>0.0.1-SNAPSHOT</version>
 <name>spring Maven Webapp</name>
 <url>http://maven.apache.org</url>
 
 <!-- jar包版本控制 -->
 <properties>
  <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
   <junit.version>4.12</junit.version>
   <spring.version>4.3.3.RELEASE</spring.version>
 </properties>  
 <dependencies>
   <!-- junit支持 -->
  <dependency>
   <groupId>junit</groupId>
   <artifactId>junit</artifactId>
   <version>${junit.version}</version>
   <scope>test</scope>
  </dependency>
  <!-- spring支持 -->
  <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-context</artifactId>
    <version>${spring.version}</version>
  </dependency>
  <!-- spring測(cè)試支持 -->
  <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-test</artifactId>
    <version>${spring.version}</version>
  </dependency>
 </dependencies>
 <build>
  <finalName>spring</finalName>
 </build>
</project>

添加spring配置文件:src/main/resources/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:p="http://www.springframework.org/schema/p" 
  xmlns:aop="http://www.springframework.org/schema/aop"  
  xmlns:context="http://www.springframework.org/schema/context" 
  xmlns:jee="http://www.springframework.org/schema/jee" 
  xmlns:tx="http://www.springframework.org/schema/tx" 
  xsi:schemaLocation="  
    http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd 
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd 
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd 
    http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-4.0.xsd 
    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd">  
    
</beans>

以上這篇maven搭建spring項(xiàng)目(圖文教程)就是小編分享給大家的全部?jī)?nèi)容了,希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。

相關(guān)文章

  • java中的阻塞隊(duì)列應(yīng)用場(chǎng)景及代碼實(shí)例

    java中的阻塞隊(duì)列應(yīng)用場(chǎng)景及代碼實(shí)例

    這篇文章主要介紹了java中的阻塞隊(duì)列應(yīng)用場(chǎng)景及代碼實(shí)例阻塞隊(duì)列是一種特殊的隊(duì)列,它提供了線程安全的操作,并在隊(duì)列為空或滿時(shí)提供了阻塞的功能,阻塞隊(duì)列通常用于多線程場(chǎng)景,其中生產(chǎn)者線程向隊(duì)列中添加元素,而消費(fèi)者線程從隊(duì)列中獲取元素,需要的朋友可以參考下
    2024-01-01
  • JAVA中阻止類的繼承(官方和非官方)

    JAVA中阻止類的繼承(官方和非官方)

    在面向?qū)ο蟮睦碚撝? 有一些方案要求你用一個(gè)辦法來(lái)聲明一個(gè)不可繼承的類。一般而言,如果類提供的功能不應(yīng)該被改變,或者更恰當(dāng)?shù)恼f(shuō),是被覆蓋(override)的時(shí)候才會(huì)出現(xiàn)這種情況。在這篇文章里,我討論在JAVA語(yǔ)言中的實(shí)現(xiàn)辦法--官方和非官方的辦法
    2014-01-01
  • 創(chuàng)建SpringBoot工程并集成Mybatis的方法

    創(chuàng)建SpringBoot工程并集成Mybatis的方法

    這篇文章主要介紹了創(chuàng)建SpringBoot工程并集成Mybatis,需要的朋友可以參考下
    2018-06-06
  • Java面向?qū)ο髮?shí)現(xiàn)汽車租賃系統(tǒng)

    Java面向?qū)ο髮?shí)現(xiàn)汽車租賃系統(tǒng)

    這篇文章主要為大家詳細(xì)介紹了Java面向?qū)ο髮?shí)現(xiàn)汽車租賃系統(tǒng),文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2022-02-02
  • 使用mybatis插件PageHelper實(shí)現(xiàn)分頁(yè)效果

    使用mybatis插件PageHelper實(shí)現(xiàn)分頁(yè)效果

    這篇文章主要為大家詳細(xì)介紹了使用mybatis插件PageHelper實(shí)現(xiàn)分頁(yè)效果,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2019-01-01
  • Java中處理金額計(jì)算之使用Long還是BigDecimal詳解

    Java中處理金額計(jì)算之使用Long還是BigDecimal詳解

    在Java后端開(kāi)發(fā)中處理與錢有關(guān)的業(yè)務(wù)時(shí),確保金額計(jì)算的準(zhǔn)確性和避免錯(cuò)誤非常重要,這篇文章主要給大家介紹了關(guān)于Java中處理金額計(jì)算之使用Long還是BigDecimal的相關(guān)資料,需要的朋友可以參考下
    2024-07-07
  • 利用微信小程序+JAVA實(shí)現(xiàn)微信支付的全過(guò)程

    利用微信小程序+JAVA實(shí)現(xiàn)微信支付的全過(guò)程

    微信支付是一種在線支付解決方案,允許用戶通過(guò)微信內(nèi)的支付功能進(jìn)行付款,下面這篇文章主要給大家介紹了關(guān)于利用微信小程序+JAVA實(shí)現(xiàn)微信支付的相關(guān)資料,需要的朋友可以參考下
    2024-08-08
  • Java經(jīng)典用法總結(jié)(二)

    Java經(jīng)典用法總結(jié)(二)

    這篇文章主要介紹了Java經(jīng)典用法總結(jié),在本文中,盡量收集一些java最常用的習(xí)慣用法,特別是很難猜到的用法,本文重點(diǎn)講解了java應(yīng)用和輸入輸出常用方法,感興趣的小伙伴們可以參考一下
    2016-02-02
  • 淺談SpringSecurity注解與AOP切面執(zhí)行順序

    淺談SpringSecurity注解與AOP切面執(zhí)行順序

    這篇文章主要介紹了淺談SpringSecurity注解與AOP切面執(zhí)行順序,引入Spring Security后,在Controller的方法中會(huì)出現(xiàn)Spring Security的方法注解與AOP同時(shí)存在的問(wèn)題,這是就會(huì)設(shè)計(jì)順序問(wèn)題,需要的朋友可以參考下
    2023-10-10
  • Spring注解驅(qū)動(dòng)之AOP功能測(cè)試

    Spring注解驅(qū)動(dòng)之AOP功能測(cè)試

    這篇文章主要介紹了Spring注解驅(qū)動(dòng)之AOP功能測(cè)試,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友可以參考下
    2020-04-04

最新評(píng)論