Home > OS >  AADWebSecurityConfigurerAdapter not found
AADWebSecurityConfigurerAdapter not found

Time:04-22

I´m trying azure/spring things out - guided from this tutorial: https://docs.microsoft.com/de-de/azure/developer/java/spring-framework/spring-boot-starter-for-azure-active-directory-developer-guide

Somehow the AADWebSecurityConfigurerAdapter class cannot be found. Am i missing something although i`ve followed the above link?

I have this pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.6.7</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>de.thd</groupId>
    <artifactId>az</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>az</name>
    <description>az</description>
    <properties>
        <java.version>17</java.version>
        <spring-cloud-azure.version>4.0.0</spring-cloud-azure.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-oauth2-client</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>com.azure.spring</groupId>
            <artifactId>spring-cloud-azure-starter-active-directory</artifactId>
            <version>${spring-cloud-azure.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.azure.spring</groupId>
                <artifactId>spring-cloud-azure-dependencies</artifactId>
                <version>${spring-cloud-azure.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

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

</project>

I want to extend AADWebSecurityConfigurerAdapter to do some custom stuff. But the class cannot be found:

@Configuration
@EnableWebSecurity
@EnableGlobalMethodSecurity(prePostEnabled = true)
public class SecurityConfiguration extends AADWebSecurityConfigurerAdapter   {

}

EDIT:

I´ve just opened up an issue for this: https://github.com/MicrosoftDocs/azure-dev-docs/issues/763

CodePudding user response:

The name is a little bit different, lowercase Aad: AadWebSecurityConfigurerAdapter

  • Related