here is the sample code:
@RestController
@RequestMapping("/v1/user")
public class JsonSampleController {
@GetMapping
public User getUser() {
Vehicle vehicle = new Car();
return new User("y", 4);
}
}
after the application is started, only Vehicle
is loaded into JVM(result of -verbose:class), does Car
will be loaded at runtime?