1. 程式人生 > >搭建Nexus Repository 3.6.0-02和配置apache-maven-3.5.2和本地的local Repository以及專案的pom.xml(IDEA 打包等)

搭建Nexus Repository 3.6.0-02和配置apache-maven-3.5.2和本地的local Repository以及專案的pom.xml(IDEA 打包等)

本文主要目的: 為了讓Maven管理專案的所有依賴包,Release和Snapshot .

本文涉及如下三點:

1.windows 下搭建Nexus Repository 3.6.0-02(linux下思路一樣)

2.配置apache-maven-3.5.2中的settings和本地的local Repository

3.配置專案的pom.xml (介紹maven的外掛,IDEA 打包[依賴包和專案包]等)

第一步:windows 下搭建Nexus Repository 3.6.0-02

下載完Nexus3.6.0後解壓,得到如下目錄結構: 
這裡寫圖片描述 
看下官網對這兩個資料夾的描述: 
這裡寫圖片描述

After you extract the
repository manager archive, two directories will appear: Installation directory ---------------------- This directory is contains the Nexus Repository Manager application and all the required additional components such as Java libraries and configuration files. The name of the directory by default uses nexus- and
is appended with the version name. In this section, and throughout the book, it is referred to as $install-dir in any code segments. Data directory -------------- This directory contains all the repositories, components and other data that are stored and managed by the repository manager. The default location of
the data directory is ../sonatype-work/nexus3 relative to the installation directory. In this section, and throughout the book, it is referred to as $data-dir in any code segments.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

解壓壓縮檔案後,得到兩個資料夾:

安裝目錄

這個目錄包含了Nexus倉庫管理軟體和所有必需的元件,例如Java庫和配置檔案等。這個目錄預設以nexus-開始且後跟版本名,也就是nexus-3.6.0-02。在文件中,它就是 $install-dir的值。

資料目錄

這個目錄包含所有需要被Nexus倉庫進行管理的的代理倉庫,元件和資料。資料的預設位置是在/sonatype-work/nexus3下,在文件中,它就是 $data-dir的值。 
關於這兩個目錄下的資料夾的說明情況:https://help.sonatype.com/display/NXRM3/Directories

啟動Nexus3.6.0

需要的JAVA環境:Nexus Repository Manager requires a Java 8 Runtime Environment (JRE) from Oracle.

在控制檯進入nexus-3.6.0-02\bin下,執行:nexus.exe /run,會下載很多東西,當你看到 
這裡寫圖片描述 
則表明你的Nexus3.6.0啟動成功。

Nexus的預設服務埠為8081,開啟瀏覽器,輸入:localhost:8081即可進入Nexus管理系統。 
如果你的8081埠被佔用,則進入nexus-3.6.0-02\etc下找到nexus-default.properties檔案,開啟修改埠號,儲存,重新執行:nexus.exe /run

如果埠號沒有被佔用,則會看到如下介面: 
這裡寫圖片描述
點選右上角的Sign in,預設的使用者名稱是:admin,密碼:admin123。 
官方文件描述如下: 
這裡寫圖片描述
關於這個私服環境的介紹,推薦這篇部落格http://blog.csdn.net/fygkchina/article/details/62976387

註冊Nexus3.6.0服務

進入nexus-3.6.0-02\bin下執行:

nexus.exe /install <optional-service-name>
  • 1

optional-service-name是服務名稱,可以隨便起。 
完成後就可以在工作管理員中找到該服務: 
這裡寫圖片描述 
我這裡取名為nexus3.6。

可以通過執行:

nexus.exe /uninstall <optional-service-name>
  • 1

來登出服務,我試過了,好像並不能登出,媽蛋! 
成功註冊服務之後,啟動Nexus3.6.0就有兩種辦法了: 
(1)通過工作管理員來啟動和關閉服務 (我喜歡安裝成Windows的服務方便【我取名MyNexus】)
(2)通過在G:\nexus-3.6.0-02-win64\nexus-3.6.0-02\bin下執行:nexus.exe /start nexus3.6和nexus.exe /stop nexus3.6來啟動和關閉該服務。

