我以前为了一个公共的url 而写过一个配置文件,去读取然后取值
今天写代码过程中 突然想到为什么不去直接写到静态常量里面呢
public class URL {
public static final String BASE="http://localhost:8080/share/webapi";
public static final String DIGEST=BASE+"/annotation";
}
这么简单就实现的事,还会还搞那么麻烦!!
我以前为了一个公共的url 而写过一个配置文件,去读取然后取值
今天写代码过程中 突然想到为什么不去直接写到静态常量里面呢
public class URL {
public static final String BASE="http://localhost:8080/share/webapi";
public static final String DIGEST=BASE+"/annotation";
}
这么简单就实现的事,还会还搞那么麻烦!!