Table of contents
4. Run the installation after downloading
5. Store in a non-Chinese directory
6. Configuration information (can not be checked)
8. After the installation is complete, IDEA will automatically open
2.1 Adjust the background color
2.2 Set the mouse hover prompt
2.6 Configuration document annotation information template
2.8 Display code horizontally or vertically
2.9 Shortcut changed to eclipse
Third, configure the service and build the Maven project
Foreword:
Today I recommend an IDEA for everyone.
One, install
1.1 Open the official website JetBrains: Essential tools for software developers and teams, click Developer Tools, and then click Intellij IDEA
2. Click to download
3. Select the corresponding version. The Ultimate version on the left is the flagship version, which requires payment and includes complete functions. The Community version is a community version, which is free and only supports some functions. Here we choose the Ultimate version on the left to download and then activate
4. Run the installation after downloading
continue
5. Store in a non-Chinese directory
6. Configuration information (can not be checked)
7. Continue by default
8. After the installation is complete, IDEA will automatically open
Second, modify the style
2.1 Adjust the background color
File→settings→Appearance
2.2 Set the mouse hover prompt
File→settings→Editor→General
Here we have to check it, and the delay time is set to half a second by default , here we set 1s ;
After setting, we move the mouse to the class to see;
2.3 Show method separator
Editor→General →Appearance
There are separators above and below, which is convenient for viewing the code;
2.4 Ignore case hints
Editor → General → Code Completion
2.5 Automatic package guide
Editor → general → Auto Import
Select All from the drop-down list and check the following two boxes; then you can automatically import the package and cancel the package import.
2.5 Set the font
Editor->Font
2.6 Configuration document annotation information template
File → Settings → Editor →File and Code Templates → Includes →File Header
We add:
/**
@author
@site
@company
@create ${YEAR}-${MONTH}-${DAY} ${TIME}
*/
2.7 Set file encoding
File → Settings → Editor → File Encodings
2.8 Display code horizontally or vertically
IDEA is not like eclipse here and cannot be pulled directly
2.9 Shortcut changed to eclipse
File → Settings → Keymap
2.10 Set the default browser
File → Settings → Tools → Web Browsers
Select First Listd at the bottom of the middle
Third, configure the service and build the Maven project
3.1 Configure Tomcat service
Find Run → Edit Configurations → + → more → Tomcat Server → Local
The configuration is OK
3.2 Build Maven project
1. Create a new project
2. Name the project
3. Configure maven
4. pom.xml configuration dependencies, Maven plug-in
Dependency string:
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency><dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.44</version>
</dependency><dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
<scope>provided</scope>
</dependency>Maven plugin:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
5.web.xml changed from version 2.3 to version 3.1
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
Now we build a jsp, servelet page to test the following