最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

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

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

  • 淺析springboot通過(guò)面向接口編程對(duì)控制反轉(zhuǎn)IOC的理解

    淺析springboot通過(guò)面向接口編程對(duì)控制反轉(zhuǎn)IOC的理解

    這篇文章主要介紹了springboot通過(guò)面向接口編程對(duì)控制反轉(zhuǎn)IOC的理解,本文通過(guò)實(shí)例代碼給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友參考下吧
    2020-08-08
  • java?ArrayList的深拷貝與淺拷貝問題

    java?ArrayList的深拷貝與淺拷貝問題

    這篇文章主要介紹了java?ArrayList的深拷貝與淺拷貝問題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2023-05-05
  • Java實(shí)體類(entity)作用說(shuō)明

    Java實(shí)體類(entity)作用說(shuō)明

    這篇文章主要介紹了Java實(shí)體類(entity)作用說(shuō)明,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧
    2020-08-08
  • 使用Logback設(shè)置property參數(shù)方式

    使用Logback設(shè)置property參數(shù)方式

    這篇文章主要介紹了使用Logback設(shè)置property參數(shù)方式,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2023-03-03
  • springboot項(xiàng)目中統(tǒng)一時(shí)間格式處理方法

    springboot項(xiàng)目中統(tǒng)一時(shí)間格式處理方法

    JacksonConfiguration主要用于配置JSON的序列化和反序列化,而LocalDateTimeFormatter則用于處理請(qǐng)求和響應(yīng)中的LocalDateTime格式,這兩個(gè)配置項(xiàng)在SpringBoot項(xiàng)目中至關(guān)重要,確保數(shù)據(jù)格式的正確處理和傳輸
    2024-10-10
  • Monaco?Editor實(shí)現(xiàn)sql和java代碼提示實(shí)現(xiàn)示例

    Monaco?Editor實(shí)現(xiàn)sql和java代碼提示實(shí)現(xiàn)示例

    這篇文章主要為大家介紹了Monaco?Editor代碼提示sql和java實(shí)現(xiàn)示例,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪
    2022-08-08
  • Java實(shí)現(xiàn)計(jì)算一個(gè)月有多少天和多少周

    Java實(shí)現(xiàn)計(jì)算一個(gè)月有多少天和多少周

    這篇文章主要介紹了Java實(shí)現(xiàn)計(jì)算一個(gè)月有多少天和多少周,本文直接給出實(shí)例代碼,需要的朋友可以參考下
    2015-06-06
  • RocketMQ的順序消費(fèi)機(jī)制詳解

    RocketMQ的順序消費(fèi)機(jī)制詳解

    這篇文章主要介紹了RocketMQ的順序消費(fèi)機(jī)制詳解,順序消息是指對(duì)于一個(gè)指定的?Topic?,消息嚴(yán)格按照先進(jìn)先出(FIFO)的原則進(jìn)行消息發(fā)布和消費(fèi),即先發(fā)布的消息先消費(fèi),后發(fā)布的消息后消費(fèi),,需要的朋友可以參考下
    2023-10-10
  • 淺析Java常用API(Scanner,Random)匿名對(duì)象

    淺析Java常用API(Scanner,Random)匿名對(duì)象

    這篇文章主要介紹了Java常用API(Scanner,Random)匿名對(duì)象,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2019-03-03
  • Java中的byte & 0xff到底有什么作用?

    Java中的byte & 0xff到底有什么作用?

    這篇文章主要介紹了Java中的byte & 0xff到底有什么作用,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2021-06-06

最新評(píng)論

平远县| 交口县| 阜康市| 昌宁县| 昌邑市| 泸水县| 广元市| 安仁县| 丰镇市| 武汉市| 寻甸| 新化县| 泸水县| 龙江县| 宣武区| 临武县| 左云县| 延安市| 睢宁县| 新竹市| 新沂市| 白沙| 璧山县| 和平县| 县级市| 贵定县| 固原市| 大丰市| 郧西县| 崇阳县| 甘洛县| 福清市| 秭归县| 大同县| 若尔盖县| 玛纳斯县| 浮山县| 南和县| 白银市| 广饶县| 育儿|