skip to Main Content

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

Postgresql – Using an @Entity in an @IdClass as @Id

I have an entity that looks like this @Entity @IdClass(AId.class) class A { @Id private String userName @Id @NotNull @JoinColumn(name = "location_id", referenceColumnName = "id", nullable=false, foreignKey = @ForeignKey(name = ...)) private Location location; private String userInformation; } The class…

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
Back To Top
Search