:IntelliJ IDEA tutorial (2019 graphic version) - from entry to addiction-Appreciation of masterpieces免费ppt模版下载-道格办公

IntelliJ IDEA tutorial (2019 graphic version) - from entry to addiction

Sorry, my ability is limited and I cannot provide you with specific graphic tutorials. However, I can give you some basic information and some advice about IntelliJ IDEA. IntelliJ IDEA is a powerful integrated development environment (IDE) designed for Ja

Click on the top "Java base" and select "Set as star"

Be positive, not positive!

Source code boutique column

 
  • An open source project with detailed annotations in Chinese

  • Message middleware RocketMQ source code analysis

  • Database middleware Sharding-JDBC and MyCAT source code analysis

  • Job scheduling middleware Elastic-Job source code analysis

  • Distributed transaction middleware TCC-Transaction source code analysis

  • Eureka and Hystrix source code analysis

  • Java Concurrency Source Code

Source: http://t.cn/ReBHBP2

  • 1. IDEA VS Eclipse Core Term Comparison

  • 2. Current project configuration VS default configuration

  • 3. Global JDK (default configuration)

  • 4. Global Maven (default configuration)

  • 5. Version control Git/Svn (default configuration)

  • 6. Automatic package import and intelligent removal (default configuration)

  • 7. Tomcat Server (current project configuration)

  • 8. Automatic compilation

  • 9. Disable case sensitivity

  • 10. Adjust font type and font size

  • 11. Set the shortcut key to be the same as Eclipse

  • 12. Open the common toolbar

  • 13. A must-have shortcut key for lazy people

  • 14. Patients with severe obsessive-compulsive disorder

  • 15. IDEA Ten Questions Ten Answers


Preface: IntelliJ IDEA

If IntelliJ IDEA is a modern intelligent development tool In other words, Eclipse can be called something from the stone age. In fact, the author is also an explorer who transferred from Eclipse to IDEA. With the recent continuous development practice and debugging, I gradually realized the great development convenience brought by this smart IDE. With the support of powerful plug-in functions, such as Git and Maven The support is simply unstoppable, and various code prompts, including JS, are at your fingertips, and you have to be convinced by this magical IDE in the end. In order to let more friends around me participate, I decided to write this article and share it with you. (^_^)

Advanced Portal: IntelliJ IDEA Official Website Download - Ultimate Ultimate Edition

Activation method: After installation, select License and enter http://intellij.mandroid.cn

Text: IntelliJ IDEA tutorial

1. The core term ratio of IDEA VS Eclipse

It can be seen from the figure below: The biggest change of the author lies in the change of the concept of workspace, and in IDEA, Project and Module are two different concepts, which are of great significance to the project structure, which is exactly what many IDEA beginners find troubled.

img

1.1 Why cancel the workspace?

Answer: In short, IDEA does not need to set up a workspace, because each Project has a workspace! ! For each IDEA project (Project), each of its sub-modules (Module) can use independent JDK and MAVEN configurations. This adds great convenience to the refactoring of traditional projects towards new projects. This kind of diversified flexibility is exactly what Eclipse lacks, because Eclipse has tied up the workspace when it is first used.

1.2 Also, many novices will Ask, why is the subproject in IDEA called Module?

Answer: In fact, it is the concept of modularization. As an aggregation project or a common root directory, it is called Project, and the following sub-projects are called modules, and each sub-module can be associated , or without any association.

2. Current project configuration VS default configuration

2.1 Why do we need the default configuration when we have the current project configuration?

Answer:Because IDEA has no concept of workspace, each new project (Project) needs to set up its own JDK and MAVEN related configurations, which improves flexibility , but it has to be reconfigured for each new project, which obviously does not meet our expectations. In this context, the default configuration provides the Default option for the current project configuration, and the problem is naturally solved.

The latest supplement: In order to clarify the concept of this new project configuration, IDEA has officially changed the name of "Default Settings" to "Default Settings /ProjectStructs" in the official version after 2018.2, that is, "default configuration" It means "new project configuration".

2.2 Initialization steps

Open the default configuration: top navigation bar -> File -> Other Settings -> Default Settings /ProjectStructs

Open the current configuration: top navigation bar -> File -> Settings / ProjectStructs

Example image:

If the current project wants to override the default configuration, just set it directly in Settins/Project Structure.

================= ===============================

Next, let's take a look at how IDEA quickly builds a Java development environment! !

===============================================

3 . Global JDK (default configuration)

Concrete steps: Top toolbar File ->Other Settins -> Default Project Structure -> SDKs -> JDK

Example: Set the JDK directory according to the steps in the figure below, and finally click OK to save.

Note: The full name of SDKs is Software Development Kit, because IDEA supports various development kits such as JDK.

Similarly, the current project can set the favorite JDK version for the project and each module in Project Structure.

4. Global Maven( Default configuration)

Specific steps: top toolbar File ->Other Settings -> Default Settings -> Build & Tools -> Maven

Example: In theory, it is enough to configure the Maven home directory, and it is recommended to use the User Settins file for actual development.

The Maven plug-in of IDEA is quite easy to use enough to make you fall in love with this IDE

Here to remind you that the address of the Apache Maven local warehouse is automatically generated, usually in the C drive directory, so in actual development, it is recommended that you specify the address of the local warehouse to avoid data loss due to system reinstallation or cleaning by third-party security tools. The configuration of Maven is very simple, and it is clear at a glance after deleting the comments. As shown in the picture:

settings.xml

Open the Maven artifact

For children who are still struggling with the Update command in Eclipse, please quickly try the Maven plug-in provided by IDEA. The convenience of its operation will bring you unprecedented pleasure! !

Specific steps: Maven on the right toolbar -> Click to expand a project or module -> quickly execute Maven commands.

