springboot3 springboot mybatis mapper

springboot学习之十二(异常处理统一返回)

SpringBoot的项目已经对有一定的异常处理了,但是对于我们开发者而言可能就不太合适了,因此我们需要对这些异常进行统一的捕获并处理。SpringBoot中有一个ControllerAdvice的注解,使用该注解表示开启了全局异常的捕获,我们只需在自定义一个方法使用ExceptionHandler ......
springboot

springboot学习之十一(统一返回结果)

SpringBoot统一返回结果在实际开发中,为了降低开发人员之间的沟通成本,一般返回结果会定义成一个统一格式,具体的格式根据实际开发业务不同有所区别,但至少包括三要素: code状态码:由后端统一定义各种返回结果的状态码message 描述:本次接口调用的结果描述data 数据:本次返回的数据。 ......
springboot 结果

springboot i18n 国际化

默认一: 1、配置 # 主Spring spring: messages: basename: i18n.rsltMessage,i18n.errorCodeMessage 2、多语言文件 在resources下 新建i18n文件夹 ,在在这个下面建立多语言: rsltMessage.propert ......
springboot 国际 i18n i18 18n

SpringBoot+ShardingSphere+Mybatis实现Mysql8读写分离

场景 CentOS7安装Mysql8并进行主从复制配置: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/131810683 在上面搭建起来Mysql之间的主从复制的基础上,在SpringBoot项目中实现Mysql数据的 读写分离 ......

Vue+springboot集成PageOffice实现在线编辑Word、excel文档

# 说明: PageOffice是一款在线的office编辑软件,帮助Web应用系统或Web网站实现用户在线编辑Word、Excel、PowerPoint文档。可以完美实现在线公文流转,领导批阅,盖章。可以给文件添加水印,在线安全预览防止用户下载和复制文件等 # 一、环境要求 前端Vue项目:Nod ......
PageOffice springboot 文档 excel Word

Idea SpringBoot 项目启动时提示程序包不存在和找不到符号

从git上克隆了一个SpringBoot项目,并且使用Maven编译也通过了,奇怪的是当Build Project时却提示符号不存在 。如下图: 先查看导入的类是否存在,如果不存在的话,那查看一下是否缺少了maven依赖。我这边是可以访问到类的,并且jar包也导入成功了。 也尝试了网上的解决方法,设 ......
SpringBoot 符号 程序 项目 Idea

Mapper基本配置目录

之前遇到过一个Mapper非常简单的配置问题,报错如下: Error creating bean with name 'test' defined in class path resource [com/example/hjrkxx/controller/HjrkRequest.class]: Be ......
基本配置 目录 Mapper

SpringBoot实现浏览器端大文件分块上传

​ 前言 一、SpringMVC简介 1.1、SpringMVC引言 为了使Spring有可插入的MVC架构,SpringFrameWork在Spring基础上开发SpringMVC框架,从而在使用Spring进行WEB开发时可以选择使用Spring的SpringMVC框架作为web开发的控制器框架 ......
SpringBoot 浏览器 文件

myBatis 流式查询,大数据量查询

### [myBatis](https://so.csdn.net/so/search?q=myBatis&spm=1001.2101.3001.7020)\-plus/myBatis 流式查询,大数据量查询 [myBatis](https://mybatis.org/mybatis-3/)这个开源 ......
myBatis 数据

Spring + SpringMVC + SpringBoot + MyBatis 相关注解

创建对象的: @Controller: 放在类的上面,创建控制器对象,注入到容器中 @RestController: 放在类的上面,创建控制器对象,注入到容器中。 作用:复合注解是@Controller , @ResponseBody, 使用这个注解类的,里面的控制器方法的返回值 都是数据 @Ser ......
注解 SpringBoot SpringMVC MyBatis Spring

Springboot 整合Swagger Swagger使用教程

# swagger使用教程——快速使用swagger ## 一、swagger简介 官网:https://swagger.io/ ### 1、认识swagger swagger是一个规范和完整的框架,用于生成、描述、调用和可视化RestFul风格的web服务,总体目标是使客户端和文件系统作为服务器以 ......
Swagger Springboot 教程

springBoot——整合mybatis

spring整合mybatis springBoot整合mybaits 配置文件 spring: datasource: url: jdbc:mysql://localhost:3306/test driver-class-name: com.mysql.jdbc.Driver username: ......
springBoot mybatis

springBoot——整合junit

spring整合junit复习 springBoot整合junit package com.example.springboot_04; import com.example.springboot_04.service.ServiceBook; import org.junit.jupiter.ap ......
springBoot junit

springboot xxl-job 执行器