至此所有的nexus的本地搭建完成。後續專案通過nexus私服下載的jar包,都會快取在sonatype-work的檔案裡

第二步:配置apache-maven-3.5.2和本地的local Repository

2.1 下載apache-maven-3.5.2  

進入Apache Maven 官網 點選開啟連結下載  然後解壓,並且在conf目錄下複製一份settings-defineName.xml

解壓後 我的conf目錄下圖

接下來就是配置settings-mengxp的配置。

2.2 配置settings-mengxp.xml

首先配置兩個屬性 

2.2.1 <localRepository>H:\source\local-repository</localRepository>

localRepository是專案需要的jar包保留在本地的maven-repo庫的路徑,自己定義一個資料夾即可.

2.2.2 

配置第一步中搭建的Nexus私服的地址。其中mirrorOf(預設值* 即可)  url 很重要。

<mirrorOf></mirrorOf>標籤裡面放置的是要被映象的Repository ID。為了滿足一些複雜的需求,Maven還支援更高階的映象配置: 

  • <mirrorOf>*</mirrorOf> 

            匹配所有遠端倉庫。 

  • <mirrorOf>repo1,repo2</mirrorOf> 

            匹配倉庫repo1和repo2,使用逗號分隔多個遠端倉庫。 

  • <mirrorOf>*,!repo1</miiroOf> 

            匹配所有遠端倉庫,repo1除外,使用感嘆號將倉庫從匹配中排除

Url:是2.1搭建的nexus私服地址。下圖中的maven-public是建立的一個group,一個組能夠存在多個Repository倉庫。

<mirrors>
<mirror>
 <id>myNexus</id>
<mirrorOf>*</mirrorOf>
<name>mengxp_nexus</name>
<url>http://localhost:8081/repository/maven-public/</url>
</mirror>
</mirrors>

其他的具體引數可以參考 點選開啟連結

第三步:配置專案的pom.xml  主要兩種 單模組的Maven Pro和多模組的Maven Pro

當IDEA整合的maven外掛,第一次執行時,需要將相關的外掛plugins jar包下載在本地的local repo中。

3.1 單模組的maven專案的pom.xml,包含了所有常用的plugin外掛的配置。

預設會在專案src同級目錄下生成Target檔案。裡面存在著生成的lib conf bin 等資料夾。

bin:src/main/scripts 目錄下的指令碼copy到bin目錄下。

conf:src/main/resources目錄下的配置檔案

lib:本專案的依賴包和專案jar()包都會存在lib目錄下。

這裡需要注意的是 lib下的會生成兩個jar  第一個是jar包(*.class),第二個是原始碼包(裡面是*.java)

FirstMavenProo-1.0-SNAPSHOT.jar 專案的jar包,不是依賴包(jar-with-dependencies)但是這個lib下存在他的依賴包。

下面3.2會配置打成依賴包的方式。



