我尝试将文件夹名称“primefaces-myTheme”更改为“primefaces_myTheme”,但是当我运行应用程序时,它会抛出异常
<i>Caused by: javax.faces.FacesException: Error loading css, cannot find "theme.css" resource of "primefaces-myTheme" library </i>
它一直在寻找“primefaces-myTheme”。
是否可以将文件夹名称“primefaces-Theme”更改为另一个文件夹名称?
我正在使用primefaces 5.2。
这是不可能的,因为它是硬编码的:https://github.com/primefaces/primefaces/blob/master/src/main/java/org/primefaces/renderkit/HeadRenderer.java#L89
但是你可以覆盖HeadRenderer(参见:How to register a custom renderer in JSF?)