springboot springmvc spring

SpringBoot 大型线上商城项目实战总结

# SpringBoot 大型线上商城项目实战总结 知识点和可以借鉴到自己项目的点: ## 分页逻辑的处理操作 ​ 这里没有使用封装好的分页处理的相关工具类,而是自己去写分页封装的逻辑代码,帮助我们去了解分页操作的底层逻辑。 ​ 一个是**PageQueryUtil**工具类,这个工具类是作为分页查 ......
SpringBoot 实战 商城 项目

Mybatis——Spring事务实现 select for update

Mybatis——Spring事务实现 https://www.cnblogs.com/wqff-biubiu/p/12546674.html select for update不交由spring事务管理的正确姿势 https://blog.csdn.net/shuangyueliao/articl ......
事务 Mybatis Spring select update

SpringMVC里通过ResponseBodyAdvice接口实现统一自定义返回逻辑

这个org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice接口。 public interface ResponseBodyAdvice<T> { // 返回true代表走自定义逻辑 boolean suppo ......
ResponseBodyAdvice SpringMVC 逻辑 接口

SpringBoot启动报错

# 1. 问题 启动SpringBoot时,报错 无效的目标发行版 ![image](https://img2023.cnblogs.com/blog/2139539/202306/2139539-20230606010351681-501064119.png) # 2. 原因 项目启动配置的 JD ......
SpringBoot

springboot 整合websocket

<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-websocket</artifactId> </dependency> @Configuration public cl ......
springboot websocket

【Java】再谈Springboot 策略模式

第一次使用策略模式是一年前的一个项目: https://www.cnblogs.com/mindzone/p/16046538.html 当时还不知道Spring支持集合类型的自动装配 在最近一个项目,我发现很多业务需要频繁的使用这种模式去聚合代码 一、牛刀小试 这是最开始的定义策略的业务接口 /* ......
Springboot 策略 模式 Java

springboot+vue基于协同过滤算法商品推荐系统,附源码+数据库

**1、项目介绍** 项目分为普通用户和管理员两个角色。 用户的功能有:登录、注册、商品信息、加入购物车、直接购买、点击收藏、评论、商品资讯、个人中心、我的订单、我的地址、我的收藏 管理员的功能有:登录、个人中心、用户管理、商品类型管理、商品信息管理、轮播图管理、商品资讯管理、订单管理 # [项目获 ......
算法 springboot 源码 数据库 商品

第三次技术问答 ---- Spring&&Spring Boot

# Spring框架 ### 1、说说你对Spring IOC的理解? ``` 答:控制反转 将对象的创建和管理由程序员反转给spring程序管理 Spring反向控制应用程序所需要使用的外部资源 ,类原来自己主动new对象, 变成交给springIoc容器管理,配置好java对象的bean即可 S ......
Spring amp 技术 Boot

Spring Web 日志记录切面

# Spring Web 日志记录切面 应用: 在我们进行 rest 接口编写时需要对该接口的耗时、参数、请求路径、返回值进行对应的记录 ## 日志注解 把日志封装成注解的形式可以更好的供使用者使用,同时也利于解耦合 - 代码 ```java @Target({ElementType.TYPE, E ......
切面 Spring 日志 Web

SpringMVC 国际化 Hibernate Validator 扩展注解

# 高版本 JDK Hibernate Validator 扩展注解 https://stackoverflow.com/questions/35986200/error-creating-bean-with-name-org-springframework-validation-beanvalid ......
注解 SpringMVC Hibernate Validator 国际

二、Spring Reactive Security自定义登录页

添加配置类: @Configuration public class MyReactiveSecurityConfig { @Bean public ReactiveUserDetailsService reactiveUserDetailsService() { UserDetails user ......
Reactive Security Spring

一、Spring Reactive Security简单使用

Spring Reactive Security是结合Spring Web Flux使用的。结合SpringBoot使用,简化了大量配置。 新建SpringBoot项目,添加依赖: org.springframework.boot spring-boot-starter-webflux org.sp ......
Reactive Security Spring

SpringBoot 文件上传下载工具样例

最近工作遇到这样的情景:一大堆 linux 内网服务器,上面部署了 mysql,nacos,xxl job 等中间件,当然也给了一个很干净的 windows 内网服务器,什么软件都没有安装。比较欣慰的是:可以通过浏览器访问 nacos、xxl job 的管理页面。不幸的是:没有安装 mysql 客户 ......
下载工具 SpringBoot 文件 工具

纯注解方式整合Spring和Mybatis框架

一、配置信息介绍 application-dao.xml application-dao.xml配置文件中配置的内容包含以下4项: 读取jdbc.properties文件中的数据连接信息。 创建Druid对象,并将读取的数据连接信息注入到Druid数据连接池对象中。 创建SqlSessionFact ......
注解 框架 Mybatis 方式 Spring

springboot +nginx 配置http2

# 说明 - nginx端使用http2+https,如果不使用https,浏览器会默认走http1.1 - 后台使用http2,不使用https,因为内部服务之间没必要每次校验证书 # nginx配置 ``` # user root; worker_processes auto; error_lo ......
springboot nginx http2 http

【Log4j】ログのツールーSpringBoot

ログのUtilクラス: package com.example.demoaop.common; import com.sun.deploy.config.DefaultConfig; import org.slf4j.Logger; import org.slf4j.LoggerFactory; i ......
SpringBoot Log4j Log4 Log 4j

Spring注解校验@Valid的手动调用

在做Spring项目的时候,@Valid可以完成优雅的参数校验,但是在不少特殊场景下,会有字段组合校验的场景.这种情况下,就需要在后台手动校验,那么如何在后端也优雅的参数校验,避免一堆判断和抛异常呢,可以试试在满足校验场景下手动触发@Valid校验. ### 1. 第一步:定义校验对象 点击查看代码 ......
注解 手动 Spring Valid

整一个B站私信自动发送系统(Spring Cloud Alibaba + Vue)(二)

前文 https://www.cnblogs.com/sefuture/p/16665753.html 写在前面 由于太久太久没整,以及工作太忙,这个计划以及搁置好久,其实也进行了一些更新,但是和预想的偏差还是很大 整体刨除了Spring Cloud,仅保留Boot基础功能,另外新增了直播间礼物监听 ......
私信 Alibaba Spring 系统 Cloud

Spring Bean生命周期详解

本文结合Spring源码5.1.7.RELEASE,详细分析Spring Bean生命周期,包括主要流程以及Spring一系列的扩展方法,最后通过测试实例演示主要步骤。 Spring提供的Bean扩展方法大致分为三类,一类是BeanPostProcessor接口,一类是BeanFactoryProc ......
周期 生命 Spring Bean

spring中默认标签alias、import标签解析

1、Alias标签 在bean标签里边有一个alias属性和name属性,可以指定bean的别名,但是有的场景下,在定义bean的时候就把他的别名都指定好是不适用的。比如这个Bean在组件A中,想把他叫做componentA,但是在组件B中又想把他叫做componetB,所以还有一个单独的标签:< ......
标签 spring import alias

使用powermock写springboot2.7业务类的测试用例

1,引入powermock依赖 <dependency> <groupId>org.powermock</groupId> <artifactId>powermock-core</artifactId> <version>2.0.9</version> <scope>test</scope> </d ......
springboot2 springboot powermock 业务

kettle web springboot mvn dockerfile

#### 远程构建 dcokerfile ``` FROM openjdk:8-jdk-alpine as TEMP_BUILD_IMAGE RUN set -eux && sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/ap ......
dockerfile springboot kettle web mvn

springmvc后端接收前端数据的四种方式

前端登录页面代码 ``` Title 登录页面 username: password: ``` ![](https://img2023.cnblogs.com/blog/3005714/202306/3005714-20230605141445447-1350450152.png) 配置spring ......
前端 springmvc 方式 数据

springboot 项目打war包

修改主类,参照以下格式 `EducationErverApplication.class` ```java @SpringBootApplication // war 包启动类 public class EducationErverApplication extends SpringBootServ ......
springboot 项目 war

springboot 发送邮箱验证码

# 0 步骤总览 1. 开启邮箱的 POP3/SMTP 服务。 2. 新建 springboot 项目。 3. 导入依赖。 4. 配置配置文件。 6. 编写 controller 测试接口。 7. postman 中测试 # 1 开启邮箱的 POP3/SMTP 服务 这里我用的网易邮箱,其它邮箱类似 ......
springboot 邮箱

springboot集成Knife4j

1.springboot我用的 2.7.X 引入maven <!--整合Knife4j--> <dependency> <groupId>com.github.xiaoymin</groupId> <artifactId>knife4j-spring-boot-starter</artifactId ......
springboot Knife4j Knife4 Knife 4j

Spring 配置文件中的占位符${}和@{}的区别

在Spring Boot的配置文件(通常是application.properties或application.yml),@{}和${}都是用来引用属性值的占位符。它们的区别在于: ${}占位符:${}占位符是Spring框架中的一种常用占位符语法,用于引用配置文件中的属性值。这些属性值可以来自于不 ......
文件 Spring

SpringBoot打包成WAR包的时候把第三方jar包打到LIB文件夹下和把第三方jar包打入到SpringBoot jar包中

### SpringBoot打包成WAR包的时候把第三方jar包打到LIB文件夹下和把第三方jar包打入到SpringBoot jar包中 [转载](https://www.freesion.com/article/40631125428/) 1. 首先我们应该知道我们把`SPRINGBOOT`项目 ......
第三方 SpringBoot jar 文件夹 时候

Spring Cloud 版本

Spring Cloud 包含了许多子项目(组件),这些子项目都是独立进行内容更新和迭代的,各自都维护着自己的发布版本号。 为了避免 Spring Cloud 的版本号与其子项目的版本号混淆,Spring Cloud 没有采用常见的数字版本号,而是通过以下方式定义版本信息。 ``` {version ......
版本 Spring Cloud

Spring之Aop

# 代理模式 代理模式的两个设计原则: 1. 代理类 与 委托类 具有相似的行为(共同) 2. 代理类增强委托类的行为 ### 代理的三要素 a、有共同的行为 - 接口 b、目标角色 - 实现行为 c、代理角色 - 实现行为 增强目标对象行为 ## 静态代理 ### 特点 1、目标角色固定 2、在应 ......
Spring Aop