小编Set*_*son的帖子

Spring Boot 和 PrettyFaces:PrettyFaces 未加载

摘要:当我打开 Spring Boot 应用程序时。(在嵌入式 Tomcat 8 服务器上运行)我从未收到过:

INFO  [org.ocpsoft.rewrite.servlet.RewriteFilter] RewriteFilter starting up...
...
INFO  [org.ocpsoft.rewrite.servlet.RewriteFilter] Loaded [] org.ocpsoft.rewrite.config.ConfigurationProvider [org.ocpsoft.rewrite.prettyfaces.PrettyFacesRewriteConfigurationProvider<1>]
INFO  [org.ocpsoft.rewrite.servlet.RewriteFilter] RewriteFilter initialized.
Run Code Online (Sandbox Code Playgroud)

记录通知。出于某种原因,PrettyFaces 没有启动,我不知道为什么。

技术:Spring Boot 1.2.0.RELEASE、Java 8、用于依赖管理的Maven。嵌入式 Tomcat 8.0.15 服务器。

尽可能专注于 Java 配置。以前我尝试使用 Rewrite,但它给了我同等数量的粗暴。感觉我错过了一些明显的东西。

这是我当前代码库的链接。(它很小,只是在为一个新项目打基础,还没有什么大的实施。)

https://github.com/MeisterGit/FoundationServer

Maven 依赖:

<dependency>
    <groupId>com.ocpsoft</groupId>
    <artifactId>prettyfaces-jsf2</artifactId>
    <version>3.3.3</version>
</dependency>`
Run Code Online (Sandbox Code Playgroud)

其他 Maven 依赖尝试:

<!-- PrettyFaces -->
<dependency>
    <groupId>org.ocpsoft.rewrite</groupId>
    <artifactId>rewrite-servlet</artifactId>
    <version>2.0.12.Final</version>
</dependency>
<dependency>
    <groupId>org.ocpsoft.rewrite</groupId>
    <artifactId>rewrite-config-prettyfaces</artifactId>
    <version>2.0.12.Final</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)

两个版本产生相同的结果。没有启动消息。

我试图将 XML 保持在最低限度。我已经设置了faces-config:

<faces-config xmlns="http://xmlns.jcp.org/xml/ns/javaee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"             
        xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
        http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"
        version="2.2">

    <!-- Allow Spring Beans to be accessible to JSF. …
Run Code Online (Sandbox Code Playgroud)

prettyfaces jsf-2.2 spring-boot

4
推荐指数
1
解决办法
1822
查看次数

标签 统计

jsf-2.2 ×1

prettyfaces ×1

spring-boot ×1