`
quickSand
  • 浏览: 27111 次
  • 性别: Icon_minigender_1
  • 来自: 沈阳
最近访客 更多访客>>
社区版块
存档分类
最新评论
  • jlle: 好文章,都是我正在研究的东西,正准备转为商用,这些想法跟我一致 ...
    liferay瘦身

liferay源码配置文件

阅读更多
转贴自:blog.chinaunix.net/u/25536/showart_210669.html
 
配置文件:

/ROOT/WEB-INF/

web.xml此配置应该都比较熟悉,里面配置servletfilter等不多说了

portlet.xml这是liferayportlet配置文件,可以用portlet-ext.xml进行扩展,主要子节点解释如下:

portlet-name:唯一值,与liferay-portlet.xmlportlet-nameliferay-display.xml中的<portlet id="xx" />对应,在代码中经常要用到此值。有几个特殊的portlet,如:My Account, Login等,这些在liferay源代码中写固定了,所以最好不要使用这些id.

display-nameportlet显示的名字,一般相应在资源文件中定义一起使用,以支持多国语言。如果资源文件中不定义,可能会显示id

portlet-class:如果使用struts,则定义为com.liferay.portlet.StrutsPortlet,也可以定义为自己的处理类,如sample-jsp中定义为com.sample.jsp.portlet.JSPPortlet

init-paramportlet的初始页面,valuestruts-config.xml配置相对应

security-role-ref:配置角色,角色需在liferay-portlet.xmlrole-mapper中定义

liferay-portlet.xmlportlet配置文件,其中struts-pathStruts配置文件相对应,可以用liferay-portlet-ext.xml扩展。

liferay-display.xmlportlet显示控制,没有在此定义的portlet将全部显示在undifine

struts-config.xmlStruts配置文件,可用struts-config-ext.xml扩展

tiles-defs.xmlStruts配置文件,与struts-config.xml配合使用,可用tiles-difs-ext.xml扩展。

小技巧:以上文件在eclipse中只要把鼠标移到相应的标签上,就会提示标签的作用。

<o:p> </o:p>

/ROOT/WEB-INF/classes/

log4j.xml这是lof4j的配置文件,可以参照log4j的相关配置文档进行配置

<o:p> </o:p>

system.propertiesliferay基本配置,如时区,国家,加密类等

portal.properties非常重要的配置文件,单独讨论。

captcha-ext.properties验证码配置文件,可以通过此配置文件控制验证码的字体,颜色,大小等

*.hbm.xmlHibernate配置文件,如与liferay整合,需要在portal.properties中定义hibernate.configs,注意要保留以前的配置

*-spring-professional/enterprise.xmlspring配置文件,此配置文件需要在portal.properties中定义spring.configs,注意要保留以前的配置,在portal.properties 中配置时,需省前后面的版本号professional/enterprise,Liferay会自动在后面加上版本号,如:你使用的是 professional,配置文件名为test-spring-professional.xml,则在spring.configs只需要配置test-spring.xml

language.properties语言资源文件

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics