当前位置:网站首页>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 !】
边栏推荐
- Using burpsuite to capture app packages
- 【牛客刷题-SQL大厂面试真题】NO2.用户增长场景(某度信息流)
- How to play with the reading and writing operations of blocking sockets?
- 网络socket的状态要怎么统计?
- GID:旷视提出全方位的检测模型知识蒸馏 | CVPR 2021
- 基于开源流批一体数据同步引擎 ChunJun 数据还原 —DDL 解析模块的实战分享
- 华为面试题: 招聘
- leetcode:329. The longest incremental path in the matrix [DFS + cache + no backtracking + elegance]
- Operations related to sequence table
- 工具箱之 IKVM.NET 项目新进展
猜你喜欢

【邂逅Django】——(二)数据库配置

【脑洞大开】《西潮》及《走向世界丛书》

Chained storage of queues

Mobile note application

Stack-------

codeforces -- 4B. Before an Exam

《MATLAB 神经网络43个案例分析》:第40章 动态神经网络时间序列预测研究——基于MATLAB的NARX实现

数据库之MHA高可用集群部署及故障切换

Operations related to sequence table

be based on. NETCORE development blog project starblog - (13) add friendship link function
随机推荐
c语言学习
用.Net Core接入微信公众号开发
Vs code set code auto save
Wechat applet - 80 practical examples of wechat applet projects
Three stages of aho
Zero copy technology of MySQL
Teach you to complete the actual battle of image classification hand in hand -- Image Recognition Based on convolutional neural network
[Maui] add click events for label, image and other controls
Report on the "14th five year plan" and investment strategy recommendations for China's industrial robot industry 2022 ~ 2028
软件测试中功能测试流程
我花上万学带货:3天赚3元,成交靠刷单
leetcode:226. Flip binary tree [DFS flip]
R语言基于h2o包构建二分类模型:使用h2o.gbm构建梯度提升机模型GBM、使用h2o.auc计算模型的AUC值
The popular major I chose became "Tiankeng" four years later
Shell script imports stored procedures into the database
Redis explores cache consistency
木架的场景功能
System test UI test summary and questions (interview)
项目部署,一点也不难!
【牛客刷题-SQL大厂面试真题】NO2.用户增长场景(某度信息流)