如何修复找不到uri的Facelet标签库http://www.springframework.org/security/tags

时间:2019-01-07 01:26:39

标签: spring-boot spring-security

我正在使用Primefaces + JoinFaces和Spring Security进行Spring引导项目,该项目运行正常,除了此警告的一个小问题

找不到uri http://www.springframework.org/security/tags的facelet标签库

taglib jar文件存在并已完全下载,但仍收到此警告

这是我的build.gradle文件的内容

buildscript {
    ext {
        springBootVersion = '2.1.1.RELEASE'
    }
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
    }
}

apply plugin: 'java'
apply plugin: 'eclipse-wtp'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'war'

group = 'com.trip'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8

repositories {
    mavenCentral()
}

configurations {
    providedRuntime
}

dependencies {
    implementation('org.springframework.boot:spring-boot-starter-actuator')
    implementation('org.springframework.boot:spring-boot-starter-aop')
    implementation('org.springframework.boot:spring-boot-starter-cache')
    implementation('org.springframework.boot:spring-boot-starter-data-jpa')
    implementation('org.springframework.boot:spring-boot-starter-data-rest')
    implementation('org.springframework.boot:spring-boot-starter-jooq')
    implementation('org.springframework.boot:spring-boot-starter-mail')
    implementation('org.springframework.boot:spring-boot-starter-security')

    // https://mvnrepository.com/artifact/org.springframework.security/spring-security-taglibs
    compile group: 'org.springframework.security', name: 'spring-security-taglibs', version: '5.1.2.RELEASE'

    // https://mvnrepository.com/artifact/org.joinfaces/jsf-spring-boot-starter
    compile group: 'org.joinfaces', name: 'jsf-spring-boot-starter', version: '4.0.1'



    // https://mvnrepository.com/artifact/org.primefaces/primefaces
    compile group: 'org.primefaces', name: 'primefaces', version: '6.2'



    compile 'org.primefaces:primefaces'
    compile 'org.primefaces.extensions:primefaces-extensions'
    runtime 'org.primefaces.extensions:resources-ckeditor'


    implementation('org.springframework.boot:spring-boot-starter-validation')
    implementation('org.springframework.boot:spring-boot-starter-web')
    implementation('org.springframework.boot:spring-boot-starter-webflux')
    implementation('org.springframework.retry:spring-retry')
    implementation('org.springframework.session:spring-session-core')
    runtimeOnly('org.springframework.boot:spring-boot-devtools')
    runtimeOnly('org.postgresql:postgresql')
    compileOnly('org.springframework.boot:spring-boot-configuration-processor')
    compileOnly('org.projectlombok:lombok')
    providedRuntime('org.springframework.boot:spring-boot-starter-tomcat')
    testImplementation('org.springframework.boot:spring-boot-starter-test')
    testImplementation('io.projectreactor:reactor-test')
    testImplementation('org.springframework.restdocs:spring-restdocs-mockmvc')
    testImplementation('org.springframework.security:spring-security-test')
}

1 个答案:

答案 0 :(得分:0)

已解决的家伙!!! ^ _ ^

使用此pom文件配置切换回Maven:

<properties>
    <java.version>1.8</java.version>
    <joinfaces.version>4.0.1</joinfaces.version>

</properties>

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.joinfaces</groupId>
            <artifactId>joinfaces-dependencies</artifactId>
            <version>${joinfaces.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

<dependencies>




    <dependency>
        <groupId>org.joinfaces</groupId>
        <artifactId>security-spring-boot-starter</artifactId>
    </dependency>
    <dependency>
        <groupId>org.joinfaces</groupId>
        <artifactId>primefaces-spring-boot-starter</artifactId>
    </dependency>




    <dependency>
        <groupId>javax.enterprise</groupId>
        <artifactId>cdi-api</artifactId>
    </dependency>

    <dependency>
        <groupId>org.joinfaces</groupId>
        <artifactId>rewrite-spring-boot-starter</artifactId>
    </dependency>

    <dependency>
        <groupId>org.primefaces.themes</groupId>
        <artifactId>all-themes</artifactId>
        <version>1.0.10</version>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-aop</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-cache</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-rest</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-jdbc</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>


    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>org.postgresql</groupId>
        <artifactId>postgresql</artifactId>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-tomcat</artifactId>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-security</artifactId>
    </dependency>
</dependencies>


<repositories>
    <repository>
        <id>primefaces-maven-repository</id>
        <name>PrimeFaces Maven Repository</name>
        <url>http://repository.primefaces.org</url>
    </repository>
</repositories>



<build>



    <pluginManagement>
        <plugins>

            <plugin>
                <groupId>org.joinfaces</groupId>
                <artifactId>joinfaces-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>




        </plugins>
    </pluginManagement>



</build>

谢谢你,祝你好运! ^ _ ^