zoukankan      html  css  js  c++  java
  • 1.3使用marven Spring项目快速搭建

    自己开发了一个股票智能分析软件,功能很强大,需要的点击下面的链接获取:

    https://www.cnblogs.com/bclshuai/p/11380657.html

    1.3  Spring项目快速搭建

    (1)marven介绍

    marven是软件项目管理工具,可以方便的创建项目,管理依赖关系,自动从远程仓库下载依赖包到本地仓库m2文件夹中。

    (2)dependency三要素

    通过pom.xml文件配置依赖的jar包,会自动根据配置文件下载。依赖三要素

    1)   groupId:组织标识

    2)   artifactId:项目标识;

    3)   version版本号;

    <dependency>
             <groupId>com.hikvision.pbg.jc.ishelf</groupId>
             <artifactId>ishelf-web-business</artifactId>
             <version>${ishelf-web-business-version}</version>
          </dependency>

    (2)<properities>定义属性

    例如定义一个版本号,然后在version中使用${proname}来引用属性。

    <properties>
    <ishelf-web-business-version>2.0.0-SNAPSHOT</ishelf-web-business-version>
    </properties>

    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>

       <parent>
          <groupId>com.hikvision.pbg.jc.ishelf</groupId>
          <artifactId>modules</artifactId>
          <version>2.0.0-SNAPSHOT</version>
       </parent>
      
       <artifactId>ishelf-web-provider</artifactId>
       <packaging>jar</packaging>
        <properties>
    <ishelf-web-business-version>2.0.0-SNAPSHOT</ishelf-web-business-version>
    </properties>

       <dependencies>
          <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-web</artifactId>
          </dependency>
          <!-- 本服务的api接口包 -->
          <dependency>
             <groupId>com.hikvision.pbg.jc.ishelf</groupId>
             <artifactId>ishelf-web-external-api</artifactId>
             <version>2.0.0-SNAPSHOT</version>
          </dependency>
          <dependency>
             <groupId>com.hikvision.pbg.jc.ishelf</groupId>
             <artifactId>ishelf-web-business</artifactId>
             <version>${ishelf-web-business-version}</version>
          </dependency>
          <dependency>
             <groupId>com.hikvision.ga.common</groupId>
             <artifactId>hik-ga-boot-resteasy</artifactId>
          </dependency>
       </dependencies>

    </project>
  • 相关阅读:
    日期格式,Popup的使用方法,RenderTransform与LayoutTransform的区别
    Status 网络
    以太坊: RLP 编码原理
    Merkle Patricia Tree 梅克尔帕特里夏树(MPT)详细介绍
    【转】货币的未来取决于打破关于货币历史的虚构谎言
    区块链上的保险
    Trustlines Network:以太坊上实现 Ripple 瑞波协议
    通过 BTC Relay 来实现链与链的连接
    PoW模式下交易平均要35秒,为什么为拥堵
    使用以太坊和 Metamask 再也不需要输入密码
  • 原文地址:https://www.cnblogs.com/bclshuai/p/13096114.html
Copyright © 2011-2022 走看看