Constants.java
1.71 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
52
53
package com.xiniunet.my.tool;
import org.apache.velocity.app.Velocity;
import java.util.Properties;
/**
*
* Created on 9/17/14.
* @author 吕浩
* @version 1.0.0
*/
public class Constants {
public static final long PRODUCT_ID=100000L;
public static final String STRING_EMPTY="";
public static final String ERROR_MESSAGE_500 = "服务器走了下神,稍后再试一次";
public static final String NOT_EXIST_METHOD = "调用的方法不存在";
/**
* 默认用户小头像的路径
*/
public static final String DEFAULT_AVATAR_URL = "http://xiniunet.oss-cn-hangzhou.aliyuncs.com/common/avatar_default.png";
/**
* 默认用户大头像的路径
*/
public static final String DEFAULT_BIG_AVATAR_URL = "http://xiniunet.oss-cn-hangzhou.aliyuncs.com/common/avatar_default_big.png";
/**
* 默认用户小头像的路径
*/
public static final String DEFAULT_LOGO_URL = "http://xiniunet.oss-cn-hangzhou.aliyuncs.com/common/logo_default.png";
/**
* 默认用户大头像的路径
*/
public static final String DEFAULT_BIG_LOGO_URL = "http://xiniunet.oss-cn-hangzhou.aliyuncs.com/common/logo_default_big.png";
public static Properties getProperties() {
Properties properties = new Properties();
properties.setProperty("resource.loader", "class");
properties.setProperty("class.resource.loader.class",
"org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
properties.setProperty(Velocity.ENCODING_DEFAULT, "UTF-8");
properties.setProperty(Velocity.INPUT_ENCODING, "UTF-8");
properties.setProperty(Velocity.OUTPUT_ENCODING, "UTF-8");
return properties;
}
}