*
* @Author
* @CreateTime
*/
public class CityClass {
public static enum CityEnum {
XINZHOU(100002, "忻州"),
DATONG(100003, "大同"),
TAIYUAN(100001, "太原");
private final Integer code;
private final String name;
CityEnum(Integer value, String desc) {
this.code = value;
this.name = desc;
}
public Integer getCode() {
return code;
}
public String getName() {
return name;
}
}
}
xml:
/* Caused by: org.apache.ibatis.builder.BuilderException: Error evaluating expression
'cityName == @com.weather.weatherexpert.common.utils.CityClass@CityEnum.XINZHOU.getName'. Cause: org.apache.ibatis.ognl.OgnlException:
Could not get static field CityEnum from class com.weather.weatherexpert.common.utils.CityClass [java.lang.NoSuchFieldException: CityEnum]*/
area_table