我想从 Eclipse 切换到 Visual Studio Code 并开始使用 Microsoft GitHub Copilot。
我正在寻找与maven相关的设置来指定settings.xml文件,因为目前它在项目文件夹中创建了一个文件夹“~”,并且我不想拥有.m2/repository每个项目。
我也在寻找在哪里添加程序参数,例如 Spring Boot 应用程序的
--spring.config.import=config/application-backend.yaml --spring.profiles.active=env-local
。
在 vscode 中,您可以使用以下设置指定 shehe 的路径
// Specifies the absolute path of your maven configuration file, the default value is ~/.m2/settings.xml
// Replace /path/to/your/settings.xml with the actual path to your settings.xml file.
"maven.settingsFile": "/path/to/your/settings.xml",
有关它的更多设置,您可以在
设置面板中搜索
settings.xml
可以在lausn中添加
args
配置,为程序添加参数。例如:
"configurations": [
{
"type": "java",
"name": "Debug (Launch) - YourApplication",
"request": "launch",
"mainClass": "com.example.YourApplication",
"args": [
"--spring.config.import=config/application-backend.yaml",
"--spring.profiles.active=env-local"
]
}
]
https://code.visualstudio.com/docs/java/java-debugging#_configuration-options