- 博客(3)
- 收藏
- 关注
原创 SpringBoot 读取resources下面的文件
一、在resources新建文件二、读取文件if (ResourceUtils.isUrl("classpath:sql/initData.sql")) { try { File file = ResourceUtils.getFile("classpath:sql/initData.sql"); ...
2018-06-30 19:13:23 11639 1
原创 Response返回JSON数据
HttpServletResponse 返回Json数据resp.setCharacterEncoding("utf-8");resp.setContentType("application/json; charset=utf-8");PrintWriter writer = resp.getWriter();Map<String, String> map = new Has...
2018-06-21 22:08:29 87238 6
原创 OkHttp 里面配置 HTTP Basic Auth
public OkHttpClient buildBasicAuthClient(final String name, final String password) { return new OkHttpClient.Builder().authenticator(new Authenticator() { @Override ...
2018-06-21 16:04:03 7577
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人