首页 > 代码库 > spring,property not found on type

spring,property not found on type

刚开始学spring mvc ,遇到这个报错。

jsp页面

技术分享

user 实体类

public class User {
    private String name;
    private int    age;
    private String interest;

    public User(){

    }

    public User(String name,int age,String interest){
        this.name = name;
        this.age = age;
        this.interest = interest;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getInterest() {
        return interest;
    }

    public void setInterest(String interest) {
        this.interest = interest;
    }
}

原来变量我写的是首字母大写,结果就总是报找不到变量

全部改为小写后,问题解决

 

spring,property not found on type