工具类集合

工具类集和Utils
CookieCookieUtils.java
EasyUIEasyUIResult.java
ExceptionExceptionUtil.java
FastDFSFastDFSClient.java
FtpFtpUtil.java
HttpClientHttpClientUtil.java
IDIDUtils.java
JsonJsonUtils.java
PicturePictureResult.java
通用响应工具类TaotaoResult.java

CookieUtils.java

package com.taotao.common.utils;import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.net.URLEncoder;import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;/*** * Cookie 工具类**/
public final class CookieUtils {/*** 得到Cookie的值, 不编码* * @param request* @param cookieName* @return*/public static String getCookieValue(HttpServletRequest request, String cookieName) {return getCookieValue(request, cookieName, false);}/*** 得到Cookie的值,* * @param request* @param cookieName* @return*/public static String getCookieValue(HttpServletRequest request, String cookieName, boolean isDecoder) {Cookie[] cookieList = request.getCookies();if (cookieList == null || cookieName == null) {return null;}String retValue = null;try {for (int i = 0; i < cookieList.length; i++) {if (cookieList[i].getName().equals(cookieName)) {if (isDecoder) {retValue = URLDecoder.decode(cookieList[i].getValue(), "UTF-8");} else {retValue = cookieList[i].getValue();}break;}}} catch (UnsupportedEncodingException e) {e.printStackTrace();}return retValue;}/*** 得到Cookie的值,* * @param request* @param cookieName* @return*/public static String getCookieValue(HttpServletRequest request, String cookieName, String encodeString) {Cookie[] cookieList = request.getCookies();if (cookieList == null || cookieName == null) {return null;}String retValue = null;try {for (int i = 0; i < cookieList.length; i++) {if (cookieList[i].getName().equals(cookieName)) {retValue = URLDecoder.decode(cookieList[i].getValue(), encodeString);break;}}} catch (UnsupportedEncodingException e) {e.printStackTrace();}return retValue;}/*** 设置Cookie的值 不设置生效时间默认浏览器关闭即失效,也不编码*/public static void setCookie(HttpServletRequest request, HttpServletResponse response, String cookieName,String cookieValue) {setCookie(request, response, cookieName, cookieValue, -1);}/*** 设置Cookie的值 在指定时间内生效,但不编码*/public static void setCookie(HttpServletRequest request, HttpServletResponse response, String cookieName,String cookieValue, int cookieMaxage) {setCookie(request, response, cookieName, cookieValue, cookieMaxage, false);}/*** 设置Cookie的值 不设置生效时间,但编码*/public static void setCookie(HttpServletRequest request, HttpServletResponse response, String cookieName,String cookieValue, boolean isEncode) {setCookie(request, response, cookieName, cookieValue, -1, isEncode);}/*** 设置Cookie的值 在指定时间内生效, 编码参数*/public static void setCookie(HttpServletRequest request, HttpServletResponse response, String cookieName,String cookieValue, int cookieMaxage, boolean isEncode) {doSetCookie(request, response, cookieName, cookieValue, cookieMaxage, isEncode);}/*** 设置Cookie的值 在指定时间内生效, 编码参数(指定编码)*/public static void setCookie(HttpServletRequest request, HttpServletResponse response, String cookieName,String cookieValue, int cookieMaxage, String encodeString) {doSetCookie(request, response, cookieName, cookieValue, cookieMaxage, encodeString);}/*** 删除Cookie带cookie域名*/public static void deleteCookie(HttpServletRequest request, HttpServletResponse response,String cookieName) {doSetCookie(request, response, cookieName, "", -1, false);}/*** 设置Cookie的值,并使其在指定时间内生效* * @param cookieMaxage cookie生效的最大秒数*/private static final void doSetCookie(HttpServletRequest request, HttpServletResponse response,String cookieName, String cookieValue, int cookieMaxage, boolean isEncode) {try {if (cookieValue == null) {cookieValue = "";} else if (isEncode) {cookieValue = URLEncoder.encode(cookieValue, "utf-8");}Cookie cookie = new Cookie(cookieName, cookieValue);if (cookieMaxage > 0)cookie.setMaxAge(cookieMaxage);if (null != request) {// 设置域名的cookieString domainName = getDomainName(request);System.out.println(domainName);if (!"localhost".equals(domainName)) {cookie.setDomain(domainName);}}cookie.setPath("/");response.addCookie(cookie);} catch (Exception e) {e.printStackTrace();}}/*** 设置Cookie的值,并使其在指定时间内生效* * @param cookieMaxage cookie生效的最大秒数*/private static final void doSetCookie(HttpServletRequest request, HttpServletResponse response,String cookieName, String cookieValue, int cookieMaxage, String encodeString) {try {if (cookieValue == null) {cookieValue = "";} else {cookieValue = URLEncoder.encode(cookieValue, encodeString);}Cookie cookie = new Cookie(cookieName, cookieValue);if (cookieMaxage > 0)cookie.setMaxAge(cookieMaxage);if (null != request) {// 设置域名的cookieString domainName = getDomainName(request);System.out.println(domainName);if (!"localhost".equals(domainName)) {cookie.setDomain(domainName);}}cookie.setPath("/");response.addCookie(cookie);} catch (Exception e) {e.printStackTrace();}}/*** 得到cookie的域名*/private static final String getDomainName(HttpServletRequest request) {String domainName = null;String serverName = request.getRequestURL().toString();if (serverName == null || serverName.equals("")) {domainName = "";} else {serverName = serverName.toLowerCase();serverName = serverName.substring(7);final int end = serverName.indexOf("/");serverName = serverName.substring(0, end);final String[] domains = serverName.split("\\.");int len = domains.length;if (len > 3) {// www.xxx.com.cndomainName = "." + domains[len - 3] + "." + domains[len - 2] + "." + domains[len - 1];} else if (len <= 3 && len > 1) {// xxx.com or xxx.cndomainName = "." + domains[len - 2] + "." + domains[len - 1];} else {domainName = serverName;}}if (domainName != null && domainName.indexOf(":") > 0) {String[] ary = domainName.split("\\:");domainName = ary[0];}return domainName;}
}

EasyUIResult.java

package com.taotao.result;import java.util.List;/*** easyUIDataGrid对象返回值* <p>Title: EasyUIResult</p>* <p>Description: </p>* <p>Company: www.itcast.com</p> * @author	入云龙* @date	2015年7月21日下午4:12:52* @version 1.0*/
public class EasyUIResult {private Integer total;private List<?> rows;public EasyUIResult(Integer total, List<?> rows) {this.total = total;this.rows = rows;}public EasyUIResult(long total, List<?> rows) {this.total = (int) total;this.rows = rows;}public Integer getTotal() {return total;}public void setTotal(Integer total) {this.total = total;}public List<?> getRows() {return rows;}public void setRows(List<?> rows) {this.rows = rows;}
}

ExceptionUtil.java

package com.taotao.utils;import java.io.PrintWriter;
import java.io.StringWriter;public class ExceptionUtil {/*** 获取异常的堆栈信息* * @param t* @return*/public static String getStackTrace(Throwable t) {StringWriter sw = new StringWriter();PrintWriter pw = new PrintWriter(sw);try {t.printStackTrace(pw);return sw.toString();} finally {pw.close();}}
}

FastDFSClient.java

package cn.itcast.fastdfs.cliennt;import org.csource.common.NameValuePair;
import org.csource.fastdfs.ClientGlobal;
import org.csource.fastdfs.StorageClient1;
import org.csource.fastdfs.StorageServer;
import org.csource.fastdfs.TrackerClient;
import org.csource.fastdfs.TrackerServer;public class FastDFSClient {private TrackerClient trackerClient = null;private TrackerServer trackerServer = null;private StorageServer storageServer = null;private StorageClient1 storageClient = null;public FastDFSClient(String conf) throws Exception {if (conf.contains("classpath:")) {conf = conf.replace("classpath:", this.getClass().getResource("/").getPath());}ClientGlobal.init(conf);trackerClient = new TrackerClient();trackerServer = trackerClient.getConnection();storageServer = null;storageClient = new StorageClient1(trackerServer, storageServer);}/*** 上传文件方法* <p>Title: uploadFile</p>* <p>Description: </p>* @param fileName 文件全路径* @param extName 文件扩展名,不包含(.)* @param metas 文件扩展信息* @return* @throws Exception*/public String uploadFile(String fileName, String extName, NameValuePair[] metas) throws Exception {String result = storageClient.upload_file1(fileName, extName, metas);return result;}public String uploadFile(String fileName) throws Exception {return uploadFile(fileName, null, null);}public String uploadFile(String fileName, String extName) throws Exception {return uploadFile(fileName, extName, null);}/*** 上传文件方法* <p>Title: uploadFile</p>* <p>Description: </p>* @param fileContent 文件的内容,字节数组* @param extName 文件扩展名* @param metas 文件扩展信息* @return* @throws Exception*/public String uploadFile(byte[] fileContent, String extName, NameValuePair[] metas) throws Exception {String result = storageClient.upload_file1(fileContent, extName, metas);return result;}public String uploadFile(byte[] fileContent) throws Exception {return uploadFile(fileContent, null, null);}public String uploadFile(byte[] fileContent, String extName) throws Exception {return uploadFile(fileContent, extName, null);}
}

FtpUtil.java

package com.taotao.utils;import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;import org.apache.commons.net.ftp.FTP;
import org.apache.commons.net.ftp.FTPClient;
import org.apache.commons.net.ftp.FTPFile;
import org.apache.commons.net.ftp.FTPReply;/*** ftp上传下载工具类* <p>Title: FtpUtil</p>* <p>Description: </p>* <p>Company: www.itcast.com</p> * @author	入云龙* @date	2015年7月29日下午8:11:51* @version 1.0*/
public class FtpUtil {/** * Description: 向FTP服务器上传文件 * @param host FTP服务器hostname * @param port FTP服务器端口 * @param username FTP登录账号 * @param password FTP登录密码 * @param basePath FTP服务器基础目录* @param filePath FTP服务器文件存放路径。例如分日期存放:/2015/01/01。文件的路径为basePath+filePath* @param filename 上传到FTP服务器上的文件名 * @param input 输入流 * @return 成功返回true,否则返回false */  public static boolean uploadFile(String host, int port, String username, String password, String basePath,String filePath, String filename, InputStream input) {boolean result = false;FTPClient ftp = new FTPClient();try {int reply;ftp.connect(host, port);// 连接FTP服务器// 如果采用默认端口,可以使用ftp.connect(host)的方式直接连接FTP服务器ftp.login(username, password);// 登录reply = ftp.getReplyCode();if (!FTPReply.isPositiveCompletion(reply)) {ftp.disconnect();return result;}//切换到上传目录if (!ftp.changeWorkingDirectory(basePath+filePath)) {//如果目录不存在创建目录String[] dirs = filePath.split("/");String tempPath = basePath;for (String dir : dirs) {if (null == dir || "".equals(dir)) continue;tempPath += "/" + dir;if (!ftp.changeWorkingDirectory(tempPath)) {if (!ftp.makeDirectory(tempPath)) {return result;} else {ftp.changeWorkingDirectory(tempPath);}}}}//设置上传文件的类型为二进制类型ftp.setFileType(FTP.BINARY_FILE_TYPE);//上传文件if (!ftp.storeFile(filename, input)) {return result;}input.close();ftp.logout();result = true;} catch (IOException e) {e.printStackTrace();} finally {if (ftp.isConnected()) {try {ftp.disconnect();} catch (IOException ioe) {}}}return result;}/** * Description: 从FTP服务器下载文件 * @param host FTP服务器hostname * @param port FTP服务器端口 * @param username FTP登录账号 * @param password FTP登录密码 * @param remotePath FTP服务器上的相对路径 * @param fileName 要下载的文件名 * @param localPath 下载后保存到本地的路径 * @return */  public static boolean downloadFile(String host, int port, String username, String password, String remotePath,String fileName, String localPath) {boolean result = false;FTPClient ftp = new FTPClient();try {int reply;ftp.connect(host, port);// 如果采用默认端口,可以使用ftp.connect(host)的方式直接连接FTP服务器ftp.login(username, password);// 登录reply = ftp.getReplyCode();if (!FTPReply.isPositiveCompletion(reply)) {ftp.disconnect();return result;}ftp.changeWorkingDirectory(remotePath);// 转移到FTP服务器目录FTPFile[] fs = ftp.listFiles();for (FTPFile ff : fs) {if (ff.getName().equals(fileName)) {File localFile = new File(localPath + "/" + ff.getName());OutputStream is = new FileOutputStream(localFile);ftp.retrieveFile(ff.getName(), is);is.close();}}ftp.logout();result = true;} catch (IOException e) {e.printStackTrace();} finally {if (ftp.isConnected()) {try {ftp.disconnect();} catch (IOException ioe) {}}}return result;}public static void main(String[] args) {try {  FileInputStream in=new FileInputStream(new File("D:\\temp\\image\\gaigeming.jpg"));  boolean flag = uploadFile("192.168.0.0", 21, "ftpuser", "ftpuser", "/home/ftpuser/www/images","/2015/01/21", "gaigeming.jpg", in);  System.out.println(flag);  } catch (FileNotFoundException e) {  e.printStackTrace();  }  }
}

HttpClientUtil.java

package com.taotao.utils;import java.io.IOException;
import java.net.URI;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;import org.apache.http.NameValuePair;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;public class HttpClientUtil {public static String doGet(String url, Map<String, String> param) {// 创建Httpclient对象CloseableHttpClient httpclient = HttpClients.createDefault();String resultString = "";CloseableHttpResponse response = null;try {// 创建uriURIBuilder builder = new URIBuilder(url);if (param != null) {for (String key : param.keySet()) {builder.addParameter(key, param.get(key));}}URI uri = builder.build();// 创建http GET请求HttpGet httpGet = new HttpGet(uri);// 执行请求response = httpclient.execute(httpGet);// 判断返回状态是否为200if (response.getStatusLine().getStatusCode() == 200) {resultString = EntityUtils.toString(response.getEntity(), "UTF-8");}} catch (Exception e) {e.printStackTrace();} finally {try {if (response != null) {response.close();}httpclient.close();} catch (IOException e) {e.printStackTrace();}}return resultString;}public static String doGet(String url) {return doGet(url, null);}public static String doPost(String url, Map<String, String> param) {// 创建Httpclient对象CloseableHttpClient httpClient = HttpClients.createDefault();CloseableHttpResponse response = null;String resultString = "";try {// 创建Http Post请求HttpPost httpPost = new HttpPost(url);// 创建参数列表if (param != null) {List<NameValuePair> paramList = new ArrayList<>();for (String key : param.keySet()) {paramList.add(new BasicNameValuePair(key, param.get(key)));}// 模拟表单UrlEncodedFormEntity entity = new UrlEncodedFormEntity(paramList);httpPost.setEntity(entity);}// 执行http请求response = httpClient.execute(httpPost);resultString = EntityUtils.toString(response.getEntity(), "utf-8");} catch (Exception e) {e.printStackTrace();} finally {try {response.close();} catch (IOException e) {// TODO Auto-generated catch blocke.printStackTrace();}}return resultString;}public static String doPost(String url) {return doPost(url, null);}public static String doPostJson(String url, String json) {// 创建Httpclient对象CloseableHttpClient httpClient = HttpClients.createDefault();CloseableHttpResponse response = null;String resultString = "";try {// 创建Http Post请求HttpPost httpPost = new HttpPost(url);// 创建请求内容StringEntity entity = new StringEntity(json, ContentType.APPLICATION_JSON);httpPost.setEntity(entity);// 执行http请求response = httpClient.execute(httpPost);resultString = EntityUtils.toString(response.getEntity(), "utf-8");} catch (Exception e) {e.printStackTrace();} finally {try {response.close();} catch (IOException e) {// TODO Auto-generated catch blocke.printStackTrace();}}return resultString;}
}

IDUtils.java

package com.taotao.utils;import java.util.Random;/*** 各种id生成策略* <p>Title: IDUtils</p>* <p>Description: </p>* <p>Company: www.itcast.com</p> * @author	入云龙* @date	2015年7月22日下午2:32:10* @version 1.0*/
public class IDUtils {/*** 图片名生成*/public static String genImageName() {//取当前时间的长整形值包含毫秒long millis = System.currentTimeMillis();//long millis = System.nanoTime();//加上三位随机数Random random = new Random();int end3 = random.nextInt(999);//如果不足三位前面补0String str = millis + String.format("%03d", end3);return str;}/*** 商品id生成*/public static long genItemId() {//取当前时间的长整形值包含毫秒long millis = System.currentTimeMillis();//long millis = System.nanoTime();//加上两位随机数Random random = new Random();int end2 = random.nextInt(99);//如果不足两位前面补0String str = millis + String.format("%02d", end2);long id = new Long(str);return id;}public static void main(String[] args) {for(int i=0;i< 100;i++)System.out.println(genItemId());}
}

JsonUtils.java

package com.taotao.utils;import java.util.List;import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;/*** 淘淘商城自定义响应结构*/
public class JsonUtils {// 定义jackson对象private static final ObjectMapper MAPPER = new ObjectMapper();/*** 将对象转换成json字符串。* <p>Title: pojoToJson</p>* <p>Description: </p>* @param data* @return*/public static String objectToJson(Object data) {try {String string = MAPPER.writeValueAsString(data);return string;} catch (JsonProcessingException e) {e.printStackTrace();}return null;}/*** 将json结果集转化为对象* * @param jsonData json数据* @param clazz 对象中的object类型* @return*/public static <T> T jsonToPojo(String jsonData, Class<T> beanType) {try {T t = MAPPER.readValue(jsonData, beanType);return t;} catch (Exception e) {e.printStackTrace();}return null;}/*** 将json数据转换成pojo对象list* <p>Title: jsonToList</p>* <p>Description: </p>* @param jsonData* @param beanType* @return*/public static <T>List<T> jsonToList(String jsonData, Class<T> beanType) {JavaType javaType = MAPPER.getTypeFactory().constructParametricType(List.class, beanType);try {List<T> list = MAPPER.readValue(jsonData, javaType);return list;} catch (Exception e) {e.printStackTrace();}return null;}}

PictureResult.java

package com.taotao.result;
/*** 上传图片返回值* <p>Title: PictureResult</p>* <p>Description: </p>* <p>Company: www.itcast.com</p> * @author	入云龙* @date	2015年7月22日下午2:09:02* @version 1.0*/
public class PictureResult {/*** 上传图片返回值,成功:0	失败:1	*/private Integer error;/*** 回显图片使用的url*/private String url;/*** 错误时的错误消息*/private String message;public PictureResult(Integer state, String url) {this.url = url;this.error = state;}public PictureResult(Integer state, String url, String errorMessage) {this.url = url;this.error = state;this.message = errorMessage;}public Integer getError() {return error;}public void setError(Integer error) {this.error = error;}public String getUrl() {return url;}public void setUrl(String url) {this.url = url;}public String getMessage() {return message;}public void setMessage(String message) {this.message = message;}
}

TaotaoResult.java

package com.taotao.result;import java.util.List;import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;/*** 淘淘商城自定义响应结构*/
public class TaotaoResult implements Serializable{// 定义jackson对象private static final ObjectMapper MAPPER = new ObjectMapper();// 响应业务状态private Integer status;// 响应消息private String msg;// 响应中的数据private Object data;public static TaotaoResult build(Integer status, String msg, Object data) {return new TaotaoResult(status, msg, data);}public static TaotaoResult ok(Object data) {return new TaotaoResult(data);}public static TaotaoResult ok() {return new TaotaoResult(null);}public TaotaoResult() {}public static TaotaoResult build(Integer status, String msg) {return new TaotaoResult(status, msg, null);}public TaotaoResult(Integer status, String msg, Object data) {this.status = status;this.msg = msg;this.data = data;}public TaotaoResult(Object data) {this.status = 200;this.msg = "OK";this.data = data;}//    public Boolean isOK() {
//        return this.status == 200;
//    }public Integer getStatus() {return status;}public void setStatus(Integer status) {this.status = status;}public String getMsg() {return msg;}public void setMsg(String msg) {this.msg = msg;}public Object getData() {return data;}public void setData(Object data) {this.data = data;}/*** 将json结果集转化为TaotaoResult对象* * @param jsonData json数据* @param clazz TaotaoResult中的object类型* @return*/public static TaotaoResult formatToPojo(String jsonData, Class<?> clazz) {try {if (clazz == null) {return MAPPER.readValue(jsonData, TaotaoResult.class);}JsonNode jsonNode = MAPPER.readTree(jsonData);JsonNode data = jsonNode.get("data");Object obj = null;if (clazz != null) {if (data.isObject()) {obj = MAPPER.readValue(data.traverse(), clazz);} else if (data.isTextual()) {obj = MAPPER.readValue(data.asText(), clazz);}}return build(jsonNode.get("status").intValue(), jsonNode.get("msg").asText(), obj);} catch (Exception e) {return null;}}/*** 没有object对象的转化* * @param json* @return*/public static TaotaoResult format(String json) {try {return MAPPER.readValue(json, TaotaoResult.class);} catch (Exception e) {e.printStackTrace();}return null;}/*** Object是集合转化* * @param jsonData json数据* @param clazz 集合中的类型* @return*/public static TaotaoResult formatToList(String jsonData, Class<?> clazz) {try {JsonNode jsonNode = MAPPER.readTree(jsonData);JsonNode data = jsonNode.get("data");Object obj = null;if (data.isArray() && data.size() > 0) {obj = MAPPER.readValue(data.traverse(),MAPPER.getTypeFactory().constructCollectionType(List.class, clazz));}return build(jsonNode.get("status").intValue(), jsonNode.get("msg").asText(), obj);} catch (Exception e) {return null;}}}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/524388.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

要闻君说:印度公司要在京沪建立数据中心;超 10 万个 GitHub 仓库可泄漏 API 令牌及密钥...

关注并标星星CSDN云计算每周三次&#xff0c;打卡即read更快、更全了解泛云圈精彩newsgo go go 再次中国行&#xff0c;库克参观故宫&#xff08;图片来源网络&#xff09;【3月25日 星期一】云の声音未来5G对于庞大的IPv6业务&#xff0c;对于整个物联网、产业互联网可以提供更…

IOS OpenGL ES GPUImage 图像加深混合 GPUImageDarkenBlendFilter

目录 一.简介二.效果演示三.源码下载四.猜你喜欢 零基础 OpenGL (ES) 学习路线推荐 : OpenGL (ES) 学习目录 >> OpenGL ES 基础 零基础 OpenGL (ES) 学习路线推荐 : OpenGL (ES) 学习目录 >> OpenGL ES 转场 零基础 OpenGL (ES) 学习路线推荐 : OpenGL (ES) 学习目…

Redis 工具类_慕课版本

缓存RedisRedis 连接池RedisPoolUtil.javaRedis 集群 连接RedisShardedPoolUtil.java通用部分RedisPool.java通用部分RedisShardedPool.java通用部分RedissonManager.java 在这里插入代码片RedisPoolUtil.java package com.mmall.util;import com.mmall.common.RedisPool; imp…

云有约 | 在去O的道路上,AWS表示:经验可复制,惊喜并非只属于我们!

戳蓝字“CSDN云计算”关注我们哦&#xff01;作者&#xff1a;刘晶晶一直以来&#xff0c;在云计算领域&#xff0c;AWS虽然遥遥领先&#xff0c;但是后有追兵无数&#xff0c;前方却从未有人带带路&#xff0c;想要“偷懒”借鉴学习一下&#xff0c;绝对不能够。一直以来&…

IOS OpenGL ES GPUImage 图像减淡混合 GPUImageLightenBlendFilter

目录 一.简介二.效果演示三.源码下载四.猜你喜欢 零基础 OpenGL (ES) 学习路线推荐 : OpenGL (ES) 学习目录 >> OpenGL ES 基础 零基础 OpenGL (ES) 学习路线推荐 : OpenGL (ES) 学习目录 >> OpenGL ES 转场 零基础 OpenGL (ES) 学习路线推荐 : OpenGL (ES) 学习目…

IOS OpenGL ES GPUImage 图像源混合 GPUImageSourceOverBlendFilter

目录 一.简介二.效果演示三.源码下载四.猜你喜欢 零基础 OpenGL (ES) 学习路线推荐 : OpenGL (ES) 学习目录 >> OpenGL ES 基础 零基础 OpenGL (ES) 学习路线推荐 : OpenGL (ES) 学习目录 >> OpenGL ES 转场 零基础 OpenGL (ES) 学习路线推荐 : OpenGL (ES) 学习目…

微服务与单体架构:IT变革中企业及个体如何自处?

戳蓝字“CSDN云计算”关注我们哦&#xff01;作者&#xff1a;DAN KUSNETZKY转自&#xff1a;RancherLabs当下&#xff0c;企业越来越多地受到竞争对手和他们自己的客户的压力&#xff0c;既需要让应用程序更快地在线运行&#xff0c;同时又要最大限度地降低开发成本。这些不同…

玩转微服务日志框架Logback

一、Logback的配置形式2种&#xff1a; 方案一&#xff1a; application.yml 配置相对简单(需求简单可以使用) 1、可以配置控制台输出的日志格式 例如&#xff1a; 2、可以指定输出到某个路径下面&#xff0c;文件名默认是spring.log 3、如果想可以自定义log日志的文件名…

边缘计算精华问答 | 边缘计算有哪些应用场景?

物联网对物联网技术的快速发展和云服务的推动使得云计算模型已经不能很好的解决现在的问题&#xff0c;于是&#xff0c;这里给出一种新型的计算模型&#xff0c;边缘计算。1Q&#xff1a;什么是边缘计算&#xff1f;A&#xff1a;一般来讲&#xff0c;边缘计算侧重在更为靠近用…

IOS OpenGL ES GPUImage 图像平移 GPUImageTransformFilter

目录 一.简介二.效果演示三.源码下载四.猜你喜欢 零基础 OpenGL (ES) 学习路线推荐 : OpenGL (ES) 学习目录 >> OpenGL ES 基础 零基础 OpenGL (ES) 学习路线推荐 : OpenGL (ES) 学习目录 >> OpenGL ES 转场 零基础 OpenGL (ES) 学习路线推荐 : OpenGL (ES) 学习目…

Windows搭建SonarQube_Mysql

一、环境参数&#xff1a; softwareversionJDKjdk-8u144-windows-x64.tarSonarQubesonarqube-7.6sonar-runnersonar-runner-dist-2.4汉化插件sonar-l10n-zh-plugin-1.26.jarmysqlmysql-5.7.26-winx64sonar有三部分组成&#xff1a; 1、服务端&#xff1a;显示分析结果和sonar相…

IOS OpenGL ES GPUImage 图像缩放 GPUImageTransformFilter

目录 一.简介二.效果演示三.源码下载四.猜你喜欢 零基础 OpenGL (ES) 学习路线推荐 : OpenGL (ES) 学习目录 >> OpenGL ES 基础 零基础 OpenGL (ES) 学习路线推荐 : OpenGL (ES) 学习目录 >> OpenGL ES 转场 零基础 OpenGL (ES) 学习路线推荐 : OpenGL (ES) 学习目…

window下远程监控linux下tomcat的jvm

简要介绍&#xff1a; 理论上来讲,任何一个运行的java程序都可以监控当前正在运行的java虚拟机的内存,堆空间,栈空间等信息.tomcat本质也是运行在linux上的java程序,通过一定的配置也可以实现监控tomcat对应程序的jvm的空间。 配置方法: 1.停止linux上的tomcat2.编辑bin路径下…

云有约 | 精华汇总

出品 | CSDN云计算 云有约&#xff0c;面对面采访&#xff0c;用最细腻的方式&#xff0c;撰写出最专业的深度文章。 云有约 | 在去O的道路上&#xff0c;AWS表示&#xff1a;经验可复制&#xff0c;惊喜并非只属于我们&#xff01; 一直以来&#xff0c;挑战数据库霸主Oracl…

Tomcat闪退的解决办法

第一步&#xff1a;在startup.bat文件最后添加pause&#xff0c;启动查看问题原因&#xff1a; 第二步&#xff1a;在startup.bat文件开头添加&#xff0c;如图所示&#xff1a; set TITLE"tomcat-8091" set CATALINA_BASE"F:\NOT MODIFIED\tomcat-8091"…

IOS OpenGL ES GPUImage 图像镜像 GPUImageTransformFilter

目录 一.简介二.效果演示三.源码下载四.猜你喜欢 零基础 OpenGL (ES) 学习路线推荐 : OpenGL (ES) 学习目录 >> OpenGL ES 基础 零基础 OpenGL (ES) 学习路线推荐 : OpenGL (ES) 学习目录 >> OpenGL ES 转场 零基础 OpenGL (ES) 学习路线推荐 : OpenGL (ES) 学习目…

云重磅 | 没有硬件,苹果发布多款“云服务”;阿里云发布基于公共云的虚拟GPU服务;中国移动首发5G套餐...

戳蓝字“CSDN云计算”关注我们哦&#xff01;嗨&#xff0c;大家好&#xff0c;重磅君带来的【云重磅】特别栏目&#xff0c;如期而至&#xff0c;每周二第一时间为大家带来重磅新闻。把握技术风向标&#xff0c;了解行业应用与实践&#xff0c;就交给我重磅君吧&#xff01;重…

Errors while executing git --version. exitCode=128 errors: fatal: open /dev/null or dup failed: No s

Errors while executing git --version. exitCode128 errors: fatal: open /dev/null or dup failed: No such file or directory 1、找到开发文档null.sys文件&#xff0c;复制到下面路径&#xff0c;覆盖此文件即可&#xff0c;解决 链接&#xff1a;https://pan.baidu.com…

IOS OpenGL ES GPUImage 图像旋转 GPUImageTransformFilter

目录 一.简介二.效果演示三.源码下载四.猜你喜欢 零基础 OpenGL (ES) 学习路线推荐 : OpenGL (ES) 学习目录 >> OpenGL ES 基础 零基础 OpenGL (ES) 学习路线推荐 : OpenGL (ES) 学习目录 >> OpenGL ES 转场 零基础 OpenGL (ES) 学习路线推荐 : OpenGL (ES) 学习目…

深挖Kubernetes存储为何如此难及其解决方案

戳蓝字“CSDN云计算”关注我们哦&#xff01;译者&#xff1a;韦峻峰转自&#xff1a;RancherLabs以Kubernetes为代表的容器编排工具在应用开发部署领域起正发挥着颠覆性的变革作用。随着微服务架构的发展&#xff0c;从开发人员的角度来看&#xff0c;应用逻辑架构与基础设施架…