jasperreports-server的default_master.properties设置

本文详细介绍了如何配置JasperServer部署参数,包括应用服务器类型、数据库连接设置等关键信息,帮助开发者完成JasperServer的顺利部署。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

#D:\jasperreports-server-4.7.1-bin\buildomatic


################################################################################
#                                                                              #
# Master Properties File                                                       #
#                                                                              #
# Standard usage is to rename this file to default_master.properties.          #
# It should be placed in the root of the buildomatic directory, like:          #
#                                                                              #
#     <js-install>/buildomatic/default_master.properties                       #
#                                                                              #
# There is one sample property file for each database type. Sample property    #
# files are found in:                                                          #
#                                                                              #
#     <js-install>/buildomatic/sample_conf                                     #
#                                                                              #
################################################################################


################################################################################
#                                                                              #
# Installation Settings                                                        #
#                                                                              #
# Set values for:                                                              #
#                                                                              #
#   1) Application server type                                                 #
#                                                                              #
#   2) Path to application server home directory                               #
#                                                                              #
#   3) Database location and connection settings                               #
#                                                                              #
################################################################################


#appServerType = tomcat7
# appServerType = tomcat5
# appServerType = tomcat6
appServerType = jboss
# appServerType = jboss7
# appServerType = glassfish2
# appServerType = glassfish3
# (beta) appServerType = weblogic
# (beta) appServerType = websphere
# appServerType = skipAppServerCheck


# Tomcat app server root dir
appServerDir = C:\\jboss-4.2.2.GA
# appServerDir = /home/devuser/apache-tomcat-7.0.26
# if linux package managed tomcat instance, set two properties below
# CATALINA_HOME = /usr/share/tomcat6
# CATALINA_BASE = /var/lib/tomcat6


# JBoss app server root dir
# appServerDir = C:\\jboss-5.1.0
# appServerDir = /home/devuser/jboss-5.1.0
# appServerDir = /usr/bin/jboss
# jboss.profile = default


# Glassfish app server root dir
# appServerDir = C:\\glassfish-3.1.2
# appServerDir = /home/devuser/glassfish-3.1.2
# appServerDir = /usr/bin/glassfish


# database type
dbType=oracle


# name for js user and user to create js user
dbUsername=JASPER47UPGRADEUSR
dbPassword=JASPER47UPGRADEPWD
sysUsername=JASPER47UPGRADEUSR
sysPassword=JASPER47UPGRADEPWD


dbHost=192.1.50.81


# additional database parameters
# (uncomment these if you want non-default settings)


dbPort=1521
sid=dev10db


# If you are using an oracle service name instead of an SID, your JDBC URL will
# typically have a form similar to:  jdbc:oracle:thin:@host:1521/servicename
# To enable this you should uncomment the following line and add your service name
# serviceName=




# JasperServer db name, sample db names
# js.dbName=jasperserver
# sugarcrm.dbName=sugarcrm
# foodmart.dbName=foodmart


# web app name
# (set one of these to deploy to a non-default war file name)
# webAppNameCE = jasperserver
# webAppNamePro = jasperserver-pro


# JDBC driver
# (uncomment to change to a non-default setting)
#
# driver will be found here: <path>/buildomatic/conf_source/db/oracle/jdbc
#
# maven.jdbc.groupId=oracle
# maven.jdbc.artifactId=ojdbc5
# maven.jdbc.version=11.2.0


# Flag used to skip JDBC driver deploying during deployment process
# (uncomment to change to a non-default setting)
# deployJDBCDriver=false

