当前位置:网站首页>Idea of [developing killer]
Idea of [developing killer]
2022-07-01 12:50:00 【51CTO】

Rapid delivery must have good tools to improve development efficiency , This article introduces the development of heavy killer IntelliJ IDEA. Including those we have developed for many years Bottom pressing tool It's all open , The following is the welfare time ~
- win+linux Dual system , At the same time, it supports sandbox repeated verification !
- Idea Common configurations and skills sharing
- Idea Integrate docker, Fully automatic publishing 、 Graphical management application !
One 、Win10 Development machine installation preparation
If a worker wants to do a good job, he must sharpen his tools first , Start idea Before using , It is also necessary to optimize the local development machine , Provided here win+linux The perfect solution of dual system and sandbox And other pre supporting software !
win10 achieve win+linux Dual system , And the experimental environment with sandbox !

The operating system comes with cmd It's relatively weak , Sometimes we need multiple windows 、 Run the command in the specified directory 、 image linux Integrate or switch many different shell It's hard to do it when . This product is launched by Microsoft with a low profile , Not included , In the Microsoft app store and github You can download freely on 、 Free trial , Here is a big recommendation !

Windows Terminal Official download address : Microsoft Store or GitHub
When using , In any directory , Right click to see open in terminal, However, the goose is even better , Support on the command line ssh、 And bring it with you Ubuntu etc. linux System , Let our development learning connect seamlessly !

After restart, we download it from the app store ubuntu, So you can do it win10 Swim down java The world ~
You need to set a password for the first time , Then you can use the application menu , or terminal Open directly in , If you don't like it, you can also download other versions or other distributions at will , Such as fedora、opensuse wait 

The sandbox with its own program is opened on the top , Let's try all kinds of tools at will without psychological burden ! After the sandbox is opened 【 Start 】 Can be found in the menu , Very comfortable to use , Turn off automatic cleaning after use .
The configuration you may need is memory amplification 、 Mount Host Directory , Reference code is provided here
jdk Installation configuration
Download from official website 、 install , routine 1.8 The version of is enough , Suggest JAVA Class tools are installed in the same directory , Such as d:\java\.
When JDK、JRE After installation , The environment variable configuration is supplemented here , In this way, we can run directly in many places cmd 了 ~
Environment variable configuration , windows System settings , My computer -》 Right click Properties -》 Advanced settings -》 environment variable


The above operations are mainly used to run directly from the command line java、javac、jar、mvm Wait for the order 
Maven Installation configuration
Download and install : Apache Maven Download from the official website zip package , Unzip to D:/JAVA/ Next , And configure environment variables AVEN_HOME, Add to PATH in

test : Verify that the command line is available

To configure : To configure Aliyuan accelerates 、 Local warehouse cache , hinder idea Applying this configuration can Unified !
notes : This document is in c Disk user directory .m2 Under the table of contents , namely %USERPROFILE%\.m2\settings.xml
Tomcat 8.5 Installation configuration
take apache-maven-3.8.6-bin.zip Download and unzip to D:/java
test , double-click tomcat/bin/startup.bat, Check whether the command line reports an error , Whether the browser can normally access 8080 port , If there is a conflict , modify conf The configuration file , Replace 8080 For other ports 

Two 、IntelliJ Idea install 、 To configure
idea As a commercial software , With many third-party tools , However, it is suggested that we prepare by ourselves , If there are better tools in the future, we can smoothly switch , Many similar events have happened , For example, it was very popular before JBuild、eclipse、MyEclipse wait
Provided on the official website 30 Day trial enterprise 、 Community Edition , You can download tests , Download IntelliJ IDEA

The installation path is unified in the same directory for easy management , Remember to switch the pre installed JDK~
Idea Common configuration
- modify idea The code prompt shortcut key is Alt+/

modify idea Code reminder ignores case

add to yaml plug-in unit , convenient application.yml Documentation

correct maven by alibaba Source + Local warehouse acceleration
The configuration file is above maven In the chapter

Change the theme to white classic , Convenient for personal habits

Add a console highlighting plug-in Grep Console

attach : Here we add the installation package collected online , Do you know
idea Annotation specifications
- Three commonly used Java Annotation mode
Variable comment
Class notes
Method notes
idea Comment template
Class template ( When new )
Set the path :File-Settings-Editor-File and Code Templates-Incudes-File Header Use ready-made , New if not , The contents are as follows

