Liferay developer Mode

Source: Internet
Author: User

Finally, I found the official documentation. Generally, the search engine seems to be unable to find the lifeary developer mode and developer. I have always wanted to switch to the development mode, but I don't know how to switch it. After reading the documentation, it is actually very simple.

You can debug front-end JS after enabling it. This is very useful.

Do you want to develop liferay resources without having to redeploy to see your portal modifications? Use liferay developer mode! In developer mode all caches are removed, so any changes you make are visible right away. You won't have to reboot the server
As often if you use developer mode.
Before you use developer mode, you'll have to add the portal-developer.properties file to your application server's configuration file. each application server has a different configuration file or UI to specify system properties. let's demonstrate using Tomcat
Application Server.

In your setenv. Sh file (setenv. BAT in Windows), find the line setting the java_opts variable and add the following to the list of options:

'Dexternal-properties = portal-developer.properties'
The following is an example of the java_opts variable lines with your code encoded ded:

Java_opts = "-xms256m-xmx1024m-XX: permsize = 32 m-XX: maxpermsize = 160 m-dfile. encoding = utf8-duser. timezone = GMT + 2-djava. security. auth. login. config = $ catalina_home/CONF/JAAS. config-dorg. apache. catalina. loader. webappclassloader. enable_clear_references = false-dexternal-properties = portal-developer.properties"

Tip:If you're already using the system propertyexternal-propertiesTo load other properties files, addportal-developer.propertiesTo
The list and use a comma to separate it from other entries.

How does developer mode let you see your changes more quickly? In developer mode, there are several changes to the normal order of operations:

- CSS files are loaded individually rather than being combined and loaded as a single CSS file.  - JavaScript files are also loaded individually, including JavaScript for the portal itself and JavaScript related to any portlet registered through `liferay-portlet.xml`. JavaScript logs are also enabled in Developer Mode.  - Modification-based caching of web resources is disabled.  - Velocity Templates for themes and journal articles are not cached, so changes will be applied immediately. 

Individual file loading of your styling and behaviors, combined with disabled caching for Web Resources and velocity templates, let's you see your changes more quickly when operating in developer mode.

Now, when you modify your theme'scustom.cssFile directly in your liferay bundle, you can see your changes applied as you make them! Make sure you copy any changes you make back into your_diffsFolder,
Or they'll be overwritten when you Redeploy your theme.

Let's add a thumbnail image for our theme now.

Original article address:

Https://www.liferay.com/zh/about-us/newsroom/press-releases? P_p_auth = Response & p_p_id = 101 & response = 0 & p_p_state = maximized & p_mode = view & _ 101_struts_action = % response % 2fview_content & _ response = 24615482 & _ 101_type = content & _ 101_urltitle = Lp-6-1-theme-developer-mode & redirect = HTTPS % 3A % 2f % 2fwww.liferay.com % 2fzh % 2 fcommunity % 2 fwiki % 3fp_p_id % 3d3% 26p_lifecycle % 3d0% 26p_state % 3 dmaximized % 26p_p_mode % 3 dview % 26_3_keywords % 3 ddeveloper % 2 bmode % 26_3_struts_action % 3d % 252 fsearch % 252 fsearch

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.