yangzailu

导航

springboot常量定义

定义位置:

constant文件夹下:

  

 

 

 

定义标准:

package com.hewa.position.constant;
import java.util.ArrayList;
import java.util.List;
public class ReportConstant {
    //禾蛙推荐报告模板
    public static  final Integer HEWA_REPORT = 0;
    //猎企推荐报告
    public static  final Integer CONSULANT_REPORT = 1;
    //自定义模板
    public static  final Integer HEWA_CUSTOM_REPORT = 3;
    //不需要模板
    public static  final Integer UNWANTED_REPORT = 4;
}

  使用方法:

在控制器中先行引入:

import com.hewa.position.constant.*;

控制器中调用:

verSionList.add(ReportConstant.CONSULANT_REPORT);
ReportConstant.CONSULANT_REPORT;

 

posted on 2022-11-03 17:34  飞离地平线  阅读(606)  评论(0)    收藏  举报