mirror of
https://github.com/judasn/IntelliJ-IDEA-Tutorial.git
synced 2025-12-08 19:05:55 +00:00
新增 VM Options 统一配置介绍
This commit is contained in:
parent
663cc8c5d6
commit
52832d194e
@ -67,6 +67,7 @@
|
||||
- [IntelliJ IDEA 常用细节-2](settings-introduce-2.md)
|
||||
- [IntelliJ IDEA 常用细节-3](settings-introduce-3.md)
|
||||
- [IntelliJ IDEA 常用细节-4](settings-introduce-4.md)
|
||||
- [Java 大型项目 VM 配置](vm-settings.md)
|
||||
- **插件推荐、插件开发**
|
||||
- [插件相关功能设置、插件推荐](plugins-settings.md)
|
||||
- [Java 热部署插件 JRebel 安装及使用](jrebel-setup.md)
|
||||
|
||||
35
vm-settings.md
Normal file
35
vm-settings.md
Normal file
@ -0,0 +1,35 @@
|
||||
|
||||
## 编译阶段
|
||||
|
||||
- 路径: `Settings | Build, Execution, Deployment | Compiler > Build Process`
|
||||
- 以下两个类型选一个:
|
||||
- Shared build process: 该配置存储到 .idea 的 compiler.xml 文件中,该文件可以提交到 git 方便团队成员公用项目配置(团队成员电脑都不错的情况下可以公用)
|
||||
- Shared heap size >> 2000 Mbytes
|
||||
- Shared VM options >> -Xmx3g
|
||||
- User-local build process: 该配置存储到 .idea 的 workspace.xml 文件中,一般不提交到 git,属于个人配置
|
||||
- User-local heap size >> 2000 Mbytes
|
||||
- User-local VM options >> -Xmx3g
|
||||
|
||||
|
||||
## Maven 配置
|
||||
|
||||
- 路径: `Settings | Build, Execution, Deployment | Build Tools | Maven`
|
||||
- Thread count 填写你 CPU 中 performance core 的数量
|
||||
- macOS 查看核心命令:
|
||||
```
|
||||
system_profiler SPHardwareDataType | grep -i "core"
|
||||
结果如下,我是 8 个性能核心,所以这里建议填写 8
|
||||
Total Number of Cores: 12 (8 performance and 4 efficiency)
|
||||
```
|
||||
|
||||
- 路径: `Settings | Build, Execution, Deployment | Build Tools | Maven | Importing`
|
||||
- `VM options for importer:` 填写 `-Xmx1500m`
|
||||
- 路径: `Settings | Build, Execution, Deployment | Build Tools | Maven | Runner`
|
||||
- `VM options: ` 填写 `-Xmx1500m`
|
||||
|
||||
|
||||
## Spring Boot 项目运行
|
||||
|
||||
- 点击右上角运行类的下拉框: `Edit Configurations`
|
||||
- 在 Run/Debug Configurations 弹出框, 点击 `modify options` 在出现的选项列表中选择: `Add VM Options`
|
||||
- 这时候 Run/Debug Configurations 界面就多了一个 VM Options 输入框: `Xmx2000m`
|
||||
Loading…
x
Reference in New Issue
Block a user