摘要: MySql中左连接查询突然变得很慢 表结构: A表 userId,name B表 wId,userId,address A表左连接B表查询时,平时查询都非常的块,这几天突然变得很慢。 一个查询花了0.888S。 使用explain表达式查询,发现了问题。 提示: Using where; Using 阅读全文
posted @ 2018-09-06 15:57 Se7end 阅读(759) 评论(0) 推荐(0)
摘要: Linux中Nginx常用命令 1.启动 /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf -c后带conf配置文件 中间都要有空格。 2.配置文件夹验证,重新加载 验证: /usr/local/nginx/sbin/ng 阅读全文
posted @ 2018-09-06 15:47 Se7end 阅读(5385) 评论(0) 推荐(0)
摘要: Java将图片转换成Base64字符串 将Base64字符串转换成二维码。 public class ImageUtil { /** * 本地图片转换成base64字符串 * @param imgFile * 图片本地路径 * @return */ public static String Imag 阅读全文
posted @ 2018-09-06 15:40 Se7end 阅读(954) 评论(0) 推荐(0)
摘要: Java获取Request中的IP地址 /** * ip工具类 * @author My */ public class IpUtil { public static String getIpAddr(HttpServletRequest request) { String ipAddress = 阅读全文
posted @ 2018-09-06 15:38 Se7end 阅读(538) 评论(0) 推荐(0)
摘要: Java生成二维码和解析二维码。 public class QrcodeUtil { private static Logger logger = LogManager.getLogger(); public static String createQrcode(String dir, String 阅读全文
posted @ 2018-09-06 15:36 Se7end 阅读(131) 评论(0) 推荐(0)
摘要: SpringBoot集成pagehelper分页 1.添加pagehelper包: <!--pagehelper --> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot- 阅读全文
posted @ 2018-09-06 15:34 Se7end 阅读(202) 评论(0) 推荐(0)
摘要: SpringBoot中获取spring.profiles.active @Configuration public class ApplicationContextUtils implements ApplicationContextAware { private static Logger log 阅读全文
posted @ 2018-09-06 15:25 Se7end 阅读(2100) 评论(0) 推荐(0)
摘要: SpringBoot中添加拦截器。 1.继承HandlerInterceptor接口: public interface HandlerInterceptor { default boolean preHandle(HttpServletRequest request, HttpServletRes 阅读全文
posted @ 2018-09-06 15:21 Se7end 阅读(289) 评论(0) 推荐(0)