Method template ( Set carriage return auto generation )
Set the path :File-Settings-Editor-Live Templates Next add a new template group , Name customization JavaTemplateGroup, This template group creates a new template , Set up Abbreviation Configure to *,option Under the expand Set to carriage return generation , Three of these parameters are as follows :
- return, methodReturnType()
- date, date(“Y-MM-d, E, H:m”) This query comes from GG, Parameter empty only has date
- param as follows :
- The template is as follows , Be careful , want
Missing a slash

This step involves a lot of configuration ! Set it up once , You can use it happily later ~
3、 ... and 、SpringBoot Integrate
- newly build spring initializr engineering , choice jdk8, sping/web

- add to application Below the level controller.TestController.java
- Upper right corner bug start-up ,web visit

highlight !IDEA And Docker Integration of remote servers
There are many detours here , It's using idea2021 Version of , I can't live or die , It was used 2022.1 The latest version of is OK 了 ~
Step one : Docker The server is open 2375 port
ssh Configure on the server 、 Restart the service and verify

Step two : Idea To configure Docker
In this step, you must see the prompt at the bottom that the connection is successful !
Step three : Modify the project pom To configure
add to dockerFile, Agreed specifications , The documents are stored in java Source code level directory

modify pom file , add to properties, add to plugin
This implementation maven Panel clean、package operation , Deo gratias , I saw it docker Layered compilation !
Step four : Joint commissioning and test
stay idea below service in , find docker, If it doesn't start, click , Find what we compiled and uploaded image, Right click to create a container , This automatically generates Run configuration 
Set the image name for the boot configuration 、 Container name , And add operating parameters , You can also preview , The following can also be set before startup maven Recompile and package , This completes Automation !
After modifying the code , Re execution , You can see that the page has changed in time

At the end
idea It's a good tool , It's easy to see docker journal 、 Graphical maintenance , Very good !

Interaction with you is the driving force of my continuous creation !【 One button three links is the ladder of human progress !】
边栏推荐
- Circular linked list--
- Flinkcdc should extract Oracle in real time. What should be configured for oracle?
- Which securities company has a low, safe and reliable account opening commission
- 数据库之MHA高可用集群部署及故障切换
- 【开发大杀器】之Idea
- 请问flink mysql cdc 全量读取mysql某个表数据,对原始的mysql数据库有影响吗
- R language uses conf of yardstick package_ The mat function calculates the confusion matrix of the multiclass model on each fold of each cross validation (or resampling), and uses the summary to outpu
- leetcode:241. 为运算表达式设计优先级【dfs + eval】
- Zero copy technology of MySQL
- Redis explores cache consistency
猜你喜欢

Vs code setting Click to open a new file window without overwriting the previous window

logstash报错:Cannot reload pipeline, because the existing pipeline is not reloadable

79. 单词搜索【dfs + 回溯visit + 遍历起点】

手机便签应用

【牛客刷题-SQL大厂面试真题】NO2.用户增长场景(某度信息流)

leetcode:329. 矩阵中的最长递增路径【dfs + cache + 无需回溯 + 优雅】

leetcode:241. 为运算表达式设计优先级【dfs + eval】

Redis explores cache consistency

Operator-1 first acquaintance with operator

Share several tools for designing exquisite circuit diagrams
随机推荐
[encounter Django] - (II) database configuration
[Maui] add click events for label, image and other controls
硬件开发笔记(九): 硬件开发基本流程,制作一个USB转RS232的模块(八):创建asm1117-3.3V封装库并关联原理图元器件
codeforces -- 4B. Before an Exam
VS Code 设置代码自动保存
How to play with the reading and writing operations of blocking sockets?
Interpretation of hard threshold function [easy to understand]
ROS2 Foxy depthai_ros教程
ASP. Net core 6 from entry to enterprise level practical development application technology summary
【开发大杀器】之Idea
Ikvm of toolbox Net project new progress
Logstash error: cannot reload pipeline, because the existing pipeline is not reloadable
硬阈值(Hard Thresholding)函数解读[通俗易懂]
Chained storage of queues
leetcode:329. 矩阵中的最长递增路径【dfs + cache + 无需回溯 + 优雅】
王兴的无限游戏迎来“终极”一战
c语言学习
单点登录SSO与JWT好文整理
leetcode:241. Design priority for operation expression [DFS + Eval]
Manage nodejs with NVM (downgrade the high version to the low version)