Constants.java
1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package com.bsth.common;
import com.alibaba.fastjson.JSONObject;
import com.bsth.util.ConfigUtil;
/**
*
* @ClassName: Constants
* @Description: TODO(常量类)
* @author PanZhao
* @date 2016年3月18日 下午11:06:53
*
*/
public class Constants {
/**
* 不需要拦截的资源
*/
public static final String LOGIN = "/user/login/**";
public static final String LOGIN_PAGE = "/login.html";
public static final String ASSETS_URL = "/assets/**";
public static final String FAVICON_URL = "/favicon.ico";
public static final String LOGIN_FAILURE = "/user/loginFailure";
public static final String CAPTCHA = "/captcha.jpg";
public static final String REAL_TF = "/car_park_real/bus";
public static final String SESSION_USERNAME = "sessionUserName";
public static final String COMPANY_AUTHORITYS = "cmyAuths";
/**
* 对外的上行输入接口
*/
public static final String UPSTREAM_URL = "/bus_park_dispatch/**";
//公司权限
public static String authJsonStr;
public static String tccName;
public static String tccCode;
static{
JSONObject json = JSONObject.parseObject(ConfigUtil.get("data.company.json"));
JSONObject authJson = new JSONObject();
String[] codes = ConfigUtil.get("tcc.company.id").split(",");
for(int i = 0; i < codes.length; i ++){
authJson.put(codes[i], json.get(codes[i]));
}
authJsonStr = authJson.toJSONString();
tccName = ConfigUtil.get("tcc.name");
tccCode = ConfigUtil.get("tcc.code");
}
}