maven依赖: <dependency> <groupId>com.xuxueli</groupId> <artifactId>xxl-job-core</artifactId> <version>2.4.0</version> </dependency> 配置文件: xxl: job: acce ......
springboot xxl-job job xxl

springBoot——多环境开发

不常用的application.properties版的 常用的:application.yml版 #多环境开发,设置启用环境 spring: profiles: active: test #开发 spring: config: activate: on-profile: dev server: p ......
springBoot 环境

【xiaoxiao-demo】SpringBoot 案例分享

> 预览图 ![](https://img2023.cnblogs.com/blog/1506449/202307/1506449-20230720094731893-996914902.png) 里面列举了很多小的例子,欢迎大家借鉴。 ![](https://img2023.cnblogs.com ......

springBoot——读取数据

在yml文件中读取数据,用$符号就可以 类似于这样的 如果要读取yml里面全部的数据,就用自动装配来写 而如果要用实体类来读取里面的数据 package com.example.springboot_01.domain; import org.springframework.boot.context ......
springBoot 数据

mybatis中 #{keyword} , ${keyword} 什么区别

`${keyword}` 和 `#{keyword}` 是 MyBatis 中用于参数替换的两种不同的占位符形式,它们有以下区别: 1. `${keyword}`:这是一种简单的字符串替换占位符形式,它会将占位符 `${keyword}` 直接替换为传入的参数值。例如,在 XML 配置文件中使用 ` ......
keyword mybatis

我开源了团队内部基于SpringBoot Web快速开发的API脚手架stater

我们现在使用**SpringBoot** 做Web 开发已经比之前SprngMvc 那一套强大很多了。 但是 用SpringBoot Web 做API 开发还是不够简洁有一些。 每次Web API常用功能都需要重新写一遍。或者复制之前项目代码。于是我封装了这么一个 ![](https://image ......
脚手架 SpringBoot 团队 stater API

mybatis批量更新出错记录

问题: 首先已经检查过代码并确认sql语法都对 <update id="batchUpdate"> <foreach collection="upList" item="d" separator=";"> update broadcast_status <set> <if test="d.devic ......
mybatis

springboot nohup 启动部署脚本

nohup作为简单的jar包部署程序,可以保证关闭窗口后程序继续运行。 使用说明: APP_NAME设置为jar包名,脚本和jar包放在同一个目录下脚本命名为:start.sh 自己随意命名。 启动: sh start.sh #这里可替换为你自己的执行程序,其他代码无需更改 APP_NAME=aaa ......
脚本 springboot nohup

springboot整合mybatis

项目结构: 1.添加依赖 <?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-ins ......
springboot mybatis

springboot日志

日志简述 我们具体应该怎么选用 如何使用 首先应该导入抽象框架,搞出日志记录器,穿进去你想记录的类 日志适配层 最上都是抽象接口,中间是适配层,来适配本来不也是slf4j框架的 包装层解决历史遗留问题 如何把其他框架的日志替换成slf4j,把原来包里的替换成over,over里的类原来的包都有只是实 ......
springboot 日志

Mybatis中执行sql

在mappr.xml中配置 ` ${sqlStr} ` 上面的代码中,我们定义了一个update语句,用于更新user表中的数据。该语句使用了{value}占位符来表示参数值,并将参数类型设置为String。当调用该方法时,MyBatis会自动将参数值绑定到SQL语句中的占位符上,并执行相应的更新操 ......
Mybatis sql

springboot——yaml格式

......
springboot 格式 yaml

mybatis的generator 代码生成器(自动生成DAO,PO,XML)

### 1. 引入 插件 ``` java org.mybatis.generator mybatis-generator-maven-plugin 1.3.5 src/main/resources/generatorMapper.xml true true ``` 刷新下pop ### 2.配置下 ......

springboot

起步依赖 这两个包的源码: 第一个: <developers> <developer> <name>Pivotal</name> <email>info@pivotal.io</email> <organization>Pivotal Software, Inc.</organization> <o ......
springboot

转:springboot2.0 集成redis服务详解,以及 (Lettuce & Jedis)

springboot2.0 集成redis服务详解,以及 (Lettuce & Jedis) ......
springboot2 springboot Lettuce redis Jedis

springboot简介

spring程序于springboot程序对比 springboot程序必须联网 另外可以去spring的官网创建项目 进入spring官网 选择这个 选择配置 点击generate生成 会生成zip压缩文件 ......
springboot 简介

springboot——入门案例

真简单啊 springboot 学了入门案例,有感而发 首先是一个自带的配置文件: package com.example.springboot_01; import org.springframework.boot.SpringApplication; import org.springframe ......
springboot 案例