<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>FirstMavenPro</groupId>
    <artifactId>FirstMavenPro</artifactId>
    <packaging>pom</packaging>
    <version>all</version>
    <dependencies>
        <dependency>
            <groupId>org.elasticsearch.client</groupId>
            <artifactId>transport</artifactId>
            <version>5.6.4</version>
        </dependency>

        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>2.9.1</version>
        </dependency>
    </dependencies>


    <!-- 配置打包的方式 -->
    <build>
        <!--打包前的各種source定義-->
        <sourceDirectory>src/main/java</sourceDirectory>
        <resources>
            <!-- 把src/main/resources目錄下所有的檔案拷貝到conf目錄中 -->
            <resource>
                <directory>src/main/resources</directory>
                <targetPath>${project.build.directory}/conf</targetPath>
            </resource>
            <!-- 把lib目錄下所有的檔案拷貝到lib目錄中(可能有些jar包沒有辦法在maven中找到,需要放在lib目錄中) -->
            <resource>
                <directory>lib</directory>
                <targetPath>${project.build.directory}/lib</targetPath>
            </resource>
            <!-- 把放在根目錄下的指令碼檔案.sh,.bat拷貝到bin目錄中 -->
            <resource>
                <directory>src/main/scripts</directory>
                <includes>
                    <include>*.sh</include>
                    <include>*.bat</include>
                </includes>
                <targetPath>${project.build.directory}/bin</targetPath>
            </resource>
        </resources>

        <!-- 所有的plugins -->
        <plugins>
            <!-- 1.用於編譯的plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <fork>true</fork>
                    <source>1.8</source>
                    <target>1.8</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>

            <!-- 2.用於生成jar包的plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <!-- 把生成的jar包放在lib目錄下(和其他所有jar包一起) -->
                    <outputDirectory>${project.build.directory}/lib</outputDirectory>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <classpathPrefix>lib/</classpathPrefix>
                        </manifest>
                    </archive>
                    <excludes>
                        <!-- 排除掉一些檔案,不要放到jar包中,
                        這裡是為了排除掉src/main/resources中的檔案(它們應該放到conf目錄)
                        這裡只能指定要排除的目標檔案,而不能指定原始檔,雖然不夠完美,但是基本能達到目的。 -->
                        <exclude>*.xml</exclude>
                        <exclude>*.properties</exclude>
                    </excludes>
                </configuration>
            </plugin>

            <!-- 3.用於拷貝maven依賴(lib)的plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.10</version>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <!-- 把依賴的所有maven jar包拷貝到lib目錄中(這樣所有的jar包都在lib目錄中) -->
                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- 4.用於拷貝resource資料夾 的plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.7</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>

            <!-- 5.配置生成原始碼jar的plugin[這裡的原始碼是指java檔案,不是class檔案]-->
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <attach>true</attach>
                    <!-- 配置原始碼jar檔案的存放路徑,和其他jar檔案一起放在lib目錄 -->
                    <outputDirectory>${project.build.directory}/lib</outputDirectory>
                </configuration>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <!-- 6.配置生成javaDoc.jar的plugin一般不需要-->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.2</version>
                <configuration>
                    <aggregate>true</aggregate>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>

3.2 是maven多模組的Pro 的pom.xml的配置

首先看大圖我的專案存在兩個模組

專案一的pom.xml 截圖和具體的配置如下。  採用maven-assembly-plugin 配置滿足了打成依賴包的方式 (jar-with-dependencies )


<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>maven-mult-modules</artifactId>
        <groupId>maven-mult-modules</groupId>
        <version>1.0</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>OneModule</artifactId>

    <dependencies>
        <dependency>
            <groupId>org.elasticsearch.client</groupId>
            <artifactId>transport</artifactId>
            <version>5.6.4</version>
        </dependency>

        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>2.9.1</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <!-- NOTE: We don't need a groupId specification because the group is
                    org.apache.maven.plugins ...which is assumed by default. -->
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <!--當僅僅需要打依賴包時,src/main/assembly/src.xml 不需要-->
                   <!-- <descriptors>
                        <descriptor>src/main/assembly/src.xml</descriptor>
                    </descriptors>-->
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id> <!-- this is used for inheritance merges -->
                        <phase>package</phase> <!-- bind to the packaging phase -->
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

專案二 採用maven-assembly-plugin
會將bin conf lib(包含了專案的依賴包和專案本身的jar(不是依賴包)) 包打成一個tar.gz 或者zip格式的壓縮包,更加方便。

需要配置兩個檔案

1.src\main\assembly\assembly.xml 

<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
    <id>all</id><!--可以隨便定義的,會載入tar.gz包名後-->
    <formats>
        <format>tar.gz</format>
        <format>dir</format>
    </formats>
    <dependencySets>
        <dependencySet>
            <useProjectArtifact>true</useProjectArtifact>
            <outputDirectory>lib</outputDirectory>
         </dependencySet>
    </dependencySets>
    <fileSets>
        <fileSet>
            <outputDirectory>/</outputDirectory>
            <includes>
                <include>README.txt</include>
            </includes>
        </fileSet>
        <fileSet>
            <directory>src/main/scripts</directory>
            <outputDirectory>/bin</outputDirectory>
            <fileMode>0777</fileMode>
        </fileSet>
        <fileSet>
            <directory>src/main/resources</directory>
            <outputDirectory>/config</outputDirectory>
            <excludes>
                <exclude>base.conf</exclude>
            </excludes>
            <fileMode>0644</fileMode>
        </fileSet>
    </fileSets>
