Intellij configuration problems

Source: Internet
Author: User

 

Directory structure of intellij idea web applications

Ø directory diagram:

Ø directory explanation:

Development Directory

Directory Name

Description

Test

Project name

Lib

Jar package storage directory

SRC

The directory where the source file (class, resource file) is stored

Test

Directory of test case files (class and resource files)

Web

Web root directory to store Web Resources

WEB-INF

Configuration file storage directory

   

Module output directory

Directory Name

Description

Out

Output of current project, including all resources and class files

Exploded

Project output directory

Testweb

Alias for running a project in a container

Production

Class file output directory

Test

Project name. The module name should be accurate. After SRC is compiled, all files are output here.

Test

Directory of the test class file

Test

The project name, accurate to all, should be the module name, which stores the class and resource files compiled by test and outputs them here.

Ø first of all, in intellij idea, "New Project" is equivalent to "Workspace" of Eclipse, while "new"
Module is used to create a project.

We will find that intellij idea is used
During development, there will be two directories: one is the "Development Directory", which is used for frequent development operations and is visible; the other is the "output directory", which is the environment directory, we cannot see it, that is, we cannot see it in idea. We can see it in the actual path. In fact, this environment directory is equivalent to the current environment of our container, we usually specify the virtual directory of the container to a directory. intellij
By default, idea will specify the current environment to the out, so that you do not need to release it to the container, saving development time.

We will find that Lib and SRC have become the same directory, common sense should be placed under the WEB-INF, this is intellij
Idea default, of course, this directory we can also change back under the "WEB-INF", this is a bit.

Then we will find that there is no classes directory, common sense, it should also be under the "WEB-INF" ah, is in, a while I am telling you, he hid where to go, huh, huh.

Then, the output directory is displayed. I will explain it to you step by step. We can open the actual directory structure to view it. The "production" directory contains all engineering files (class, and resources), that is, all files placed under SRC. The following "test" is the project name, in intellij
Idea is the module name, because there can be multiple modules. All we need to do is to automatically release the compiled files during "make module. Here I only have one module, which is "test", so the following is a "test" directory.

This directory is our test case. All our test classes and resource files will be compiled here. The following is our project name. Remember, in intellij idea, it's called module.

"Exploded" is the directory to be run, because we can have multiple "modules". When selecting which "module" to run in the IDE, the environment will specify the directory where it is located, then there is "testweb", which is the alias of the web program we run. It will automatically add "Web" to you for differentiation. Then this "testweb" is the directory of our current environment. If you look at it carefully, you will find that this directory conforms to the directory we released to the container. I mean, under the "WEB-INF" there will be "classes", "lib" directory, the original only know that this is automatically completed by the container, but the Development Directory and the normal directory has changed, but there is no difference in the running directory.

Intellij idea does not support automatic compilation, that is, it cannot automatically compile class, intellij
Idea must be implemented by make.

Ø intellij idea does not support hot release. We can refresh the page directly without starting the container when modifying the page in eclipse, but intellij idea does not work because make is required, and output (out). Here we need some tips.

Intellij idea deployment skills

The directory structure above is the default tool. Here we change its directory structure to improve development efficiency.

Ø as I mentioned earlier, intellij idea does not support hot release. It is a waste of time and effort to restart the container by changing the page. We solve this problem by changing the directory.

N in "Project Settings", "modules" is the name of our project, and "paths" is not changed to the previous figure:

N after we change the directory, we will see the following:

Then we "make module" and found that all the files are compiled to the classes. It's the same as what we used to do. Ha

N. Then, in "Project Settings", "modules", click the modules name on your right. You will find a child node of the web, remember to place the cursor on the "Web" node, and then check that there is a configuration page on the right side.

Here, you will find a web facet exploede directory, and then we can change this directory to point to the web and node of the current project.

N for example:

*: Note that the exclude from module content check box is removed. Otherwise, webroot may disappear.

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.