【问题标题】:Caused by: java.lang.IllegalArgumentException: More than one fragment with the name [admin_theme_fragment] was found原因:java.lang.IllegalArgumentException:找到多个名为 [admin_theme_fragment] 的片段
【发布时间】:2022-01-11 13:55:08
【问题描述】:

我被困在如何解决这个错误上。这可能是一个重复的问题,但solution 提供的我不知道如何在连接面和弹簧启动中配置它,因为我没有使用 web.xml。 Here 是我的 pom XML,下面是我的 application.properties

server.servlet.context-path=/School
joinfaces.primefaces.theme=admin
joinfaces.jsf.project-stage=development
joinfaces.primefaces.csp=true
joinfaces.primefaces.font-awesome=true
server.servlet.session.cookie.http-only=true
server.servlet.session.cookie.secure=true
joinfaces.myfaces.clear-input-when-submitted-value-is-null-or-empty=true
spring.datasource.url= jdbc:postgresql://localhost:5432/mydb
spring.datasource.username=postgres
spring.datasource.password=password
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
spring.datasource.driver-class-name=org.postgresql.Driver
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=false
server.error.whitelabel.enabled=false
spring.mvc.throw-exception-if-no-handler-found=true
server.max-http-header-size=10MB
server.port=8443
security.require-ssl=true

这是我尝试部署到外部 tomcat 时出现的错误的完整堆栈跟踪。当我从 IDE 运行时,它工作正常。

【问题讨论】:

    标签: java spring-boot jsf joinfaces


    【解决方案1】:

    如果您使用 IDE,请在文件中搜索单词 admin_theme_fragment。您应该在代码中使用它一次,但您已经使用了不止一次。

    相应地重命名。

    【讨论】:

    • 已经意识到这个 admin_theme_fragment 在 admin-theme 中使用不知道如何忽略它
    猜你喜欢
    • 2021-09-29
    • 2019-12-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-08-17
    • 1970-01-01
    • 1970-01-01
    • 2014-10-29
    相关资源
    最近更新 更多