随笔分类 - JAVA
JAVA一些常用的方法
    
摘要:引入依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-aop</artifactId> </dependency> 也用到了fastjson打印参数 , 如果引了就不
        阅读全文
                
摘要:(error) MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are 
        阅读全文
                
摘要:import com.alibaba.fastjson.JSON; import lombok.extern.slf4j.Slf4j; import org.springframework.boot.CommandLineRunner; import org.springframework.ster
        阅读全文
                
摘要:date转corn 定时任务获取corn /*** * 日期转corn表达式 * @param date 日期 * @return */ public static String getCron(Date date){ String dateFormat="ss mm HH dd MM ? yyyy
        阅读全文
                
摘要:org.quartz.SchedulerException: Based on configured schedule, the given trigger 'DEFAULT.cron_b1a91e1b-3285-430e-86c9-72e11d19e14f' will never fire. 这个
        阅读全文
                
摘要:/** * 文件下载 */ @GetMapping(value = "/download") public void download(HttpServletResponse response) { //文件路径 try { //文件字节流 JAVA将文件转换成byte数组(byte[]) 参考:h
        阅读全文
                
摘要:< < <= <= > > >= >= & & ' ' " " <> <>
        阅读全文
                
摘要:MultipartFile转化为byte数组 byte[] bytes= file.getBytes(); byte数组转化为MultipartFile <dependency> <groupId>org.springframework</groupId> <artifactId>spring-te
        阅读全文
                
摘要:修改设置
        阅读全文
                
摘要:引入maven <dependency> <groupId>com.google.protobuf</groupId> <artifactId>protobuf-java</artifactId> <version>3.13.0</version> </dependency> 将protoc文件生成
        阅读全文
                
摘要:引入依赖 <dependency> <groupId>com.google.protobuf</groupId> <artifactId>protobuf-java</artifactId> <version>3.5.1</version> </dependency> 如果引入了还是报错,那就是因为
        阅读全文
                
摘要:下载protoc.exe 地址:https://yvioo.lanzoui.com/i12opqs7q9g 下载好之后 ,把protoc文件和exe放在一个文件夹内 用记事本打开protoc,删掉包路径(我习惯删掉,不然生成的会带有包路径,也可以不删 后面自己修改) option java_pack
        阅读全文
                
摘要:官方教程:https://nacos.io/zh-cn/docs/quick-start-spring-boot.html Linux使用docker部署nacos: https://www.cnblogs.com/pxblog/p/15218599.html 默认账号密码都是:nacos naco
        阅读全文
                
摘要:报错信息 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nacosConfigurationPropertiesBinder': Bean instantiation v
        阅读全文
                
摘要:maven的setting.xml文件配置 (注意:这种方法默认读取是maven的setting.xml文件 ) 在servers标签里配置 <server> <id>privete_maven</id> <!--账号密码需要与私服登录账号密码一致--> <username>admin</usern
        阅读全文
                
摘要:引入依赖 <dependency> <groupId>io.minio</groupId> <artifactId>minio</artifactId> <version>7.1.0</version> </dependency> 也用到了这个 如果已经引入就不需要 <dependency> <gr
        阅读全文
                
摘要:/** * 比较版本号的大小 (两个版本号格式应尽量相同) 两个参数不能为空,请先自行校验 * * @param v1 版本号1 * @param v2 版本号2 * @return 正数:v1大 负数:v2大 0:相等 */ public static int checkVersion(Strin
        阅读全文
                
摘要:/** * 将Byte数组转换成文件 * @param bytes byte数组 * @param filePath 文件路径 如 D://test/ 最后“/”结尾 * @param fileName 文件名 */ public static void fileToBytes(byte[] byt
        阅读全文
                
摘要:/** * 将Object对象转byte数组 * @param obj byte数组的object对象 * @return */ public static byte[] toByteArray(Object obj) { byte[] bytes = null; ByteArrayOutputSt
        阅读全文
                
摘要:/** * 将byte数组按照指定大小分割成多个数组 * @param bytes 要分割的byte数组 * @param subSize 分割的块大小 单位:字节 * @return 指定大小的byte数组 */ public static Object[] splitByteArr(byte[]
        阅读全文
                
 
                    
                     
                    
                 
                    
                
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号