当前位置:网站首页>IDEA tools commonly used configuration
IDEA tools commonly used configuration
2022-08-09 21:19:00 【Presumptuous youth ゛つ】
1、IDEACreate empty project and Module
在实际的开发中,A project may consist of multiple projects.
IDEA中的 p r o j e c t \textcolor{red}{project} project类似于eclipse中的一个workspace, 类似一个文件夹 \textcolor{red}{类似一个文件夹} 类似一个文件夹.
IDEA中的 m o d u l e \textcolor{red}{module} module则类似于eclipse中的project, A concrete code project \textcolor{red}{A concrete code project} A concrete code project.
一般,可以创建一个empty的project,然后在project中创建各种module.
1 )创建 m o d u l e 代码项目 \textcolor{red}{1)创建module代码项目} 1)创建module代码项目
2 )方式二:创建 m o d u l e \textcolor{red}{2)方式二:创建module} 2)方式二:创建module
3 )删除 m o d u l e : \textcolor{red}{3)删除module:} 3)删除module:
4 )Make the project a directory,其中包括多个 m o d u l e 【It is more common in creating microservices】 \textcolor{red}{4)Make the project a directory,其中包括多个module【It is more common in creating microservices】} 4)Make the project a directory,其中包括多个module【It is more common in creating microservices】
把项目中的src删除,只保留xxx.iml文件,在创建module, Need to pay attention to the location information of the catalog file \textcolor{red}{Need to pay attention to the location information of the catalog file} Need to pay attention to the location information of the catalog file
2、IDEA快捷键
快捷键 | 说明 |
---|---|
ctr + / | 单行注释 |
ctr + shift + / | 多行注释 |
alt + shift + down键 | 向下移动行(该行代码) |
alt + shift + up 键 | 向上移动行(该行代码) |
Alt + insert | 生成代码(get set toString等方法) 生成返回变量 记得 N u m L k \textcolor{red}{记得NumLk} 记得NumLk |
ctr + d | 向下复制一行(The line content is copied to the next line) |
ctr + o | 重写方法 |
shift + 上下键 | 选中多行 |
ctr + X | 删除行 |
ctr + P | 方法参数提示 |
ctr + alt + L | 格式化代码( Q Q 快捷键冲突 \textcolor{red}{QQ快捷键冲突} QQ快捷键冲突) |
3、IDEA模板 - Templates
代码模板 \textcolor{red}{代码模板} 代码模板:Refers to the configuration of some commonly used code letter abbreviations,When entering abbreviations,IDEA自动提示,补全代码.
内置模板 \textcolor{red}{内置模板} 内置模板:IDEA自带的模板
1)Description of common templates
模板 | 说明 | 效果 |
---|---|---|
psvm / main | 生成main方法 | public void static main(String []args){ } |
sout | 生成输出语句 | System.out.println(); |
fori | 生成for循环 | for(int i =0 i < ; i++){ } |
list.for | 生成集合list的for循环 | |
i f n \textcolor{red}{ifn} ifn | 判断是否为null | if (args == null) { } |
. v a r \textcolor{red}{.var} .var | 生成变量名 |
2)自定义模板
3、maven的安装和配置
mavenIt is an installation-free program,解压就可以使用, 需要使用 m a v e n 的指令,则需要配置 m a v e n 的环境变量 \textcolor{red}{需要使用maven的指令,则需要配置maven的环境变量} 需要使用maven的指令,则需要配置maven的环境变量,maven本身使用Java开发,也依赖JDK的环境变量.
下载 m a v e n ,解压 m a v e n ,配置 m a v e n \textcolor{red}{下载maven,解压maven,配置maven} 下载maven,解压maven,配置maven
之后把MAVEN_HOME配置到path中 :%MAVEN_HOME%\bin
测试maven:cmd 输入 mvn -version
测试是否有maven的版本号
3.1)maven的目录结构介绍
在 c o n f 的 s e t t i n g . x m l 配置镜像信息(下载 j a r 包快) \textcolor{red}{在conf的setting.xml配置镜像信息(下载jar包快)} 在conf的setting.xml配置镜像信息(下载jar包快)
本地仓库的作用 \textcolor{red}{本地仓库的作用} 本地仓库的作用:
配置阿里云的镜像 \textcolor{red}{配置阿里云的镜像} 配置阿里云的镜像
<mirrors>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
3.2)IDEA中配置maven
3.3)什么是groupid和artifactId?怎么理解?
(1)groupid和artifactId被统称为坐标,In order to ensure the uniqueness of the project proposed
groupid一般分为多段,The first segment is the domain,The second paragraph is the company name,如org.apache
(2)artifactIdDefines which current project is in leaseID
4、IDEA连接数据库
I D E A 连接数据库错误: [ 08001 ] C o u l d n o t c r e a t e c o n n e c t i o n t o d a t a b a s e s e r v e r . \textcolor{red}{IDEA连接数据库错误:[08001] Could not create connection to database server.} IDEA连接数据库错误:[08001]Couldnotcreateconnectiontodatabaseserver.
把mysql-connect-java的jar包改成8版本的即可
5、IDEA代码分栏
边栏推荐
- 从功能测试到自动化测试你都知道他们的有缺点吗?
- LeetCode笔记:Weekly Contest 305
- Sublime Text如何安装Package Control
- 论文精读:VIT - AN IMAGE IS WORTH 16X16 WORDS: TRANSFORMERS FOR IMAGE RECOGNITION AT SCALE
- 字节二面,差点倒在了MySQL上面
- 放下手机吧:实验表明花20分钟思考和上网冲浪同样快乐
- Fully automated machine learning modeling!The effect hangs the primary alchemist!
- 对应运放 RC 滤波负反馈的波形
- Flink on Yarn
- [免费专栏] Android安全之GDB动态调试APP
猜你喜欢
uniapp离线推送华为厂商申请流程
[免费专栏] Android安全之Android应用的汉化功能(修改so中的字符串内容)
牛客网 Verilog 在线编程题库解答(VL1~VL10)
[免费专栏] Android安全之Android Studion 动态调试APK的两种方法
说了半天跨平台,今儿咱就来跨跨!(完结篇)——Kubenetes上手实践
释放数据价值的真正法宝,数据要素市场化开发迫在眉睫
WPF 实现带蒙版的 MessageBox 消息提示框
VIT transformer详解
Flink on Yarn
URLError: <urlopen error [Errno 11004] getaddrinfo failed>调用seaborn-data无法使用
随机推荐
WPF 实现带蒙版的 MessageBox 消息提示框
LeetCode笔记:Biweekly Contest 84
C程序设计-第四版
史上最全架构师知识图谱(纯干货)
std::atomic_flag的test_and_set函数理解
宝塔面板安装使用
[免费专栏] Android安全之Android Fragment注入
Redis很大的时候,key 要如何处理?
Fully automated machine learning modeling!The effect hangs the primary alchemist!
Office 365 Group概述以及创建方法
C#/VB.NET: Extract text and pictures from PowerPoint document
太厉害了!华为大牛终于把 MySQL 讲的明明白白(基础 + 优化 + 架构)
C#/VB.NET:从PowerPoint文档中提取文本和图片
第三方bean使用ConfigurationProperties注解获取yml配置文件数据 & 获取yml配置文件数据的校验
[免费专栏] Android安全之Root检测和绕过(浅析)
mysql双主备份失败?
关于链表的操作
16 张图解 | 淘宝 10年架构演进
Start cleaning up the long-term divers in the electronic chart development group again
字节二面,差点倒在了MySQL上面