以下是我的課: -無法使用Eclipse STS在Spring Security上工作?
正如你可以看到有三條紅線由於一些未知的原因來。當我試圖延伸WebSecurityConfigureAdapter
類時,它正在到來。誤差分別作爲以下內容: -
錯誤1:
錯誤2:
錯誤3:
我試圖將Spring Security與Spring-Boot應用程序集成在一起。這裏是我的的pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>SpringBoot</groupId>
<artifactId>SpringWebAngularJS</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>SpringWebAngularJS</name>
<description>Spring Boot Web AngularJs Example</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.4.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-couchbase</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
</dependency>
<dependency>
<groupId>com.github.ulisesbocchio</groupId>
<artifactId>jasypt-spring-boot-starter</artifactId>
<version>1.10</version>
</dependency>
<!-- <dependency>
<groupId>org.webjars</groupId>
<artifactId>bootstrap</artifactId>
<version>3.3.7</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>jquery</artifactId>
<version>3.2.1</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>angularjs</artifactId>
<version>1.6.4</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-security</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
到底哪裏出問題了?
Eclipse的STS版本:彈簧工具套件 - 3.8.4.RELEASE-e4.6.3-Win32的x86_64的
我從pom.xml中刪除了'jasypt',並將加密後的密碼還原爲純文本,但仍然出現同樣的錯誤。另外,我下載了IDE的新版本,即** spring-tool-suite-3.9.0.RELEASE-e4.7.0-win32-x86_64 **來檢查,但得到相同的錯誤。 – Satyaprakash
爲了進一步確定問題,您可以嘗試在STS中使用'Spring Starter Project'嚮導創建一個簡單的Spring Boot項目。那樣有用嗎?如果這樣做,而且你的項目沒有,你也可以嘗試通過GitHub提交問題並附加你的項目,這樣我們就可以深入瞭解。 –
好的,讓我試試這個。 – Satyaprakash