First, install the Jrebel plug-in
1. Online Installation
Open the Set File->setting or direct point icon to enter
Download and install online
2. hack Plugin
Download crack patch specifically to find the corresponding version, this side with a 6.2 cracked version (but the actual installation is 6.2.2, can still be used) will be cracked version inside the jrebel.lic copy to C: \ \ Current user under \.jrebel directory; Jrebel.jar replace C + + current user \. Jrebel.jar files in the Intellijidea13\config\plugins\jr-ide-idea\lib directory
Open idea, see the JR icon on behalf of the installation plug-in success, there will be more jrebel in the settings, as follows:
License for valid on behalf of the crack success.
Ii. two ways of deploying project projects
Method one, combined with artifacts deployment project
1. Open the project configuration file->project structure
According to the project modules configuration Artificials
2. Configure Tomcat
3. Set Jrebel
Set the redeploy time so that the JRE is automatically monitored when the Java file is modified. (but will this set up a lot of memory?) The backstage will be prompted with information such as: 2014-05-29 19:13:12 jrebel:reloading class ' test '.
After the three-step setup, it is generally possible. So it seems that even rebel.xml do not have to be generated, you can implement the hot deployment. Remember to start Tomcat as a JR (that is, click on the JR icon) instead of booting Tomcat directly.
Mode two, External source loading Project Project
1. Modify the class output directory
class file output to the Web-inf directory of the project itself
2. Tomcat Load Project
Select to the Web project root directory is Webroot, this directory directly contains the project itself JSP, HTML and other files, as well as our configured class output content. In this way, the JSP can be directly displayed with modifications, and the class is monitored by the JRE.
Note: Loading the project in this way, there is no update classes and resource in the server.
3. Production Rebel.xml
Right-click Project, you can see the Jrebel option, select Rebel.xml can be automatically generated, the main content of XML is to monitor the class directory and the Web engineering directory
4. Set idea to compile automatically
These 4 steps are set up so that you can start Tomcat with Jr.
Summary: Both methods are loaded with the configuration file of localhost in the Tomcat directory, specifying the path to load in the configuration file. Artifacts way, class not only to generate output, at the same time in the modules will also specify the class's generated directory, feel more generated a copy, no need, do not know where the benefits of such, temporarily do not understand. and external source load Project project way, directly in the modules specified class generated directory to the project, and the JSP itself is the project below, so in the Tomcat configuration file directly assigned to the project directory. So the individual temporarily adopt the way two to deal with, take a time to try.
Problems encountered: When using the two-way deployment project, Tomcat started, unable to find the project jar package, and the project obviously introduced the corresponding JAR package.
Cause: The jar Package directory Lib is the same level as the Web root directory, and Tomcat cannot be loaded into this lib when it is started. Although project compilation can pass, there is a problem when it is released.
Problem solving: Put the Lib directory in the Web-inf directory
Intellij Idea+tomcat+jrebel Hot Deployment