mvn一键换版本
发表于|更新于
|浏览量:
一条路并不因为它路边长满荆棘而丧失其美丽,旅行者照旧向前进。——罗曼·罗兰
命令:
1 | mvn versions:set -DnewVersion=[版本号] |
例如
1 | mvn versions:set -DnewVersion=0.0.1 |
即可
相关推荐
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-11-06
stream流分组
前两天补充了博客中写的java8的stream的用法 今天再写个分组的 例如我们下面需要根据奇数偶数分组 可以先新建一个list 1List<Integer> integerList = new ArrayList<>(Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 0)); 然后进行分组 1234567Map<Boolean, List<Integer>> collect = integerList.stream().collect(Collectors.groupingBy(data -> data % 2 == 0));List<Integer> evenNumbers = collect.get(true);List<Integer> oddNumber = collect.get(false);System.out.println("data % 2 == 0-----------");evenNumbers.forEach(Syst...
2022-02-13
新增SqlHelper.execute
茅草屋顶下住着自由人,大理石和黄金下栖息着奴隶。——塞涅卡 昨晚提交了个PR到Mybatis-Plus,目前还没有处理 不过这个函数确实让开发便利了不少 链接:https://gitee.com/baomidou/mybatis-plus/pulls/215/files 使用方式很简单: 例如查询Entity表内所有数据: 1List<Entity> entityList = SqlHelper.execute(Entity.class, m -> m.selectList(Wrappers.lambdaQuery())); 在第二个参数中你可以传入lambda,直接用Entity的BaseMapper进行CRUD操作 这个方法自动对SqlSession进行了回收,还是蛮好用的 我顺便把原来的SimpleQuery.selectList也进行了调整 改为了 1234567891011/** * 通过entityClass查询列表,并关闭sqlSession * * @param entityClass 表对应实体 * @param wrapper ...
2023-10-20
spring3 springfox报错Type javax.servlet.http.HttpServletRequest not present
相信一切,失望有日;怀疑一切,收获天明。——乔·赫伯特 就像这个issue里描述的一样: https://github.com/springfox/springfox/issues/4061 在springboot3.0引入: 12345 <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-boot-starter</artifactId> <version>3.0.0</version></dependency> 引入完毕后发现启动报错。。。于是查询了下 最后一次更新是三年前。。。 https://central.sonatype.com/artifact/io.springfox/springfox-boot-starter/versions 相对的springboot3是去年出的 https://central.sonatype.com/artifa...
2023-02-04
rewriteBatchedStatements
从前的日色变得慢,车,马,邮件都慢,一生只够爱一个人。——木心 我们在使用mybatis进行批量更新时,可以在mysql的链接url处添加rewriteBatchedStatements=true提升效率. 文档:https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-connp-props-performance-extensions.html 1rewriteBatchedStatements Should the driver use multi-queries, regardless of the setting of ‘allowMultiQueries’, as well as rewriting of prepared statements for INSERT and REPLACE queries into multi-values clause statements when ‘executeBatch()’ is called? Notice that this might allow SQL...
2021-12-17
Thymeleaf Error resolving template [favicon.ico]
每一个看似简单的社会现象其实都只露出了冰山一角。——林达 遇到这个报错,方案1: 在页面上添加: 1<link rel="icon" href="/static/favicon.ico"> 前提是你有icon并且放到了static下面 方案2: 写个过滤器,给它过滤掉 12345678910111213141516171819202122232425262728293031323334353637package com.ruben.simplescaffold.filter;import cn.hutool.core.lang.Opt;import cn.hutool.core.text.CharSequenceUtil;import lombok.extern.slf4j.Slf4j;import org.springframework.stereotype.Component;import javax.servlet.*;import javax.servlet.annotation.WebFilter;import...

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