</assembly>

2.pom的配置

<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>maven-mult-modules</artifactId>
        <groupId>maven-mult-modules</groupId>
        <version>1.0</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>TwoModule</artifactId>
    <dependencies>
        <dependency>
            <groupId>org.elasticsearch.client</groupId>
            <artifactId>transport</artifactId>
            <version>5.6.4</version>
        </dependency>

        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>2.9.1</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <descriptors>
                        <descriptor>src/main/assembly/assembly.xml</descriptor>
                    </descriptors>
                    <archive>
                        <manifest>
                            <mainClass/>
                        </manifest>
                    </archive>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>


至此一般的基本的maven相關的專案應該都沒有問題了。

後續的文章會繼續寫下去,介紹google 的protocolBuffer 和Hbase的協處理器具體的程式碼。

希望和大家一起進步。

相關推薦

搭建Nexus Repository 3.6.0-02配置apache-maven-3.5.2本地local Repository以及專案pom.xml(IDEA 打包)

本文主要目的: 為了讓Maven管理專案的所有依賴包,Release和Snapshot . 本文涉及如下三點: 1.windows 下搭建Nexus Repository 3.6.0-02(linux下思路一樣) 2.配置apache-maven-3.5.2中的settin

nexus-3.6.0-02-unix.tar.gz安裝(Centos下),maven setting.xml配置案例,專案root的pom.xml配置,parent-pompom.xml配置案例

