IDEA初始化配置

1.文件编码配置

文件 编码

2. 修改快捷键

在这里插入图片描述

3.智能提示

在这里插入图片描述

4.优化导包

在这里插入图片描述

5.代码不折叠

在这里插入图片描述

6.不打开上一次关闭的工程,新窗口打开新工程

在这里插入图片描述

7.Ctrl + 滚轮改变字体大小

在这里插入图片描述

8.不提示更新软件

在这里插入图片描述

9.注释智能缩进

在这里插入图片描述

10.同一包下的类不以*代替

在这里插入图片描述

11.设置字体

设置编辑器字体

在这里插入图片描述

设置控制台字体

在这里插入图片描述

12.类文件头模板

在这里插入图片描述

/**
 * @ClassName ${NAME}
 * @Description
 * @Author ${USER}
 * @Time ${DATE} ${TIME}
 * @Version 1.0
 */

13.参数智能提示

在这里插入图片描述
在这里插入图片描述

14.git自动添加

在这里插入图片描述

15.maven配置

maven是依赖管理工具包,虽然IDEA自带,这个不好用,我们要自己配置
https://maven.apache.org/download.cgi
在这里插入图片描述

下面是我的配置
在这里插入图片描述
在这里插入图片描述
maven setting.xml

<?xml version="1.0" encoding="UTF-8"?>

<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->

<!--
 | This is the configuration file for Maven. It can be specified at two levels:
 |
 |  1. User Level. This settings.xml file provides configuration for a single user,
 |                 and is normally provided in ${user.home}/.m2/settings.xml.
 |
 |                 NOTE: This location can be overridden with the CLI option:
 |
 |                 -s /path/to/user/settings.xml
 |
 |  2. Global Level. This settings.xml file provides configuration for all Maven
 |                 users on a machine (assuming they're all using the same Maven
 |                 installation). It's normally provided in
 |                 ${maven.conf}/settings.xml.
 |
 |                 NOTE: This location can be overridden with the CLI option:
 |
 |                 -gs /path/to/global/settings.xml
 |
 | The sections in this sample file are intended to give you a running start at
 | getting the most out of your Maven installation. Where appropriate, the default
 | values (values used when the setting is not specified) are provided.
 |
 |-->
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <!-- localRepository
   | The path to the local repository maven will use to store artifacts.
   |
   | Default: ${user.home}/.m2/repository
  <localRepository>/path/to/local/repo</localRepository>
  -->
 <localRepository>D:\maven_local_space</localRepository>
  <!-- interactiveMode
   | This will determine whether maven prompts you when it needs input. If set to false,
   | maven will use a sensible default value, perhaps based on some other setting, for
   | the parameter in question.
   |
   | Default: true
  <interactiveMode>true</interactiveMode>
  -->

  <!-- offline
   | Determines whether maven should attempt to connect to the network when executing a build.
   | This will have an effect on artifact downloads, artifact deployment, and others.
   |
   | Default: false
  <offline>false</offline>
  -->

  <!-- pluginGroups
   | This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e.
   | when invoking a command line like "mvn prefix:goal". Maven will automatically add the group identifiers
   | "org.apache.maven.plugins" and "org.codehaus.mojo" if these are not already contained in the list.
   |-->
  <pluginGroups>
    <!-- pluginGroup
     | Specifies a further group identifier to use for plugin lookup.
    <pluginGroup>com.your.plugins</pluginGroup>
    -->
  </pluginGroups>

  <!-- proxies
   | This is a list of proxies which can be used on this machine to connect to the network.
   | Unless otherwise specified (by system property or command-line switch), the first proxy
   | specification in this list marked as active will be used.
   |-->
  <proxies>
    <!-- proxy
     | Specification for one proxy, to be used in connecting to the network.
     |
    <proxy>
      <id>optional</id>
      <active>true</active>
      <
### Intellij IDEA 中 Maven 的初始配置地址与设置方法 在 IntelliJ IDEA 中,Maven 的初始配置可以通过以下方式完成。默认情况下,IntelliJ IDEA 使用其内置的 Maven 配置[^1]。用户可以在设置中指定自定义的 Maven 配置文件路径或使用默认路径。 #### 1. 默认 Maven 设置文件路径 Maven 的全局设置文件通常位于以下路径: - **Windows**: `C:\Users\<Your_Username>\.m2\settings.xml` - **macOS/Linux**: `~/.m2/settings.xml` 如果该文件不存在,Maven 会使用其安装目录下的默认设置文件,通常位于 `${MAVEN_HOME}/conf/settings.xml`[^2]。 #### 2. 在 IntelliJ IDEA配置 Maven 用户可以通过以下步骤配置 Maven: - 打开 IntelliJ IDEA,进入 `File > Settings > Build, Execution, Deployment > Build Tools > Maven`。 - 在 `Maven` 设置页面中,可以指定 Maven 的 `Home directory` 和 `User settings file` 路径。如果需要使用自定义的 `settings.xml` 文件,可以在此处指定路径[^3]。 #### 3. 示例代码:检查 Maven 配置文件 以下是一个简单的脚本,用于检查是否存在自定义的 `settings.xml` 文件: ```bash # 检查用户级别的 settings.xml 文件是否存在 if [ -f ~/.m2/settings.xml ]; then echo "User-level settings.xml exists." else echo "User-level settings.xml does not exist." fi ``` #### 4. 注意事项 - 如果用户未指定自定义的 `settings.xml` 文件,IntelliJ IDEA 将使用 Maven 安装目录中的默认设置文件。 - 在多模块项目中,确保每个模块的 `pom.xml` 文件正确引用依赖项,并且父项目的 `pom.xml` 文件包含所有子模块的声明[^4]。
评论 58
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Jasonakeke

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值