Idea Configuring the MAVEN + Springboot project to run on a new PC

Source: Internet
Author: User

This tutorial documents the process of installing idea on a new computer, configuring the Java+maven+git+springboot project, and finally completing the project.

First, if you want to use idea's git tool to get the project from GitHub or the code cloud, you need to download the Git software in advance and complete the initial configuration.

1. Download and configuration of git

Go to git website, https://www.git-scm.com/downloads and download.

Determine the version you want to download (i downloaded the 64bit version of Windows Installer) and click Download.
When you're done downloading, double-click the app to install it all the way next.

2. Git Configure user name and password:

Tap the desktop (or right-click) Git bash to enter the following content.

Git config–global user.name your username        #用户名 git config–global user.email your mailbox            

Second, configure the JDK

Download the JDK, put it in a folder and configure the associated path in the environment variable as follows:

(1) New variable name "Java_home", Variable Value "C:\Java\jdk1.8.0_05" (that is, the JDK installation path)
(2) Edit, variable name "Path", at the end of the value of the original variable, add ";%java_home%\bin;%java_home%\jre\bin"
(3) New variable name "CLASSPATH", Variable Value ".; %java_home%\lib;%java_home%\lib\dt.jar;%java_home%\lib\tools.jar "(Remember the front,; Do not ignore)

Third, configure the MAVEN environment +idea new local maven

1. Download the installation package

Download the latest version of the installation package on the MAVEN website: http://maven.apache.org/

2. Unpack the installation package

3. Configure MAVEN Environment variables

Configure the M2_home environment variable, point to the MAVEN installation directory, and append the bin directory to the path path for easy invocation at the command line.

such as: M2_home = D:\dev\apache-maven-3.3.9

Path increases%m2_home%\bin;

(The settings below are important!!) )

To modify the Maven home directory-"conf-" settings.xml, modify the local repository file for the following path, and then save the storage.

<localrepository>d:\program files\java\apache-maven-3.3.9\localrespository</localrepository>

Where localresponsitory needs to be created, or the path is referred to as a different directory.

Iv. Create a MAVEN configuration in the project (at this point git downloads the Springboot project on the code cloud, without first demonstrating)

1. Click file-"Settings Configure MAVEN, set up the Maven home directory, and select User setting file as the profile you just modified.

  

Click View->tool Windows->maven Projects to display the right side of the project Maven projects, then click on the + sign, select the project's pom.xml, click OK.

Then click lifecycle-"Clean." Clicking on compile should download all the dependent packages.

When all dependencies are downloaded, if there are some comments in the project, click Alt+enter to import the dependencies into the project.

v. Creation of application

Click the plus sign to add application, name casually, main class to point to the main classes, working directory is usually the project path, according to 1--9, configure each (need to add 8 as build).

If it's not an accident, you can run the project by selecting it at the end.

If a database connection error occurs, add a database to your database, and you are no longer demonstrating it.

Idea Configuring the MAVEN + Springboot project to run on a new PC

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.