提交 | 用户 | 时间 | ||
e7c126 | 1 | package com.iailab.framework.common.util.spring; |
H | 2 | |
3 | import cn.hutool.extra.spring.SpringUtil; | |
4 | ||
5 | import java.util.Objects; | |
6 | ||
7 | /** | |
8 | * Spring 工具类 | |
9 | * | |
10 | * @author iailab | |
11 | */ | |
12 | public class SpringUtils extends SpringUtil { | |
13 | ||
14 | /** | |
15 | * 是否为生产环境 | |
16 | * | |
17 | * @return 是否生产环境 | |
18 | */ | |
19 | public static boolean isProd() { | |
20 | String activeProfile = getActiveProfile(); | |
21 | return Objects.equals("prod", activeProfile); | |
22 | } | |
23 | ||
24 | } |