springboot
CC_GoodLuck
IT
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
QueryWrapper 方法说明
及 LambdaQueryWrapper, 可以通过 new QueryWrapper().lambda() 方法获取.转载 2023-07-11 09:48:09 · 7300 阅读 · 0 评论 -
springboot链接多数据库
【代码】springboot链接多数据库。原创 2023-04-07 10:06:07 · 458 阅读 · 0 评论 -
POI SXSSFWorkbook导出excel
【代码】POI SXSSFWorkbook导出excel。原创 2023-02-17 16:16:13 · 427 阅读 · 0 评论 -
myBatisPlus分页查询使用pagehelper插件
【代码】myBatisPlus分页查询使用pagehelper插件。原创 2023-02-15 14:24:40 · 1256 阅读 · 3 评论 -
myBatisPlus中使用update,updateById修改字段填充为null
【代码】myBatisPlus中使用update,updateById修改字段填充为null。原创 2023-02-15 14:16:15 · 918 阅读 · 0 评论 -
CollStreamUtil list 带参数转换成new list
hutool工具,stream流转换成list。原创 2022-12-15 10:58:53 · 467 阅读 · 0 评论 -
hutool两个list取差集subtractToList
【代码】hutool两个list取差集subtractToList。原创 2022-09-16 16:02:43 · 5566 阅读 · 0 评论 -
简单的方法:分页参数手动排序,列表添加排序号
分页排序原创 2022-07-18 17:53:02 · 463 阅读 · 0 评论 -
读取https 图片下载到本地
/** * 本地下载 * @param request * @param response * @throws IOException */ public static void localDownload(HttpServletRequest request, HttpServletResponse response, String path) { // 响应输出流 ServletOutputStream out =原创 2022-04-07 16:53:51 · 482 阅读 · 0 评论 -
Springcloud项目全局异常捕获V0.1
定义ClobalExceptionpackage com.bj66nao.prod.center.bff.admin.exception;import cn.hutool.core.collection.CollUtil;import com.bj66nao.prod.center.common.base.error.BusinessException;import com.bj66nao.prod.center.common.base.error.DubboRpcError;import co原创 2022-02-24 15:14:47 · 509 阅读 · 0 评论 -
mybaties-plus高级使用一
entity中 /** * 创建时间 */ //注解@TableField,fill属性,配置自动填充,在插入时,自动插入创建时间。默认是不处理的 @TableField(fill = FieldFill.INSERT) private LocalDateTime createTime; /** * 修改时间 */ //注解@TableField,fill属性,配置自动填充,在更新时,自动更新时间。默认是不处理的 @T原创 2021-12-30 15:39:06 · 639 阅读 · 0 评论 -
springboot异步接口请求
什么是异步调用?异步调用是相对于同步调用而言的,同步调用是指程序按预定顺序一步步执行,每一步必须等到上一步执行完后才能执行,异步调用则无需等待上一步程序执行完即可执行。如何实现异步调用?多线程,这是很多人第一眼想到的关键词,没错,多线程就是一种实现异步调用的方式。在非spring目项目中我们要实现异步调用的就是使用多线程方式,可以自己实现Runable接口或者集成Thread类,或者使用jdk1.5以上提供了的Executors线程池。StrngBoot中则提供了很方便的方式执行异步调用。异步接原创 2021-12-15 15:50:47 · 3463 阅读 · 0 评论 -
springboot mybatiesplus分页查询功能
结果集 Result/** * 公共返回实体 */public class Result implements Serializable { private static final long serialVersionUID = -1421035628214955827L; private String code; private String msg; private Object data; public static Result success原创 2021-09-15 17:08:03 · 246 阅读 · 0 评论 -
Aajx 添加自定义header数据
$.ajax({ url : "#", //请求的url地址 dataType : "json", //返回格式为json async : true,//请求是否异步,默认为异步,这也是ajax重要特性 type : "POST", //请求方式 data :{ key: value }, headers:{'原创 2021-09-03 18:06:13 · 197 阅读 · 0 评论 -
Springboot 自定义注解
自定义ApiVersion注解@Target({ElementType.TYPE, ElementType.METHOD})@Retention(RetentionPolicy.RUNTIME)@Documentedpublic @interface ApiVersion { /** * 版本 * * @return */ String value() default "1000";}原创 2021-09-02 20:04:12 · 162 阅读 · 0 评论 -
springboot CORS问题: When allowCredentials is true, allowedOrigins cannot contain the special value “
springboot 2.4版本以下import org.springframework.context.annotation.Bean;import org.springframework.context.annotation.Configuration;import org.springframework.web.cors.CorsConfiguration;import org.springframework.web.cors.UrlBasedCorsConfigurationSource;原创 2021-08-24 14:13:27 · 2107 阅读 · 3 评论 -
springboot整合Quartz定时任务管理
pom.xml<!-- SpringBoot 整合 Quartz 定时任务 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-quartz</artifactId> <version>2.3.5.REL原创 2021-08-11 16:32:11 · 321 阅读 · 2 评论 -
springboot 3.3版本以上 整合elasticsearch 7.10版本
首先pom.xml<!--elasticsearch 7.6.2 自动的版本--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-elasticsearch</artifactId> </dependency&原创 2021-08-11 16:18:15 · 959 阅读 · 0 评论 -
springboot3.0版本使用多线程处理任务时无法通过@Autowired注入service 层 报错空指针异常
在多线程处理问题时,无法通过@Autowired注入bean,报空指针异常,在线程中为了线程安全,是防注入的,如果要用到这个类,只能从bean工厂里拿个实例。解决方法如下:1.创建一个工具类代码:package com.xnhy.educationadmin.util;import org.springframework.beans.BeansException;import org.springframework.context.ApplicationContext;import org.s原创 2021-08-09 11:46:44 · 964 阅读 · 0 评论 -
springboot配置log4j2日志 每日自动生成日志
pom.xml<!--Web支持--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <!-- 排除springboot自带的logback框架 -->转载 2021-07-15 15:20:19 · 1866 阅读 · 0 评论 -
springboot静态类调用service方法
@Componentpublic class JavaAddressUtil { @Autowired private Service service; @Autowired private static Service s_Service; @PostConstruct public void init() { s_Service = service; } 静态方法引用s_Service }注意:@PostCon原创 2021-07-13 09:42:14 · 1118 阅读 · 0 评论 -
springboot 实现apication.yml中配置动态参数实现静态获取(static)
已连接阿里云oss为例aliyun: oss: # API鉴权 accessKeyId: # 访问身份验证中用到用户标识 accessKeySecret: # 用户用于加密签名字符串和oss用来验证签名字符串的密钥 # oss访问域名(内网) endpoint: bucketName: # oss的存储空间 policyExpire: 300 # url有效期(S) maxSize: 500 # 上传文件大小(M)import l原创 2021-06-25 18:10:18 · 947 阅读 · 0 评论 -
springboot项目druid配置
项目pom.xml中配置<!-- alibaba的druid数据库连接池 --> <dependency> <groupId>com.alibaba</groupId> <artifactId>druid-spring-boot-starter</artifactId> <version>1.1.23</version>原创 2021-06-25 18:06:38 · 824 阅读 · 0 评论 -
springboot mybatis 自动生成mapping
POM中 <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-generator</artifactId> <version>${mybatis-plus-boot-starter.version}</version> </dependenc原创 2021-06-17 09:36:27 · 427 阅读 · 0 评论 -
springboot项目linux发布指令
spring boot允许你通过命名约定按照一定的格式(application-{profile}.properties)来定义多个配置文件,然后通过在application.properyies通过spring.profiles.active来具体激活一个或者多个配置文件,如果没有没有指定任何profile的配置文件的话,spring boot默认会启动application-default.properties。原创 2021-05-27 16:18:32 · 214 阅读 · 0 评论
分享