我希望能够从MacOS命令行执行同样的运行。请问如何让IntelliJ IDEA显示出我需要执行运行配置的命令(或命令)。
这是`gradle`的`build.gradle`文件:
plugins {
id 'org.springframework.boot' version '2.6.4'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'java'
}
group = 'org.mountsinai'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = "15"
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jdbc'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
runtimeOnly 'com.microsoft.sqlserver:mssql-jdbc'
implementation group: 'org.springframework', name: 'spring-aspects', version: '5.3.15'
implementation group: 'nz.net.ultraq.thymeleaf', name: 'thymeleaf-layout-dialect', version: '3.0.0'
implementation group: 'com.jayway.jsonpath', name: 'json-path', version: '2.7.0'
implementation group: 'com.github.pcj', name: 'google-options', version: '1.0.0'
implementation 'com.google.code.gson:gson:2.9.0'
}
tasks.named('test') {
useJUnitPlatform()
minHeapSize = "1024m" // initial heap size
maxHeapSize = "2048m" // maximum heap size
}
targetCompatibility = JavaVersion.VERSION_15
这是我想要在命令行上自动化运行的内容,在 ./.idea/workspace.xml
中的 configuration
元素:
<configuration name="IrwMetadataIntegrationApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
<module name="org.mountsinai.IRWMetadataIntegration.main" />
<option name="SPRING_BOOT_MAIN_CLASS" value="org.mountsinai.IRWMetadataIntegration.IrwMetadataIntegrationApplication" />
<option name="PROGRAM_PARAMETERS" value="--algorithm=batch --numOfStudiesToRetrieve=600" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<option name="ALTERNATIVE_JRE_PATH" value="15" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
我的原始问题现在可以更具体地提出:如何将IDEA配置和workspace.xml文件转换为可在IntelliJ IDEA之外执行的命令(或脚本)?请注意保留HTML标签,以下是需要翻译的内容:
使用
IntelliJ IDEA 2021.3.2 (Ultimate Edition) Build #IU-213.6777.52, built on January 27, 2022
感谢,Arthur。
maven
、gradle
等等,结合compiler
、interpreter
等等。你在问题中没有指定这些内容,而你的答案就在其中。 - Rohit Babumvnw clean spring-boot:run
命令将运行你的Spring Boot代码。 - Ashish Patilgradle
信息。 - Arthurgradle
命令的GUI版本。据我所知,你必须运行相应的gradle
命令才能完成运行配置的工作。你可以在任何编辑器(比如记事本)中检查你的运行配置文件以了解更多信息。 - Rohit Babu./.idea/workspace.xml
中找到了运行配置文件。它是一个相当大(337行)且复杂的文件。我将把我关心的运行配置放在上面的问题中。 - Arthur