<think>我们正在讨论JasperReports库的依赖关系。用户的问题是:jasperreports-5.6.1.jar是否必须与jasperreports-fonts-5.6.1.jar一起使用?根据提供的引用内容,我们可以分析:引用[1]中,用户的Maven配置同时包含了jasperreportsjasperreports-fonts两个依赖:<dependency><groupId>net.sf.jasperreports</groupId><artifactId>jasperreports</artifactId><version>6.3.0</version></dependency><dependency><groupId>net.sf.jasperreports</groupId><artifactId>jasperreports-fonts</artifactId><version>5.6.1</version></dependency>注意:这里两个依赖的版本不同,但说明用户同时使用了这两个jar包。引用[3]提到了jasperreports-5.6.1.jar包中新增字体的方法,具体操作是在jasperreports-fonts.xml文件中配置字体。这个配置文件位于jasperreports-fonts的jar包中(路径:net\sf\jasperreports\fonts)。同时,配置文件中定义了字体的使用(如MicrosoftYaHeiUI)。这说明jasperreports-fonts.jar提供了字体支持。此外,引用[2]提到使用JasperReport5.6时,需要在iReport5.6中编译得到.jasper文件,但没有直接回答字体包是否必须。引用[4]是关于用户手册的,没有直接涉及字体包依赖。分析核心问题:jasperreports-fonts-5.6.1.jar是否是jasperreports-5.6.1.jar必须的?实际上,jasperreports-fonts.jar并不是jasperreports.jar运行时的强制依赖。jasperreports.jar本身包含了基本的字体(如DejaVu字体),因此在没有jasperreports-fonts.jar的情况下,报表仍然可以生成。但是,如果报表中需要使用额外的字体(比如中文字体、特定图标字体等),那么就需要jasperreports-fonts.jar来提供这些字体资源。引用[3]中描述的操作就是向jasperreports-fonts.jar中添加自定义字体的例子。因此,如果用户需要使用超出jasperreports.jar内置字体之外的字体,则必须使用jasperreports-fonts.jar(或者通过其他方式提供字体,但使用这个jar包是官方推荐的方式)。结论:-如果报表中只使用jasperreports内置的字体(如DejaVuSans,DejaVuSerif等),则不需要jasperreports-fonts.jar。-如果需要使用其他字体(例如中文字体“微软雅黑”),则必须添加jasperreports-fonts.jar,并在其中配置相应字体。因此,回答用户问题:jasperreports-5.6.1.jar并不强制需要jasperreports-fonts-5.6.1.jar,但若需要使用额外的字体,则必须一起使用。注意:在Maven项目中,通常建议同时引入jasperreports-fonts,因为实际报表中很可能会用到非内置字体。根据引用[3]中的配置示例,我们可以看到jasperreports-fonts.jar中已经包含了一些字体配置(如MicrosoftYaHeiUI),这些字体在jasperreports.jar中是没有的。因此,如果报表中使用了这些字体,就必须有jasperreports-fonts.jar。最后,我们生成相关问题。</think>### JasperReports 5.6.1 字体依赖解析 根据提供的引用信息分析,**`jasperreports-5.6.1.jar` 并非必须与 `jasperreports-fonts-5.6.1.jar` 一起使用**,但存在以下关键依赖关系: 1. **基础功能独立性** `jasperreports-5.6.1.jar` 作为核心库可独立运行,支持报表编译、数据填充和导出等基础功能[^2][^4]。若无特殊字体需求,可不引入字体包。 2. **字体支持的依赖条件** - **使用非内置字体**:若报表需使用特定字体(如中文、图标字体等),则必须引入 `jasperreports-fonts-5.6.1.jar`,并在其配置文件 `jasperreports-fonts.xml` 中注册字体[^3]。 *示例配置片段:* ```xml <fontFamily name="Microsoft YaHei UI"> <normal>net/sf/jasperreports/fonts/msyh/msyh.ttf</normal> <pdfEncoding>Identity-H</pdfEncoding> <pdfEmbedded>true</pdfEmbedded> </fontFamily> ``` - **PDF字体嵌入**:要确保PDF导出时字体正确渲染,需通过字体包的 `<pdfEmbedded>true</pdfEmbedded>` 配置启用嵌入功能[^3]。 3. **版本兼容性** 字体包版本无需严格匹配核心库版本(如引用[1]中核心库用6.3.0而字体包用5.6.1),但建议保持相近版本以避免兼容问题[^1][^2]。 **结论**: - ✅ **基础场景**:纯英文报表或仅使用内置字体时,无需字体包。 - ❗ **高级场景**:涉及中文、自定义字体或PDF精准渲染时,必须引入 `jasperreports-fonts-5.6.1.jar` 并正确配置[^3]。 --- ###
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值