java vue 上传文件 下载文件 上传文件代码vue代码() <el-upload class="upload-demo" action='/rest/admin/uploading' :headers="header" :on-preview="handlePreview" :on-remove="handleRemove" :before-remove="beforeRemove" multiple :on-exceed="handleExceed" :file-list
Spring Boot整合MyBatis连接数据库 1.引入依赖(一个是mybatis的依赖用来操作数据库,另一个是postgresql如果需要mysql引入mysql的) <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> <scope>compile</scope> </dependen
springboot + vue 后台token生成 拦截器 redis实现 前台封装axios xueX 接口实现 后台后台程序图片新建token的基础类public class Constants { public final static String TOKEN = "token";}配置redispom.xml中添加依赖<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis&
java controller 返回页面的公共方法 controller例子 /** * 根据id查询 * * @param id * @return 当前设备id的所有信息 */ @ResponseBody @RequestMapping(value = "/getDeviceById", method = RequestMethod.GET) public ReturnDto getDeviceById(@RequestParam("id") Integer id) { // CommonUtils.returnDto这个
java中使用redis @Componentpublic class RsUtil { @Resource public RedisTemplate<String, String> redisTemplate; @Autowired public PropertiesConfig properties; /** * 将数据插入redis * * @param key 索引 * @param value 值 */ public void set(Strin
java文件上传 /** * 文件上传 * * @param request 文件上传请求 * @return 返回值 */ @ApiOperation("文件上传") @ApiImplicitParams({}) @PostMapping(value = "/uploading") @ResponseBody public String uploadFile(HttpServletRequest request) { MultipartHttpServletRe..
Vue过滤器 拼接使用 /*** 根据每条信息的status判断将哪一类型的信息存放到过渡用数组* 再次点击时从过渡数组中取出相应类型信息赋值到当前实际显示的表格数组中* @param value1 @param value2 @param status*/xxx(value1, value2, status) {value1.push.apply(value1,value2.filter(value => value.xxx === status))return value2.filter(value
border 三角形 .triangle-left{ display: inline-block; width: 0px; height:0px; border-style: solid; border-top: 5px solid transparent; border-right: 11px solid #4688C4; border-bottom: 6px solid transparent; ...
jdk8 stream用法 循环迭代(代替for循环) 参考https://blog.csdn.net/mu_wind/article/details/109516995map 映射 filter 筛选String类型有一个方法:contains(),该方法是判断字符串中是否有子字符串。如果有则返回true,如果没有则返回false。.collect(Collectors.toList()) 收集 归集List<xxxVO> xxx = xxx;List<String> ids = xxx .stream().map(xxxV
sql 语句 varchar类型转成小数点进行计算 ROUND函数取几位小数ROUND(xxx::DECIMAL /xxx2::DECIMAL,9)小数点后为0进行切割替换substr( xxx, "length" ( xxx), "length" ( xxx)) = '0'
java 动态导出word 1.zip压缩文件2.xml文件,需要替换的用特定的字符替换。package com.bootdo.common.utils;import freemarker.template.Configuration;import freemarker.template.Template;import org.springframework.boot.system.ApplicationHome;import org.springframework.util.ResourceUtils;import
js 正则校验 onkeyup="this.value= this.value.match(/\d+(\.\d{0,2})?/) ? this.value.match(/\d+(\.\d{0,2})?/)[0] : ''"
java 字符串表达式计算值 //解析表达式 public static String getResult(String expr) throws Exception { try { System.out.println("计算"+expr); /*数字栈*/ Stack<BigDecimal> number = new Stack<BigDecimal>(); /*符号栈*/ Stack<String> operator = new