当我在 jboss as7 上部署我的 maven/spring 应用程序并尝试上传 docx 文件时,我收到以下消息。当我在应用程序的 WYSIWIG 编辑器中查看该消息时,该消息会显示在上传文件的正文中。当我在码头本地运行应用程序时,该消息不显示。我包含了 log4j 和 docx4j 属性文件。我不确定哪个属性可以让我切换错误中提到的 docx4j 类的调试日志记录,到目前为止,我在网络搜索中都是空的。顺便说一句,我的应用程序没有使用 log4j/docx4j xml 文件,从我读到的内容来看,它是一个非此即彼的设置。如果我应该切换到 xml,请让我知道并告知我需要调整哪些属性,以便我可以清除此消息。
泰
要隐藏这些消息,请关闭 org.docx4j.convert.out.html.HtmlExporterNG2 的 log4j 调试级别日志记录
log4j.properties
log4j.rootLogger=ERROR,stdout
#Console Appender
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=[%5p] [%t %d{hh:mm:ss}] (%F:%M:%L) %m%n
#Custom assignments
log4j.logger.Controllers=DEBUG,stdout
log4j.logger.Entities=DEBUG,stdout
log4j.logger.Models=DEBUG,stdout
#Disable additivity
log4j.additivity.Controllers=false
log4j.additivity.Entities=false
log4j.additivity.Models=false
docx4j.properties
# Page size: use a value from org.docx4j.model.structure.PageSizePaper enum
# eg A4, LETTER
docx4j.PageSize=LETTER
# Page size: use a value from org.docx4j.model.structure.MarginsWellKnown enum
docx4j.PageMargins=NORMAL
docx4j.PageOrientationLandscape=false
# Page size: use a value from org.pptx4j.model.SlideSizesWellKnown enum
# eg A4, LETTER
pptx4j.PageSize=LETTER
pptx4j.PageOrientationLandscape=false
# These will be injected into docProps/app.xml
# if App.Write=true
docx4j.App.write=true
docx4j.Application=docx4j
docx4j.AppVersion=2.7
# of the form XX.YYYY where X and Y represent numerical values
# These will be injected into docProps/core.xml
docx4j.dc.write=true
docx4j.dc.creator.value=docx4j
docx4j.dc.lastModifiedBy.value=docx4j
#
#docx4j.McPreprocessor=true
# If you haven't configured log4j yourself
# docx4j will autoconfigure it. Set this to true to disable that
docx4j.Log4j.Configurator.disabled=true