1、下載nexus 2、Centos下安裝Nexus 安裝JDK,此處略,檢查自己虛擬機器上的JDK版本如下: 使用xftp將nexus上傳到:/home/tuzq/software 首先解壓下載到的檔案: [[email 

Weblogic 10.3.6.0 叢集搭建

Weblogic 叢集搭建 Oracle的Weblogic分開發者版本和生產版本,有32位和64位。一般生產版本的weblogic是64位的,安裝檔案是一個大小為1G多的jar包。去oracle官網上下載64版weblogic。這裡使用的版本是weblogic11g,版

在 Ubuntu 16.04 LTS 上安裝 Python 3.6.0

tty article print spa blog sdn number ins 6.0 轉自(http://blog.csdn.net/Wangdada111/article/details/73382537?locationNum=2&fps=1) 安裝:

selenium 3.6.0 geckodriver的一次坑

path tar 版本 錯誤信息 hosts exceptio 127.0.0.1 ref selenium Traceback (most recent call last): File "./se3.py", line 16, in <module>

WebLogic 10.3.6.0 升級反序列化漏洞補丁

成功 wget命令 下載 攻擊 generic 價格 server move 被黑 由於最近比特幣被炒到近乎不可思議的價格,所以網絡上的肉雞都被黑產們一個個培養成了挖礦雞。今兒就聊聊如何進行WebLogic10的反序列化漏洞的升級方法。 1、修改bsu.sh 把內存

關於weblogic 10.3.6.0 的漏洞復現(1)

iter oid sch AD 成功 str context blog env 最近小R 搭建了個weblogic, 因為之前在公司找系統漏洞的時候,發現了這個漏洞,所以為了特地專門搭建了個10.3.6.0版本。 漏洞編號: CVE-2017-10271 漏洞的描述:就是

Hibernate Validator 6.0.7.Final 之二(詳解ValidatorConstraintViolation)

Validator介面在bean的校驗中扮演非常重要的角色。本文將詳細講解該介面。 獲取該介面的方法 ValidatorFactory factory = Validation.buildDefaultValidatorFactory(); validator =

3.6 rc指令碼(start方法) 3.7 rc指令碼(stopstatus方法) 3.8 rc指令碼(以daemon方式啟動)

3.6-3.7 rc指令碼(start、stop和status方法) #!/usr/bin/env python # -*- coding: utf-8 -*- # [@Version](https://my.oschina.net/u/931210) : python 2.7 # [@Time

教程篇(6.0) 02. 防火牆策略 ❀ 飛塔 (Fortinet) 網路安全專家 NSE4

在本課中,你將學習如何理解和應用防火牆策略來允許和拒絕通過FortiGate的流量。它的核心是防火牆,所以它對你的流量所做的幾乎所有事情都與你的防火牆策略相關聯。 在本次課程中,你將探討以下主題: 防火牆策略 配置防火牆策略 管理防火牆策略 最佳實踐和

yum 安裝 mongo 3.6.0

yum 安裝mongo 建立映象 1 vi /etc/yum.repos.d/mongodb-org-3.6.repo 新增一下路徑 儲存退出 [mongodb-org-3.6] name=MongoDB Repository baseurl=https://repo.mo

weblogic打補丁,bsu升級10.3.6.0.12

weblogic打補丁,bsu方法 剛裝了10.3.6版本的weblogic,想把版本補丁到10.3.6.0.12 我用的系統是windows 8.1 ,呵呵 檢視版本 執行java weblogic.version WebLogic Serv

Jira 6.3.6(破解)+SVN+apache

服務器 客戶端 操作系統 linux 程序 jira Jira 6.3.6(破解)+SVN+apache JIRA 安裝1、 準備工作Linux RadHat 5.8 rhel-server-5.8-64-dvd.iso \*操作系統鏡像JDK1.6j

安裝IIs配置IIs 錯誤3

開發平臺 分享 title http 錯誤 lac back 右鍵 tar reg 1.HTTP 錯誤 500.21 - Internal Server Error 解決方案 2. 不久前重新安裝了Windows7,在安裝了VS2010 開發平臺之後,將網站發布到IIS

[C指標] 4-語句、5-操作符表示式、6-指標

第4章 語句 4.1 表示式語句 C並不存在專門的“賦值語句”,賦值就是一種操作,就像加法和減法一樣,所以賦值就在表示式內進行。 你只要在表示式後面加上一個分號,就可以把表示式轉變成語句。所以下面這兩個表示式實際上是表示式語句,而不是賦值語句。 x = y + 3; ch = getchar();

Failed to process JAR [jar:file:/D:/develop/apache-maven-3.5.4-bin/qiluo_repository/com/qiluo/dingzhi-pojo/0.0.1-SNAPSHOT/dingzhi-pojo-0.0.1-SNAPSHOT.

Failed to process JAR [jar:file:/D:/develop/apache-maven-3.5.4-bin/qiluo_repository/com/qiluo/dingzhi-pojo/0.0.1-SNAPSHOT/dingzhi-pojo-0.0.1-SNAPSHOT.jar!/

Windows10離線安裝Anaconda3-4.2.0-Windows-x86_64.exe(對應python3.5tensorflow_gpu-1.7.0-cp35-cp35m-win_amd

Windows10離線安裝Anaconda3-4.2.0-Windows-x86_64.exe(對應python3.5)和tensorflow_gpu-1.7.0-cp35-cp35m-win_amd64.whl(對應GPU版本的tensorflow,35表示著對應python3.5) 安裝這個

oracle 11.2.0.4安裝配置goldengate 12.3.0.14 並配置表級初始化 (僅針對DML)

一、環境介紹 source: Redhat 6.10 + oracle 11.2.0.4 + ogg 12.3.0.14  target: Redhat 6.10 + oracle 11.2.0.4 + ogg 12.3.0.14 二、安裝goldengate軟體

最新版本OpenCV 3.1.0 beta環境配置

STEP ONE 開啟OpenCV官網 開啟Release 直接點選開啟,這個.exe就是一個自解壓程式 出現如下介面,選一下路徑 解壓中... 解壓完成後,指定的路徑下會有名為OpenCV的資料夾 build 支援OpenCV使用的

Mono 4.0 Mac上執行asp.net mvc 5.2.3

使用Xamarin Studio 建立了一個asp.net mvc 專案: 模版使用的是5.2.0 版本的,目標框架是Mono/.NET 4.5,我通過Nuget 更新到了5.2.3 , 更新包的過程中需要調整下web.config System.Web.Mvc的版本從5.2.0 更新為5.2.