5 .Version control Git/Svn (default configuration)

Specific steps: Top toolbar File ->Other Settings -> Default Settings -> Version Control -> Git

Instructions for use: IDEA integrates support for Git/Svn by default. Just set the execution program directly, and the Test on the right will prompt success.

Problem feedback: Some small partners reported that IDEA could not find svn.exe. The solution: reinstall SVN, and re-select command line client tools for the configuration item.

PS: The built-in Git plug-in of IDEA is very easy to use, especially for resolving conflicting codes. In addition, the Git client recommends SourceTree.

6. Automatic package import and smart removal (default configuration)

Concrete steps: Top toolbar File ->Other Settings -> Default Settings -> Auto Import

Instructions for use: On the Internet, I saw a lot of people asking why IDEA can’t optimize the import package while Eclipse can. Isn’t this low-end black, So I deliberately smokedCome out and share with you how IDEA optimizes the import package.

img

7. Tomcat Server (current project configuration)

Many small partners couldn't find the configuration of Tomcat at the beginning, but it is actually very simple. Tomcat or Jetty are all deployed containers. It is natural to think of Deployment, open the deployment configuration, and you can see the configuration of the application server.

Tomcat configuration method: File -> Settings -> Deployment -> Application Servers -> Tomcat Server

The specific configuration method is as follows:

IDEA must Prepare small skills

In order to improve development efficiency, the master has prepared the following practical five-star tips for you:

8. Automatic compilation< /h2>

Specific steps: top toolbar File ->Other Settings -> Default Settings -> Auto Import

Note: After automatic compilation is turned on, combined with Ctrl+Shift+F9 will have a hot update effect.

automatic compilation (Runtime)

Specific steps: Hit Ctrl + Shift + Alt + /, then double-click Shift to search and enter Registry, find compiler.automake.allow.when.app.running, and check it.

Finally, if you want to know how SpringBoot implements hot deployment, please click SpringBoot+IDEA to implement hot deployment tutorial

9. Sensitive

Concrete steps:

File | Settings | Editor | General | Code Completion Case | Sensitive Completion = None

Cancel size sensitivity, when writing code, the automatic code prompt will be more comprehensive and rich.

img

10. Adjust font type and font size

The default white background and small font will affect your coding experience, here is a quick configuration to adjust the code window. Open the configuration, search for Font, and then Font can adjust the font type, and Size can adjust the font size, as shown in the figure:

11 . Set the shortcut keys to be the same as Eclipse

Many people may not be used to the shortcut keys of IDEA. For convenience, here we set the shortcut keys to be the same as Eclipse.

Concrete steps: File -> Settings -> Keymap - > Select Eclipse .

Partners transferred from Eclipse can use it with confidence

12. Open the common toolbar

Specific steps: top navigation bar - View -> check Toolbar & Tool Buttons

As shown below:

13 . Necessary shortcut keys for lazy people

1. Press the [middle mouse button] to quickly open the smart prompt instead of alt+enter.

File->Settings-> Keymap-> Search Show Intention Actions -> Add a shortcut key for the middle mouse button.

2. Press [F2] to quickly modify the file name, saying goodbye to two-handed operation.

File->Settings-> Keymap-> Search Rename -> Set the shortcut key to F2.

3. Press [F3] to directly open the directory where the file is located, and browse in one step.

File->Settings-> Keymap-> Search Show In Explorer -> Set the shortcut key to F3.

4. Press [Ctrl + right mouse button] to directly open the implementation class, which is convenient for development and query.

File->Settings-> Keymap-> Search implementation-> Add Mouse Shortcut Set the shortcut key to Ctrl+right mouse button.

14. Severe OCD Patient

1. Cancel the case sensitivity, so that the automatic prompt is more complete!

File | Settings | Editor | General | Code Completion Case | Sensitive Completion = None.

2. Hide the configuration directory of development tools such as *.idea;*.iml

File | Settings | File Types | Add .idea;.iml at the end

3. Put away the comments to make reading the source code more refreshing!

File -> Settings -> Editor -> General -> Code Folding -> Documentation comments Check.

If you want to quickly open all comments with one click, right-click and select Folding -> Expand Doc comments.

15. IDEA Ten Questions Ten Answers

(1) How to open a local project/existing project?

Answer: Click File -> Open to open the project folder, pay attention to configure the basic configuration such as JDK and Maven first.

(2) How does IDEA delete the project project?

Answer: The Coder who asked this question is really cute, haha, I will definitely answer you, no need to delete,

Click File-> Close Project to quickly close the current project; Example:

What? Do you still want to kill the entire directory? That's okay, just right-click Show In Explorer and delete the folder. However, the author suggests that it is better to close it directly, in case it will be used in the future, what do you think?

(3) How to open multiple Maven projects in a single window?

Answer: Just create a new folder, then throw all the projects into it, and use IDEA to open this folder.

(4) How to add multiple modules to the current project?

Answer: Right click on the project -> select New -> Module -> Usually choose Spring Initializr, as shown in the figure:

New modules
Multi-module project




Welcome to my knowledge planet, discuss architecture and exchange source code together. How to join, Long press the QR code below:

The source code has been updated on Knowledge Planet and the analysis is as follows:


If you liked this article, like, retweet.

Life is beautiful, see you tomorrow (。・ω・。)ノ♡

Articles are uploaded by users and are for non-commercial browsing only. Posted by: Lomu, please indicate the source: https://www.daogebangong.com/en/articles/detail/IntelliJ%20IDEA%20tutorial%202019%20graphic%20version%20%20from%20entry%20to%20addiction.html

Like (810)
Reward 支付宝扫一扫 支付宝扫一扫
single-end

Related Suggestion