zoukankan      html  css  js  c++  java
  • Spring Boot 升级框架版本 Spring 5.2 Invalid argument syntax org.springframework.core.env.Simple CommandLineArgs

    Invalid argument syntax org.springframework.core.env.Simple CommandLineArgs Parser.parse

    具体问题应该是启动的commandline 输入命令格式问题

    Purpose
    This CommandLinePropertySource implementation aims to provide the simplest possible approach to parsing command line arguments. As with all CommandLinePropertySource implementations, command line arguments are broken into two distinct groups: option arguments and non-option arguments, as described below (some sections copied from Javadoc for SimpleCommandLineArgsParser):

    Working with option arguments
    Option arguments must adhere to the exact syntax:

    --optName[=optValue]
    That is, options must be prefixed with "--" and may or may not specify a value. If a value is specified, the name and value must be separated without spaces by an equals sign ("="). The value may optionally be an empty string.

    正确的命令行示例:

    Valid examples of option arguments
    --foo
    --foo=
    --foo=""
    --foo=bar
    --foo="bar then baz"
    --foo=bar,baz,biz

    错误的命令行示例

    Invalid examples of option arguments
    -foo
    --foo bar
    --foo = bar
    --foo=bar --foo=baz --foo=biz
    Working with non-option arguments
    Any and all arguments specified at the command line without the "--" option prefix will be considered as "non-option arguments" and made available through the CommandLineArgs.getNonOptionArgs() method.

    Typical usage
    public static void main(String[] args) {
    PropertySource ps = new SimpleCommandLinePropertySource(args);
    // ...
    }
    See CommandLinePropertySource for complete general usage examples.
    Beyond the basics

  • 相关阅读:
    超哥笔记--linux准备知识(1)
    爬虫系列---scrapy全栈数据爬取框架(Crawlspider)
    爬虫系列---scrapy post请求、框架组件和下载中间件+boss直聘爬取
    pymongo 一篇文章搞定
    一篇文章搞定mongodb
    python进阶(四) windows下虚拟环境使用
    java基础(四) -变量类型
    java基础(二) -对象和类
    java基础(一) -语法
    Linux常用命令大全
  • 原文地址:https://www.cnblogs.com/fishpro/p/SpringBootCommandLineArgs.html
Copyright © 2011-2022 走看看