Idea configures global variables (Jdk, maven repository, maven)

IDEA configures JDK

1. Click File -->Project Structure;

2. Click the SDKs option on the left tab, then click the "+" in the upper left corner, and select JDK;

3. Select the JDK installation path in the pop-up box, and click OK to configure successfully. 

As you can see from the figure below, the JDK has been configured in IDEA.

 

Configure maven repository (Alibaba Cloud)

After configuring the maven environment, we need to modify the maven settings.xml file. First, find the maven settings file in the conf folder after maven decompression:

3: Open the settings file with an editor, preferably with a text editing tool such as notepa++, editplus, etc., do not open it with Notepad, as shown below:

4: Configure the warehouse address in the place circled in the screenshot below

<localRepository>D:/software/MavenCangKu</localRepository>

Where D:/software/MavenCangKu is the configured warehouse path. Don't have a Chinese path, the warehouse is empty

IDEA configure maven

The first step is to select Settings under file in the menu

The second step is to search for maven in the search box. Select the maven file address in the Maven homedirectory:

In User settingS file, select the settings.xml file under maven under conf;

Local repository is the maven repository address. ( Configuring the environment for maven is set in settings.xml )

Finally click Apply to confirm the save

The third step is to check import Maven projects automatically in Importing;

Check Sources and Documentation under Automatically download;

Finally click Apply to confirm the save

Guess you like

Origin blog.csdn.net/weixin_45650003/article/details/121397991