Liferay中的配置文件介绍

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/wangqing84411433/article/details/81101045

1.portal-setup-wizard.properties  该文件是liferay自带的配置文件,可在里面添加配置,该配置文件的位置如下图:

admin.email.from.name=admin admin
jdbc.default.password=scjs#15789
liferay.home=/usr/local/liferay
[email protected]
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.username=root
jdbc.default.url=jdbc:mysql://localhost/portlet2?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
setup.wizard.enabled=false

#关闭使用条款
terms.of.use.required= false

#关闭密码提醒功能
users.reminder.queries.enabled=false

#关闭首次登录强制修改密码功能
passwords.default.policy.change.required=false

2.config.properties  该文件是自己添加的,数据库的配置信息,可以用于pageoffice,用于连接数据库,通过配置文件读取参数,可以添加到任意位置,能读取皆可以,该配置文件的位置如下图:

driver=com.mysql.jdbc.Driver
ip=localhost
port=3306
databaseName=portlet2
user=root
password=scjs#15789
path=file:///usr/local/liferay/tomcat/

3.portal-ext.properties 该文件若不存在,则自己添加,可在此文件中配置token,在跨项目调用liferay接口的时候允许,因为默认情况只能在同一个项目中调用,该配置文件的位置如下图:

auth.token.check.enabled=false

4.在\webapps\ROOT\WEB-INF目录下,存在we.xml文件,若要配置session超时可在此处配置,之前在portal-ext.properties文件中配置了如下参数:

session.timeout=120
session.timeout.warning=0
session.timeout.auto.extend=false

但是重启后并未生效,原因如下:

We need to set session-timeout properties in portal-ext.properties and web.xml as well Because This value is always overridden by the value set in web.xml.

该值在we.xml文件中被重写了,而web.xml的session配置为:

<session-config>
        <session-timeout>30</session-timeout>
    </session-config>

所以无论在portal-ext.properties做了session的配置,都会被此处重写,所以最后在web.xml中进行配置就可以了,将30改为想要的分钟数即可

猜你喜欢

转载自blog.csdn.net/wangqing84411433/article/details/81101045
今日推荐