09 2018 档案
摘要:项目是SpringBoot + Freemarker的。 所有的页面都是Freemarker文件写的,有些页面数据比较多,打开比较慢,所以做了一个静态页面。 因为本身所有的页面都是FTL文件,所以模板就地取材,不用自己另外去写。 核心处理spring.ftl文件中的内容就可以了。 spring.ft
阅读全文
摘要:前段时间使用热加载,感觉很新鲜。 开发阶段确实比较好用。 所以来分享一个关闭热加载的方法。 开启热加载: 1.pom.xml中添加 <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-p
阅读全文
摘要:MySql中左连接查询突然变得很慢 表结构: A表 userId,name B表 wId,userId,address A表左连接B表查询时,平时查询都非常的块,这几天突然变得很慢。 一个查询花了0.888S。 使用explain表达式查询,发现了问题。 提示: Using where; Using
阅读全文
摘要:Linux中Nginx常用命令 1.启动 /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf -c后带conf配置文件 中间都要有空格。 2.配置文件夹验证,重新加载 验证: /usr/local/nginx/sbin/ng
阅读全文
摘要:Java将图片转换成Base64字符串 将Base64字符串转换成二维码。 public class ImageUtil { /** * 本地图片转换成base64字符串 * @param imgFile * 图片本地路径 * @return */ public static String Imag
阅读全文
摘要:Java获取Request中的IP地址 /** * ip工具类 * @author My */ public class IpUtil { public static String getIpAddr(HttpServletRequest request) { String ipAddress =
阅读全文
摘要:Java生成二维码和解析二维码。 public class QrcodeUtil { private static Logger logger = LogManager.getLogger(); public static String createQrcode(String dir, String
阅读全文
摘要:SpringBoot集成pagehelper分页 1.添加pagehelper包: <!--pagehelper --> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-
阅读全文
摘要:SpringBoot中获取spring.profiles.active @Configuration public class ApplicationContextUtils implements ApplicationContextAware { private static Logger log
阅读全文
摘要:SpringBoot中添加拦截器。 1.继承HandlerInterceptor接口: public interface HandlerInterceptor { default boolean preHandle(HttpServletRequest request, HttpServletRes
阅读全文

浙公网安备 33010602011771号