Developing a Java Web project using the IntelliJ IDE

Source: Internet
Author: User

Use MAVEN to develop SPRINGMVC apring MyBatis Web projects.

New Project 1.File, go to the Create Project window

2 The following interface appears

3 Click on the option as above, point to next

4 fill in the above two items, click Next

The default configuration can be used directly in the options above. I modified the local repository is the location of the warehouse, you can change or do not change. In the properties below add a parameter archetypecatalog=internal, without this parameter, when MAVEN generated skeleton will be very slow, sometimes directly stuck. From the online explanation: Archetypecatalog represents the plug-in uses the archetype metadata, does not add this parameter when the default is Remote,local, that is, the central warehouse archetype metadata, because the central warehouse archetype too much, so the result is very slow , specify internal to indicate that only internal metadata is used.

5 Click Next

I did not modify this, click Finish

6 after generating the project skeleton for MAVEN, we also need to manually create the Java directory under Src/main. You can now write directly

To this end, the framework of the project is basically completed.

7 Configure the Pom.xml below

Problems

1 The Java folder in the MAVEN project cannot create a new package and class, you need to set the following

2 Installing the MyBatis plugin in idea

Select File--setting-plugins to search for MyBatis, which will appear because there are no plugins installed:

Click Browse, which is going to pop up the following window, IntelliJ idea will automatically search the plugin from the Web for easy downloading:

Click Install plugin to download the installation automatically, then restart IntelliJ idea.

3 URI is not registered occurs when Mapper file mapping is performed. The solution is as follows

Mouse click Red Word, then IntelliJ appear small red light, choose Fetch external resource can solve

4 MAVEN Project jar package relies on import issue resolution,

After you create a new project, the path to the project generates the Pom.xml file and the project name. iml file. When you create a new project, idea does not automatically refresh Maven dependencies. The way to refresh maven configuration is:

(1) Right click on the project;

(2) Select maven| in the pop-up menu Reimport menu item.

At this point, idea will automatically download dependencies over the network and store them in Maven's local repository.

Developing a Java Web project using the IntelliJ IDE

Related Article

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.