springboot 的“java -jar xxx.jar 包名.类 参数....“的各种情况

一 项目工程说明

1.1 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">
  <modelVersion>4.0.0</modelVersion>

  <!-- 引入springboot 的父类-->
  <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.2.6.RELEASE</version>
    <relativePath/>
  </parent>
  <groupId>com.bonc.arithmetic.operator</groupId>
  <artifactId>dky-Aggeration-operator</artifactId>
  <version>1.0-SNAPSHOT</version>

  <name>dky-Aggeration-operator</name>
  <!-- FIXME change it to the project's website -->
  <url>http://www.example.com</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
  </properties>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13</version>
      <scope>test</scope>
    </dependency>
    <!--  iotdb -->
    <dependency>
      <groupId>org.apache.iotdb</groupId>
      <artifactId>iotdb-session</artifactId>
      <version>0.12.0</version>
    </dependency>

  </dependencies>
  <build>
    <finalName>dky-Aggeration-operator</finalName>
    <plugins>
      <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <version>2.3.4.RELEASE</version>
      <configuration>
        <mainClass>com.bonc.arithmetic.operator.handler.ReguleArtAggeration</mainClass>
      </configuration>
      </plugin>
    </plugins>
  </build>
</project>

1.2 调用主类

二 执行jar包

2.1 直接执行jar包

java -jar dky-Aggeration-operator.jar

此时执行pom文件指定的主类,按照配置执行

2.2 直接执行jar包 并指定类名进行执行

java -jar dky-Aggeration-operator.jar ReguleArtAggeration

2.3 直接执行jar包 并指定类名 参数 执行

java -jar dky-Aggeration-operator.jar ReguleArtAggeration 3_GhZRQ 3_GWGhZRQ_BW

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值