更改IDEA的默认设置目录
在idea安装路径bin目录找到idea.properties,修改里面的参数如下主要修改config、system。
# Uncomment this option if you want to customize a path to the settings directory.
#---------------------------------------------------------------------
# idea.config.path=${user.home}/.IntelliJIdea/config
idea.config.path=D:/software/IntelliJ IDEA 2022.3.2/config
#---------------------------------------------------------------------
# Uncomment this option if you want to customize a path to the caches directory.
#---------------------------------------------------------------------
# idea.system.path=${user.home}/.IntelliJIdea/system
idea.system.path=D:/software/IntelliJ IDEA 2022.3.2/system
#---------------------------------------------------------------------
# Uncomment this option if you want to customize a path to the user-installed plugins directory.
#---------------------------------------------------------------------
idea.plugins.path=${idea.config.path}/plugins
#---------------------------------------------------------------------
# Uncomment this option if you want to customize a path to the logs directory.
#---------------------------------------------------------------------
idea.log.path=${idea.system.path}/log
注意:最重要一点,如果安装idea时经过设置的,最好把原先\Roaming\JetBrains\IntelliJIdea2022.3.2复制到D:/software/IntelliJ IDEA 2022.3.2/config、\Local\JetBrains\IntelliJIdea2022.3.2复制到D:/software/IntelliJ IDEA 2022.3.2/system里面的数据原封不动的复制一份到目标目录,然后重启idea就可以了。