随笔分类 -  JAVA

上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 19 下一页
JAVA一些常用的方法
摘要:另一种方式(推荐):https://www.cnblogs.com/pxblog/p/17058417.html 依赖 <dependency> <groupId>org.eclipse.paho</groupId> <artifactId>org.eclipse.paho.client.mqttv 阅读全文
posted @ 2021-10-25 14:45 yvioo 阅读(7098) 评论(2) 推荐(1) 编辑
摘要:java -Dxxx=test -jar xxx.jar (放在-jar之前) 属性名不区分大小写 取值:System.getProperty("xxx") spring的@value("${xxx}") java -jar xxx.jar value1=1 value2=2 (放在启动jar包之后 阅读全文
posted @ 2021-10-20 10:54 yvioo 阅读(4296) 评论(0) 推荐(0) 编辑
摘要:依赖(用来复制文件,可以根据自己的来) <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>2.8.0</version> </dependency> ImageScaleUt 阅读全文
posted @ 2021-10-11 14:43 yvioo 阅读(759) 评论(0) 推荐(0) 编辑
摘要:/** * 获得websocket请求路径前缀(线程安全 速度相对慢) * @param request * @return */ public static String getWebsocketUrl(HttpServletRequest request) { StringBuffer buff 阅读全文
posted @ 2021-10-08 17:13 yvioo 阅读(634) 评论(0) 推荐(0) 编辑
摘要:官方出了文档:http://doc.ruoyi.vip/ruoyi/document/cjjc.html#%E9%9B%86%E6%88%90mybatis-plus%E5%AE%9E%E7%8E%B0mybatis%E5%A2%9E%E5%BC%BA RuoYi框架默认使用的是Mybatis框架 阅读全文
posted @ 2021-10-05 12:36 yvioo 阅读(3897) 评论(0) 推荐(0) 编辑
摘要:聚合函数查询 Mysql可以使用以下方法 QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.select(" IFNULL( max(percent),0) as maxPercent"); Map<String, Inte 阅读全文
posted @ 2021-10-04 20:41 yvioo 阅读(22075) 评论(0) 推荐(2) 编辑
摘要:把$velocityCount替换成$foreach.count 例如 #if($foreach.count != $columns.size()),#end 阅读全文
posted @ 2021-10-03 15:44 yvioo 阅读(636) 评论(0) 推荐(0) 编辑
摘要:或者 pom增加插件 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.5</version> <configuration> 阅读全文
posted @ 2021-09-29 11:01 yvioo 阅读(291) 评论(0) 推荐(0) 编辑
摘要:pom依赖 <dependency> <groupId>org.java-websocket</groupId> <artifactId>Java-WebSocket</artifactId> <version>1.3.8</version> </dependency> <dependency> < 阅读全文
posted @ 2021-09-27 14:19 yvioo 阅读(9337) 评论(1) 推荐(0) 编辑
摘要:pom依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> 配置文件yml management. 阅读全文
posted @ 2021-09-26 14:06 yvioo 阅读(928) 评论(0) 推荐(0) 编辑
摘要:判断字符串为空和判断集合是否为空用到依赖,也可以改成自己的方式 <!-- Spring Web --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>5 阅读全文
posted @ 2021-09-24 15:46 yvioo 阅读(2432) 评论(0) 推荐(0) 编辑
摘要:引入依赖 <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-gateway</artifactId> </dependency> 我和nacos整合了 引入了下面的依赖 阅读全文
posted @ 2021-09-22 14:41 yvioo 阅读(5472) 评论(0) 推荐(0) 编辑
摘要:上面这个调试端口并不是服务的启动端口,这个调试端口随便给一个,可以直接IDEA默认,只要不是远程服务启动端口就行 然后将上面的执行参数复制下来 -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8086 放到服务器上 在执行j 阅读全文
posted @ 2021-09-13 13:35 yvioo 阅读(1277) 评论(0) 推荐(0) 编辑
摘要:for (Map.Entry<String, String> entry : map.entrySet()) { System.out.println("key= " + entry.getKey() + " and value= " + entry.getValue()); } for (Stri 阅读全文
posted @ 2021-09-03 08:58 yvioo 阅读(36) 评论(0) 推荐(0) 编辑
摘要:public static void main(String[] args) throws InterruptedException { CountDownLatch latch =new CountDownLatch(10); for (int i = 0; i < 900; i++) { new 阅读全文
posted @ 2021-09-02 10:17 yvioo 阅读(62) 评论(0) 推荐(0) 编辑
摘要:User[] users= restTemplate.getForObject(url, User[].class); 使用数组接收 阅读全文
posted @ 2021-08-20 15:06 yvioo 阅读(951) 评论(0) 推荐(0) 编辑
摘要:import java.io.IOException; import java.lang.reflect.Field; import java.util.HashMap; import java.util.Map; /*** * 通过java Class 生成查询语句 */ public class 阅读全文
posted @ 2021-08-12 16:08 yvioo 阅读(658) 评论(0) 推荐(0) 编辑

上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 19 下一页
点击右上角即可分享
微信分享提示