10.08-Idea的相关配置

余生颓废 提交于 2020-01-09 14:38:11

【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>>

一、Idea导入新项目Maven路径发生改变的问题

1 --> 项目的设置

2 -->全局的设置

在 2 中的Default Setting中设置Maven,就可以避免导入新项目maven的路径发生改变的情况(当然1中部分设置也是全局的,这里主要针对maven的设置)

二、Idea的springboot项目热部署设置

2.1、 在pom.xml中加入依赖

<!--热部署-->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <optional>true</optional>
    <scope>runtime</scope>
</dependency>

<plugins>
    <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <configuration>
            <fork>true</fork>
        </configuration>
    </plugin>
</plugins>

2.2、 系统设置

在File - Setting - Build,Execution,Deployment - Complier -Build project automatically 勾上

然后,Ctrl + Shift + Alt + /  ,如下图:

找到 compiler.automake.allow.when.app.running   勾上

三、Idea上传项目到Gitee上

3.1、 在 https://gitee.com/  上注册码云账户,安装Git , 完成以后,打开Git Bash

3.2、 生成连接GItee的SSH Key

    (1) 输入注册时的邮箱,回车

         ssh-keygen -t rsa -C "xxxxx@xxxxx.com"

    (2) 然后一直回车,如下图即为成功

        

    (3) 查看你的 public key,并把他添加到码云(Gitee.com) SSH key添加地址:https://gitee.com/profile/sshkeys)
   cat ~/.ssh/id_rsa.pub

    (4)添加后,在终端(Terminal)中输入 “ssh -T git@gitee.com”, 若返回 “Welcome to Gitee.com,yourname!”, 则证明添加成功 (注:有可能出现Warning的情况,也属于成功)

3.3、 设置基本信息

$ git config --global user.name "yourname"
$ git config --global user.email "youremail@youremail.com"
 
 
 
 
 
 
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!