Pentaho Server 7 是如何加载并启动(1)
版本:pentaho-server-ce-7.0.0.0-25
一、查看web.xml
打开“/pentaho-server/tomcat/webapps/pentaho/WEB-INF/web.xml”查看web.xml以确定开启 pentaho 的时候加载的类
1、PentahoSolutionSpringApplicationContext
<context-param>
<param-name>contextClass</param-name>
<param-value>org.pentaho.platform.web.http.context.PentahoSolutionSpringApplicationContext</param-value>
</context-param>
PentahoSolutionSpringApplicationContext 继承 spring 的 XmlWebApplicationContext ,并重写 getResourceByPath
,让spring到“/pentaho-solutions/system”文件夹下加载配置文件(pentaho-spring-beans.xml)。如果是在spoon中运行,会跳过加载xml的步骤
2、contextConfigLocation
<context-param>
<param-name>contextConfigLocation</param-name>
<!-- This file is relative to the "system" folder within your pentaho solutions folder. -->
<!-- Instead of adding files here, add them as imports to pentaho-spring-beans.xml. -->
<param-value>pentaho-spring-beans.xml</param-value>
</context-param>
定义beans配置文件的名称,此文件在“/pentaho-solutions/system”文件夹下,如果要增加配置文件,可以在此文件里面将要增加的配置文件import进去。
3、hsqldb-databases
<context-param>
<param-name>hsqldb-databases</param-name>
<param-value>sampledata@../../data/hsqldb/sampledata,hibernate@../../data/hsqldb/hibernate,quartz@../../data/hsqldb/quartz</param-value>
</context-param>
添加 hsqldb 数据库的上下文
4、Set Character Encoding Filter
<filter> <!-- This