赞
踩
遇到问题 : Constant expression required
switch case中 CASE只能使用常量 , 所以使用枚举类的方法时报如上错误
解决方式也很简单,只需要把switch里的对象改为枚举对象 , case使用枚举判断
@Getter
@NoArgsConstructor
@AllArgsConstructor
public enum WelComeTypeEnum {
/**
* 欢迎语类型
*/
IMAGE(1, "image", "图片"),
LINK(2, "link", "链接"),
MINIAPP(3
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。