skip to Main Content

Azure – How to return the list of Roles that the user has?

I followed the article, https://learn.microsoft.com/en-us/azure/developer/java/spring-framework/configure-spring-boot-starter-java-app-with-azure-active-directory and created an App role The below endpoint uses users role to authorize @CrossOrigin(origins = "http://localhost:8080") @RestController @RequestMapping("/api") public class TutorialController { @Autowired TutorialRepository tutorialRepository; @PreAuthorize("hasAnyAuthority('APPROLE_Admin', 'APPROLE_Contributor')") @GetMapping("/tutorials") public ResponseEntity<List<Tutorial>> getAllTutorials(@RequestParam(required = false) String title)…

VIEW QUESTION

I get exception with axon-mongo 4.5, spring boot 2.4.3 and mongodb 4.2 in AxonConfig class

When running the project I get this exception: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'axonMongoTemplate' defined in com.springbank.user.core.configuration.AxonConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.axonframework.extensions.mongo.MongoTemplate]: Factory method 'axonMongoTemplate' threw exception; nested exception is…

VIEW QUESTION
Back To Top
Search