Skip to content

Convertor (String -> GrantedAuthority) from Chapter 6 not getting created during Controller Test execution from chapter 5 #8

@RuchiInTheCloud

Description

@RuchiInTheCloud

In Chapter 6, I added the Converter to my repository and can start the application. When I run tests from Chapter 5 however they fail with the error:

Caused by: org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'app.config.users[0].authorities[0]' to org.springframework.security.core.GrantedAuthority

I dont understand why the Convertor ( String -> GrantedAuthority) is not getting recognized by the tests. How to fix this issue?

(Also, thank you for beautifully written book. I wish someone gifted it to me 6 years ago. Much easier to learn Spring concepts in a structured way with this book, compared to randomly from StackOverflow.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions