随笔分类 - java
java
摘要:// countdownlatch 模拟高并发 public static void main(String[] args) throws InterruptedException { CountDownLatch cdl = new CountDownLatch(10); for (int i =
阅读全文
摘要:JDK版本:8 JVM常用参数 -Xms 初始堆内存大小(包括年轻代和年老代) -Xmx 最大堆内存大小(包括年轻代和年老代,建议和-Xms配置成一样) -Xmn 年轻代堆内存大小 -XX:MetaspaceSize 初始元空间内存大小(个人认为不需要配置,因为用不了这么多) -XX:MaxMeta
阅读全文
摘要:1.pom依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>
阅读全文
摘要:1.引用pom依赖 <dependency> <groupId>org.apache.shardingsphere</groupId> <artifactId>sharding-jdbc-spring-boot-starter</artifactId> <version>4.0.1</version
阅读全文
摘要:读取文件转为字符串: //输入文件File类型,输出字符串 public static String fileToString(File file) { InputStream is = null; ByteArrayOutputStream bos = new ByteArrayOutputStr
阅读全文
摘要:springboot项目打包后,由于jar内部的路径结构的影响,会导致有些方式读取资源文件夹下的文件不可用,现分享两中好用的读取方式 我采用的springboot打包插件为: <build> <pluginManagement> <plugins> <plugin> <groupId>org.spr
阅读全文

浙公网安备 33010602011771号