- 在命令行中运行
spring init --list
。控制台中会出现依赖项和参数列表:..... (omitted for brevity) ....
参数 +-------------+------------------------------------------+-------------------------------+ | Id | 描述 | 默认值 | +-------------+-------------------------------------------+-----------------------------------------------+ | artifactId | 项目坐标(推断存档名称) | demo | | bootVersion | spring boot 版本 | 2.5.1 | | description | 项目描述 | Spring Boot 的演示项目 | | groupId | 项目坐标 | com.example | | javaVersion | 语言级别 | 11 | | 语言 | 编程语言 | java | | 名称 | 项目名称(推断应用程序名称) | demo | | packageName | 根包 | com.example.demo | | 包装 | 项目包装 | jar | | 类型 | 项目类型 | maven-project | | 版本 | 项目版本 | 0.0.1-SNAPSHOT | +-------------+-------------------------------------------+-----------------------------------------------+
2. Using the suggested docs, try to run init a spring app with a custom package name, e.g. :
spring init --packageName=com.skryvets.demo spring-demo
### Expected result:
Spring app should be created. The following (or similar output) should be produced in the console:
使用https://start.spring.io上的服务 项目提取到 '/yourfolder/spring-demo'
### Actual result:
Spring app creation fails with the following message: `packageName is not a recognized option`
### Notes:
The reason I put "doesn't fit the naming convention of other parameters" in the description as it seems like all other options are "camel cased" whereas this particular one is dash separated. There are 2 way of fixing - either changing the docs or parameter name. I felt like changing the parameter is more appropriate in this case.