随笔分类 -  java

摘要:一般时由于项目所需要的jdk版本和使用的jdk版本不一致的问题 设置项目jdk版本即可 或者在pom.xml中配置jdk版本 阅读全文
posted @ 2022-08-09 14:30 荣超 阅读(19) 评论(0) 推荐(0) 编辑
摘要:项目启动时报错 Error running 'UserServiceApplication': Command line is too long. Shorten command line for UserServiceApplication or also for Spring Boot defa 阅读全文
posted @ 2022-08-09 14:25 荣超 阅读(343) 评论(0) 推荐(0) 编辑
摘要:正则表达式匹配 给你一个字符串 s 和一个字符规律 p,请你来实现一个支持 '.' 和 '*' 的正则表达式匹配。 '.' 匹配任意单个字符'*' 匹配零个或多个前面的那一个元素所谓匹配,是要涵盖 整个 字符串 s的,而不是部分字符串。 示例 1:输入:s = "aa", p = "a"输出:fal 阅读全文
posted @ 2022-06-21 14:31 荣超 阅读(34) 评论(0) 推荐(0) 编辑
摘要:生成公钥和私钥 KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA"); generator.initialize(1024); KeyPair keyPair = generator.generateKeyPair(); R 阅读全文
posted @ 2022-05-23 14:10 荣超 阅读(160) 评论(0) 推荐(0) 编辑
摘要:idea 我这里虽然电脑上安装的是jdk1.8,但是idea默认使用了jdk 11 方式1:降低jdk版本为1.8 (我这里使用了第一种方法) 方式2:手动引入相关jar包 <dependency> <groupId>javax.xml.bind</groupId> <artifactId>jaxb 阅读全文
posted @ 2021-11-12 09:41 荣超 阅读(1198) 评论(0) 推荐(0) 编辑
摘要:[\s\S]*是完全通配的意思; “[ ]”是范围描述符。 \s是指空白,包括空格、换行、tab缩进等所有的空白,而\S刚好相反,这样一正一反下来,就表示所有的字符,完全的,一字不漏的。 另外,[]这个符号,表示在它里面包含的单个字符不限顺序的出现,比如:[ace]* 这表示,只要出现a/c/e这三 阅读全文
posted @ 2021-06-30 11:09 荣超 阅读(326) 评论(0) 推荐(0) 编辑
摘要:@ApiOperation(value = "xxx功能", httpMethod = "GET") httpMethod 的值需要纯大写就可以了我这里有一个写成了get小写形式就报错了httpMethod可用的值 "POST","GET","PUT","PATCH","DELETE","HEAD" 阅读全文
posted @ 2021-05-29 09:44 荣超 阅读(687) 评论(0) 推荐(0) 编辑
摘要:添加依赖 <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>5.3.5</version> </dependency> <dependency> <g 阅读全文
posted @ 2021-04-05 23:05 荣超 阅读(199) 评论(0) 推荐(0) 编辑
摘要:@ControllerAdvice @RestControllerAdvice //纯接口系统可以使用我的系统只有api接口 使用了RestControllerAdvice @RestControllerAdvice public class BaseExceptionHandler { priva 阅读全文
posted @ 2020-10-21 17:03 荣超 阅读(481) 评论(0) 推荐(0) 编辑
摘要:需要引入AXMLPrinter <dependency> <groupId>com.android</groupId> <artifactId>AXMLPrinter</artifactId> <version>1.0.0</version> </dependency> 但是一直爆红下载不下来,需要 阅读全文
posted @ 2020-07-18 16:13 荣超 阅读(1047) 评论(0) 推荐(0) 编辑
摘要:@EnableCaching //启动spring缓存注解 @Configuration public class RedisConfig { @Bean public RedisTemplate<String,Object> redisTemplate(RedisConnectionFactory 阅读全文
posted @ 2020-04-28 16:09 荣超 阅读(684) 评论(0) 推荐(0) 编辑
摘要:引入jwt包 <dependency> <groupId>io.jsonwebtoken</groupId> <artifactId>jjwt</artifactId> <version>0.9.1</version> </dependency> 签名和解析 String token = Jwts. 阅读全文
posted @ 2020-04-28 15:51 荣超 阅读(210) 评论(0) 推荐(0) 编辑
摘要:List<String> list = new ArrayList<>(); Set<String> set = new HashSet<>(); Map<String,String> map = new HashMap<>(); 1. 使用 线程安全的 Vector List<String> li 阅读全文
posted @ 2020-04-01 15:56 荣超 阅读(376) 评论(0) 推荐(0) 编辑
摘要:aop 底层采用代理机制实现 接口 + 实现类 :spring 采用 jdk 的 动态代理 只有实现类:spring 采用 cglib 字节码增强 aop专业术语 1.target(目标) 需要被代理的类 2.Joinpoint(连接点) 所谓连接点是指那些可能被拦截到的点(方法) 3.PointC 阅读全文
posted @ 2020-01-09 16:20 荣超 阅读(166) 评论(0) 推荐(0) 编辑
摘要:springboot 是一样的 我这里就是从springboot哪里拿过来的 (nutzboot2.x已测试可以使用) 排除指定文件 在pom 文件 build 标签内添加 resources <build> <resources> <resource> <filtering>false</filt 阅读全文
posted @ 2019-07-04 16:11 荣超 阅读(482) 评论(0) 推荐(0) 编辑
摘要:禁用nacos的日志即可解决 idea当中 添加vm options参数即可 -Dnacos.logging.default.config.enabled=false 打包后的启动命令 java -Dnacos.logging.default.config.enabled=false -jar xx 阅读全文
posted @ 2019-07-04 11:35 荣超 阅读(1774) 评论(0) 推荐(0) 编辑
摘要:查找是否包含字串 查询是否包含 #{name} 片段 这里有包含所以返回true String context = "select * from t_user where (name = #{name} or username = #{name}) and age > #{age}"; String 阅读全文
posted @ 2019-06-12 18:48 荣超 阅读(299) 评论(0) 推荐(0) 编辑
摘要:先放一段从网上拷贝一段分布式CAP理论的概念 分布式领域中存在CAP理论,且该理论已被证明:任何分布式系统只可同时满足两点,无法三者兼顾。 ①C:Consistency,一致性,数据一致更新,所有数据变动都是同步的。 ②A:Availability,可用性,系统具有好的响应性能。 ③P:Partit 阅读全文
posted @ 2019-03-12 11:32 荣超 阅读(680) 评论(0) 推荐(0) 编辑
摘要:引入文件( jave-native-win64 windows 64位系统jave-native-linux64 linux 64位系统按自己服务器系统来替换 ) <dependency> <groupId>ws.schild</groupId> <artifactId>jave-core</art 阅读全文
posted @ 2019-01-17 14:42 荣超 阅读(9526) 评论(3) 推荐(0) 编辑
摘要:提供方和消费方properties 配置基本差不多 nutz.application.name这个值不一样 提供方配置自动端口就行server.port=0 消费方一般需要对外提供web服务配置ip和端口server.port=8088 server.host=0.0.0.0 服务提供方 appli 阅读全文
posted @ 2018-10-24 17:44 荣超 阅读(819) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示