这一章节我们来说一下SpEl表达式的坑,以及补充一下SpEl表达式操作类的方法与常量。
1.domain
厨师类:(新增一个朋友属性)
package com.raylee.my_new_spring.my_new_spring.ch01.topic_1_16;
public class Chief {
private String name = "";
private Oven oven;
private Chief friend;
public Chief getFriend() {
return friend;
}
public void setFriend(Chief friend) {
this.friend = friend;
}
public String getName() {
return name;
}
public Oven getOven() {
return oven;
}
public void setName(String name) {
this.name = name;
}
public void setOven(Oven oven) {
this.oven = oven;
}
public void userOven() {
System.out.println(name + " use " + oven);
}
}
烤炉类:(增加了烤炉的大小)
package com.raylee.my_new_spring.my_new_spring.ch01.topic_1_16;
public class Oven {
private String name = "";
pr