skip to Main Content

Error while retrieving OAuth 2.0 Access Token in Azure AD integrated Spring Boot App

I have configured Azure AD credentials in my Spring Boot project's application.propertiesfile using the dependency spring-cloud-azure-starter-active-directory. Here is the configuration: spring.cloud.azure.active-directory.enabled=true spring.cloud.azure.active-directory.profile.tenant-id=${TENANT_ID_ENV_VAR} spring.cloud.azure.active-directory.credential.client-id=${CLIENT_ID_ENV_VAR} spring.cloud.azure.active-directory.credential.client-secret=${CLIENT_SECRET_ENV_VAR} Application Code: @RestController public class HelloController { @GetMapping("/user") public String getUserInfo( @AuthenticationPrincipal OAuth2User principal) { //…

VIEW QUESTION

Postgresql – Problem in a function inside of contructor isnt returning the expected value after using Post method

Problem in calculating the age of majority of a student in Spring Boot I have a Student class with the following attributes: package com.example.estudantes.model; import jakarta.persistence.*; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import java.time.LocalDate; import java.time.Period; @Entity @Table(name = "students")…

VIEW QUESTION

No mapping for GET /json1/user

I'm working on a SpringMVC project. my jsonController.java: @RequestMapping("json1") @RestController //= @Controller+@ResponseBody public class jsonController { @RequestMapping("user") public User data(){ User user = new User(); user.setAge(22); user.setName("kt"); return user; } } my mvcConfig.java: @EnableWebMvc @Configuration @ComponentScan(basePackages = "com.atguigu.json") public class…

VIEW QUESTION

Json – Why LocalDateTime is serialized as array when return as ReponseBody in springboot?

I want to get the dates in a format of dd/MM/yyyy so,I wrote this code first: @GetMapping("/testAjax.json") public ResponseBody<?> AjaxResponse testAjax(){ AjaxResponse response = new AjaxResponse(); DateTimeTest test = new DateTimeTest(); test.setDateTime(LocalDateTime.now()); response.addResponse("date", LocalDateTime.now()); response.addResponse("test", test); return response; }` and…

VIEW QUESTION

Postgresql – What causes the PropertyReferenceException

I'm getting below error and couldn't figure it what causes the issue. 2024-10-19T11:26:28.546+05:30 WARN 9455 --- [rentsysapi] [nio-8080-exec-2] .m.m.a.ExceptionHandlerExceptionResolver : Resolved [org.springframework.data.mapping.PropertyReferenceException: No property 'asset' found for type 'AssetVehicle'] Asset Vehicle entity: @NoArgsConstructor @AllArgsConstructor @Getter @Setter @Entity @Table(name = "asset_vehicle",…

VIEW QUESTION
Back To Top
Search