自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 收藏
  • 关注

原创 Java 8 stream 流获取 list 中最大值、最小值、总和值、平均值

static List<User> list = new ArrayList<User>(); static void init() { list.add(new User("1号", 1)); list.add(new User("2号", 5)); list.add(new User("3号", 7)); } public static void main(String[] args)..

2021-10-21 17:33:45 2574

原创 String常用方法

String toLowerCase(); 将字符串中大写转换小写,非字母 不改变。例:“Hello WOrld!”变成“hello world!”

2021-09-29 14:56:53 68

原创 Fegin GET传参方式-@SpringQueryMap

spring cloud项目使用feign的时候都会发现一个问题,就是get方式无法解析对象参数。其实feign是支持对象传递的,但是得是Map形式,而且不能为空,与spring在机制上不兼容,因此无法使用。spring cloud在2.1.x版本中提供了@SpringQueryMap注解,可以传递对象参数,框架自动解析,只可惜啊,得是2.1.0以后的版本。spring 在5.0中提供了webflux踢掉了对tomcat的依赖,又提供了gateway踢掉了对zuul的依赖,2.1.x版本恐怕是准备对net

2021-09-27 16:47:38 568

原创 Oracle自增序列

简介什么是序列:序列是一数据库对象,利用它可生成唯一的整数。一般使用序列自动地生成主码值。一个序列的值是由特别的Oracle程序自动生成,因而序列避免了在运用层实现序列而引起的性能瓶颈。SQL如下(示例):CREATE sequence seq_tableNameincrement BY 1 START WITH 1 MAXVALUE 99999999minvalue 1cyclenocache;参数说明:increment by:指定序列之间的间隔,该值可为(正或

2020-11-01 18:46:36 1344

原创 SQL查询是否“存在“,减少耗时

SQL查询是否"存在",减少耗时下面展示一些 内联代码片。多数写法:####sql: select count(*) from table where a=1 and b=2 #####java: int num= dao.countxxx(params); if(num >0){ //存在逻辑 }else{ //不存在逻辑 }优化写法:####sql: SELECT 1 FROM table WHERE a = 1 AND b

2020-07-14 10:49:24 125

原创 mybatis-generator坑。

自动生成的pom文件 <build><pluginManagement><plugins>........</plugins></pluginManagement></build>这个时候要想加载mybatis-generator-core 先把pluginManagement标签删除,等在本地仓库中下载到...

2019-04-03 14:36:58 113

原创 基础的SQL语句

--选择: select * from table1 where 范围 --插入: insert into table1(field1,field2) values(value1,value2) --删除: delete from table1 where 范围--更新: update table1 set field1=valu...

2019-03-21 08:15:43 60

原创 Java中String如何转化Int

/** * 1:Integer.parsrInt()方法。直接转换为 int * 2:Integer.valueOf()方法String转换为Integer。 * Integer.inValue()方法 Integer转化为int。 */ String s="1234"; int number = Integer.valueOf(s)....

2019-03-19 03:18:44 204

原创 java中求出字符串中每个元素出现的次

public static void main(String[] args) { String[] array = { &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, &amp;quot;c&amp;quot;, &amp;quot;d&amp;quot;, &amp;quot;e&amp;quot;, &amp;quot;f&amp;quot;, &amp

2019-01-16 11:51:41 253

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除