![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Java
文章平均质量分 53
Tamy-Du
这个作者很懒,什么都没留下…
展开
-
SpringBoot 项目打包失败
记一次打包失败的解决方法 问题描述: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources) on project helloworld: Input length = 1 -> [Help 1] 无法对项目进行打包,并报错 <build> <plugins> <原创 2021-07-15 15:22:17 · 658 阅读 · 0 评论 -
Elasticsearch 7.6.1
创建索引 // 创建索引请求 CreateIndexRequest request = new CreateIndexRequest("item"); // 客户端执行请求 CreateIndexResponse createIndexResponse = restHighLevelClient.indices().create(request, RequestOptions.DEFAULT); System.out.println(createIndexResponse); 判断索引是否存在 /.原创 2021-04-10 21:06:53 · 102 阅读 · 0 评论 -
1
==对于基本类型来说是值比较,对于引用数据类型来说是地址的比较;而equals默认情况下是引用比较,只是很多类重新编写了equals方法, 比如String、Integer等把它变成了值比较,所以一般情况下比较的是值是否相等。 取整方法 Math.floor(floor:地板) 向下求最接近它的整数,它的值肯定会小于或等于这个浮点数 Math.floor(-1.6) // -2.0 Maht.floor(0.1) // 0 Math.floor(1.6) // 1 Math.ceil(..原创 2021-02-27 21:08:31 · 81 阅读 · 0 评论 -
java集合基础---------1.集合非空判断
1.错误写法 categories.size() == 0写在前面会报错,如果categories对象为空,则获取size()会报空指针异常。 List<Category> categories = this.categoryService.queryCategoriesById(pid); if (categories.size() == 0 || categories == null){ } 2.正确写法 将categories == null写在前面,避免cat原创 2020-07-30 15:50:01 · 421 阅读 · 0 评论 -
Restful
Restful原创 2020-06-02 12:49:15 · 89 阅读 · 0 评论 -
leyou商城学习笔记----------一·搭建后台环境
搭建后台环境 1.创建parent项目 目录结构 pom文件–导入依赖 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/原创 2020-05-21 15:58:32 · 510 阅读 · 0 评论 -
SpringSecurity学习笔记
SpringSecurity1.环境搭建1.1项目创建1.2 创建Controller2.用户认证与授权2.1 SecurityConfig3.注销与权限控制3.1SecurityConfig 接上面的程序3.2导入依赖3.3index.html 首页 1.环境搭建 1.1项目创建 目录结构 添加thymeleaf依赖 <dependency> <g...原创 2020-04-23 15:51:57 · 219 阅读 · 0 评论 -
Java通过指定文件夹下的指定文件类型复制到指定的文件夹下
java 文件复制 Java复制文件有多种方式,本文只列举了其中的一种。 该程序的效果是:获取指定文件夹下的指定类型的文件,然后复制到指定的文件夹下。 PS:该程序一次只能复制一种类型 public class CopyFileExample { public static void main(String[] args) throws IOException { //获...原创 2020-03-06 16:25:42 · 684 阅读 · 0 评论