skip to Main Content

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

Configuring properties injection from Azure Keyvault using spring boot and spring-cloud-azure-starter-keyvault-secrets

I would like to replace spring.datasource.password with a password from azure keyvault. I have a project based on spring boot: <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>3.3.1</version> I am using dependencies : <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>com.azure</groupId> <artifactId>azure-identity</artifactId> <version>1.13.0</version> <scope>compile</scope> </dependency> <dependency> <groupId>com.azure.spring</groupId>…

VIEW QUESTION
Back To Top
Search