public class Student { private int studentId; private String studentName; private int age; public Student(int studentId , String studentName, int age){ this.studentId=studentId; this.studentName=studentName; this.age=age; } public int getStudentId()
That's because Spring isn't managing your PagePopulationInterceptor instance. You are creating it yourself in the below (拦截器内使用@Autowired时出现了null,这是由于你的spring对象注入时机在你的拦截器之后了) public @Override void addInterceptors(InterceptorRegistry registry) { regis