Ошибка класса WebSecurityConfigurerAdapter в Spring SecurityJAVA

Программисты JAVA общаются здесь
Ответить
Anonymous
 Ошибка класса WebSecurityConfigurerAdapter в Spring Security

Сообщение Anonymous »


I used spring security for the login of my application. I used Maven, Spring Boot 3.2.3 and Java 17. I have got below error when Compilation of my project.

java: cannot find symbol symbol: class WebSecurityConfigurerAdapter location: package org.springframework.security.config.annotation.web.configuration It says cannot find WebSecurityConfigurerAdapter I have added the dependencies also but still I am getting that error

I'm using intelliji as IDE.Below I have provide the code i tried to use Spring security

package com.xyz.productdashboardlogin; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; @Configuration @EnableWebSecurity public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter{ } And also below i will provide my Pom.xml file.

4.0.0 org.springframework.boot spring-boot-starter-parent 3.2.3 com.xyz Product-Dashboard-Login 0.0.1-SNAPSHOT Product-Dashboard-Login Demo project for Spring Boot 17 org.springframework.boot spring-boot-starter-data-jpa org.springframework.boot spring-boot-starter-security org.springframework.boot spring-boot-starter-web com.mysql mysql-connector-j runtime org.springframework.boot spring-boot-starter-test test org.springframework.security spring-security-test test org.springframework.security spring-security-web org.springframework.security spring-security-config org.springframework.boot spring-boot-maven-plugin Are the WebSecurityConfigurerAdapter not working with newer versions of Spring? I'm a beginner to the Spring Boot. Could you please help me to fix this issue?


Источник: https://stackoverflow.com/questions/780 ... g-security
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «JAVA»