xnio坑
发表于|更新于
|浏览量:
恶名不治,恶伤可治——佚名
今天拉取StreamPark发现其引用了xnio
并且项目运行时抛出了nvalid file path的异常提示
发现源码部分:

其去寻找了NUL:这个路径
1 | new FileOutputStream("NUL:") |
解决方式:
启动参数带上-Djdk.io.File.enableADS=true:
1 | -Djdk.io.File.enableADS=true -Dapp.home=streamx-console/streamx-console-service/target/streamx-console-service-1.2.4 |

如果没有这一栏,可以在右侧蓝字Modify options开启

相关推荐
2024-05-03
spring提供的SQL工具类执行SQL脚本
方向是比速度更重要的追求。——白岩松 这里主要是用到了org.springframework.jdbc.datasource.init.ScriptUtils#executeSqlScript(java.sql.Connection, org.springframework.core.io.Resource)方法 例如 123456 @BeforeAllstatic void setup(@Autowired DataSource dataSource) throws Exception { JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource); assertNotNull(jdbcTemplate.getDataSource()); ScriptUtils.executeSqlScript(jdbcTemplate.getDataSource().getConnection(), new ClassPathResource("init.sql"));}...
2020-09-16
alibabaFastJson之json转指定List
有一种健忘是高贵的,就是不记旧恶。——赛蒙兹 之前写了篇fastjson基本使用,这两天遇到一个意料之外的 需要把一个json的数组对象,转换成指定的List<User> 转换方式很简单 {“code”:200,”userList”:[{“password”:”achao”,”username”:”ruben”}],”data”:”操作成功!”,”list”:[“你好”,”加油”],”success”:true} 1234JSONObject jsonObject = JSON.parseObject(jsonString);String userListString = jsonObject.getString("userList");List<User> userList = JSON.parseArray(userListString, User.class);userList.forEach(System.out::println); 打印结果
2022-07-06
eclipse-collections
志向和热爱是伟大行为的双翼。——歌德 之前分享了vavr,今天在分享一个同类框架eclipse-collections 官方文档:http://www.eclipse.org/collections/ 1234567891011<dependency> <groupId>org.eclipse.collections</groupId> <artifactId>eclipse-collections-api</artifactId> <version>11.0.0</version></dependency><dependency> <groupId>org.eclipse.collections</groupId> <artifactId>eclipse-collections</artifactId> <version>11.0.0</version></dependency&...
2024-07-10
Mybatis在Mapper上加注解关闭二级缓存
久视伤血,久卧伤气,久坐伤肉,久立伤骨,久行伤筋。——曹廷栋 代码如下 12345678910111213import org.apache.ibatis.annotations.CacheNamespace;import org.apache.ibatis.annotations.Select;import org.apache.ibatis.annotations.Mapper;import org.apache.ibatis.cache.impl.PerpetualCache;@Mapper@CacheNamespace(implementation = PerpetualCache.class, blocking = false)public interface MyMapper { @Select("SELECT * FROM my_table WHERE id = #{id}") MyEntity selectById(int id);} 上使用@CacheNamespace注解,并将imp...
2022-02-14
hutool中@Alias
何必向不值得的人证明什么,生活得更好,乃是为你自己——忽而今夏 我们可以使用hutool中的@Alias注解去给bean取别名,例如: 1234567@Datapublic static class BeanWithAlias { @Alias("name") private String value1; @Alias("age") private Integer value2;} 然后别名不仅能在BeanUtil.copyProperties中使用,还可以在JSONUtil中使用: 123456789101112131415final BeanWithAlias beanWithAlias = new BeanWithAlias();beanWithAlias.setValue1("张三");beanWithAlias.setValue2(35);final JSONObject jsonObject = JSONUtil.parseObj(beanWithAlias);Assert.asse...
2021-03-18
CompletableFuture
一个能思想的人,才真是一个力量无边的人。——巴尔扎克 我们之前使用异步 123456789101112131415public static ExecutorService executor = Executors.newFixedThreadPool(10); final Future<Integer> submit = executor.submit(new Callable<Integer>() { @Override public Integer call() throws Exception { print("原始异步Callable"); return 1; } }); executor.execute(new Runnable() { @Override public void run() { LineUti...

阿超
我的名字叫阿超 年龄25岁 家在北京市 职业是软件开发 每天最晚也会在八点前回家 不抽烟 酒浅尝辄止 晚上十二点上床 保证睡足八个小时 睡前写一篇博客 再做二十分钟俯卧撑暖身 然后再睡觉 基本能熟睡到天亮 像婴儿一样不留下任何疲劳和压力 就这样迎来第二天的早晨 健康检查结果也显示我很正常 我想说明我是一个不论何时都追求内心平稳的人 不拘泥于胜负 不纠结于烦恼 不树立使我夜不能寐的敌人 这就是我在这社会的生活态度
Follow Me公告
This is my Blog