Install freemarker plugin and JadClipse plugin for Eclipse

1. Recently, it is because I want to start learning freemarker. If freemarker is not installed in eclipse, the opening of the ftl file will be "black", which is not conducive to "look and feel", that is because of the lack of the corresponding editor plugin (like jsp, there will be a corresponding jsp editor). So we have to install the FreeMarker Editor plugin for eclipse. .

Unlike installing the svn plugin, installing the freemarker plugin is slightly different. This article describes how to install plugins for eclipse using "off-line installation" (feeling that online installation is too slow).

1) Download the corresponding freemarker-ide;

2) After decompression, put the freemarker-ide folder in the plugins directory of the eclipse installation directory;

3) Check the freemarker jar package version in freemarker-ide. If it is an older version, replace it with a new one such as freemarker-2.3.19.jar. If it is a new version, don't care.

4) Check the content in the MANIFEST.MF file under freemarker-ide/META-INF, whether the corresponding content of Bundle-ClassPath is consistent with the new freemarker jar package, if not, change it;

5) Change the content of the configuration\org.eclipse.equinox.simpleconfigurator\bundles.info file in the eclipse installation path - add hudson.freemarker_ide,0.9.14,plugins/hudson.freemarker_ide_0.9.14/,4,false where hudson. freemarker_ide is the folder name of the ide after you unzip it

6) Restart eclipse, you can search for FreeMarker Editor in window->preferences. This indicates that the freemarker plugin was successfully installed.

The default editor for ftl files is FreeMarker Editor (specifically, you can view or add in window->preferences->General->Editors->File Associations )

 

2. Install the Jadclipse plugin

The JadClipse plugin is used to decompile .class files. Maybe you are more familiar with using the Java Decomplier widget, but sometimes you have to use the Jadclipse plugin to decompile - when you need to debug the contents of a jar package ! Moreover, installing the Jadclispe plugin is also beneficial to conveniently view the contents of the imported underlying jar package.

1) Download jad.exe and net.sf.jadclipse.xx.jar (xx is the appropriate version)

2) Put jad.exe in a certain directory, it is recommended to put it in the same directory as jdk for easy search; put the jar package of jadclipse in the plugins directory of the eclipse installation directory.

3) Restart Eclipse, you can find JadClipse in window->preference, and then bind the editing method in File Associations. Select *.class and *.class without resource, and specify the default editing method for them as JadClipse Class File Viewer(default).

4) At this point, the installation of the jadclipse plugin is complete. You can open a low-level .class file at will, you can break the point for debugging, or simply check its logic and so on.

 

 

============================= Continuing to add =================== =================

BTW, supplementary review of some knowledge of spring4.x (not comprehensive)

1) You can use the @Resource method to introduce a defined bean in Action, and the attribute name must be consistent with the bean id;

2) If you want to use a class as a function that will be executed as soon as the project is started, you can let him implement ServletContextListener and use @WebListener as the class annotation;

3) If an applicationContext.xml file is scanned and loaded when the project starts, (usually some beans that must be initialized), some configurations such as camel (process), quartz (timed task), etc. can be configured such as:

<import resource="../xx/context.xml" /> to import. The imported xml configuration is also "scanned" at project startup.

4) In an instance derived from a typical singleton pattern, if you want to use a class managed by spring, you must first obtain the spring context in the response method , instead of directly introducing related classes through annotations. Because the instance is not managed by spring, other classes managed by the spring container cannot be used directly.

5) Tips: When you need to override the logic of a Java class called by default (usually from a jar package), you can create a class with the same package path and the same class name. In this way, when the program is running, the class in your project will be loaded first according to the priority. - This is often used in platform porting of projects.

6) Struts2: How to get the parameters passed from Action in js? ——Define a hidden input box on the page, the value is ${param} where param is the parameter passed from the background. js to take the value of the input box.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326989003&siteId=291194637