![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
后端
isMissU
正因为当初对未来做了太多的憧憬,所以对现在的自己尤其失望;
生命中曾经有过的所有灿烂,终究都需要用寂寞来偿还。
展开
-
数据库贯通授权
数据库贯通授权场景:1. 访问(或操作)数据库账号为name1;2. 要求:name1用户可以操作(增、删、修、查权限等)数据库名name2;操作步骤:1. 使用root登录MySQL数据库(Navicat客户端就可以);2. 给name1用户分配权限并刷新:grant all privileges on name2. to ‘name1’@’%’;flush privileges*;3.验证-使用name1,可以对数据库名name2下的表进行修改等操作(表示成功);...原创 2021-05-31 15:22:26 · 95 阅读 · 0 评论 -
not in 使用左外连接处理
not in 与 left out joinselect A.mobile from A left outer join B on (A.mobile=B.mobile) where B.mobile is null等价于select A.mobile from A where A.mobile not in (select B.mobile from B)原创 2021-04-29 17:30:07 · 236 阅读 · 0 评论 -
基于字节流方式的Excel文件导出
public ResponseEntity<byte[]> exportExcel(HttpServletResponse response) throws Exception { // 此处选用List<Map>格式的数据 List<Map> objects = new ArrayList<>(); for (int i = 0; i < objects.size(); i++) {原创 2021-03-29 17:44:27 · 702 阅读 · 0 评论 -
Java读取resources目录下配置文件
在服务器环境(Linux)下读取配置文件写法public class ReadJSONUtils { public String throws Exception { // 获取/resources/templates目录下的json配置文件 String readString=IOUtils.toString(ReadJSONUtils.class.getResourceAsStream("/templates/db.json"), "utf-8"); return readStri原创 2020-11-27 09:05:56 · 627 阅读 · 0 评论 -
Java文件/图片上传
文件/图片上传// 定义文件上传路径 @Value("${upload-pic-path}") private String picPath; /** * @Description: 上传文件 * @param: [file] */public ResuteDto fileUpload(MultipartFile file) { if (file.isEmpty()) { return ResuteDto.errorPage("文件为空,请添原创 2020-11-03 16:09:56 · 135 阅读 · 1 评论