1. 程式人生 > >spring,property not found on type

spring,property not found on type

urn jsp logs ret tint oid pro blog nbsp

剛開始學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