springboot springmvc spring

Spring循环依赖

Java中的循环依赖分两种: 构造器的循环依赖:就是在构造器中有属性循环依赖,如下所示的两个类就属于构造器循环依赖 @Service public class Student { @Autowired private Teacher teacher; public Student (Teacher ......
Spring

springboot008基于位置的多分馆图书馆推荐系统vue

第一章 系统概述1.1课题背景近几年来,互联网发展的脚步在近几年越来越迅猛,与此同时,各类电子商务也发展的越来越快,人们也越来越离不开网络所带来的便利性和便捷性,并且可以利用电商就能在线进行各种的售卖活动,如鞋、衣服以及二次元图书等等各类图书。计算机应用技术不断得到发展和推广应用。很多发达国家和一些 ......
springboot 图书馆 位置 图书 系统

SpringBoot使用Async注解实现异步线程

1、启动类增加@EnableAsync注解 2、yml增加配置 spring: task: execution: pool: max-size: 8 core-size: 8 keep-alive: 60 queue-capacity: 1000 thread-name-prefix: Asnyc- ......
注解 线程 SpringBoot Async

spring boot启动耗时分析-spring-startup-analyzer使用

github地址:https://github.com/linyimin0812/spring-startup-analyzer 1、安装 curl -sS https://raw.githubusercontent.com/linyimin0812/spring-startup-analyzer/ ......

Template Engines for Spring: FreeMarker | Java Server Pages | Thymeleaf | Jade4j

Besides the template engines described so far, there are quite a few more available which may be used. Let’s review some of them briefly. Velocity is ......
FreeMarker Thymeleaf Template Engines Spring

SpringBoot启动

springBoot启动全流程如下所示: 框架初始化,完成相关配置: public SpringApplication(ResourceLoader resourceLoader, Class<?>... primarySources) { this.resourceLoader = resourc ......
SpringBoot

springcloudalibabada搭建过程中springboot启动卡住起不来 (Started MoonceProviderApplication in 11.254 seconds (JVM running for 13.896))

如下图一样springcloudAlibaba在创建新模块之后启动新模块没有注册到nacos上,而是直接卡住起不来原因 原因是:引入了错误的web包: 解决办法: 引入相应的 spring-boot-starter-web 包: <dependency> <groupId>org.springfra ......

Spring Boot 2.6.1 Error creating bean with name 'formContentFilter' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.class]

Error creating bean with name 'formContentFilter' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfigu ......

Spring CSP & Cors: Content Security Policy with Spring Security | Enabling Cross Origin Requests for a RESTful Web Service

* [Spring Security 配置 Content Security Policy(CSP) - spring 中文网](https://springdoc.cn/spring-security-csp/)* [Getting Started | Enabling Cross Origin ......
Security Spring Enabling Requests Content

Spring Cloud Stream

Spring Cloud Stream 官方文档 用法参考文档 官方代码Demo 事件驱动架构(EDA)是一种软件架构范例。事件生产者和事件消费者是 EDA 的两个主要组成部分。生产者的责任是感知任何状态变化并将该状态呈现为事件消息。生产者不知道谁是该事件的消费者以及该事件的结果是什么。事件的传输将 ......
Spring Stream Cloud

spring xml配置文件之context:annotation-config

我们一般在含有Spring的项目中,可能会看到配置项中包含这个配置节点context:annotation-config。 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/sche ......

Springboot2.x + maven多模块+ 打包

参考 https://blog.csdn.net/weixin_43726822/article/details/88562314 https://cloud.tencent.com/developer/article/1870338 (将本地Jar包导入Maven项目的4种方式) 本文代码下载 环 ......
Springboot2 Springboot 模块 maven

Spring系列:基于Spring-AOP和Spring-Aspects实现AOP切面编程

目录一、概念及相关术语概念相关术语①横切关注点②通知(增强)③切面④目标⑤代理⑥连接点⑦切入点作用二、基于注解的AOP技术说明准备工作创建切面类并配置各种通知切入点表达式语法重用切入点表达式获取通知的相关信息环绕通知切面的优先级三、基于XML的AOP准备工作实现 一、概念及相关术语 概念 AOP(A ......
Spring 切面 Spring-Aspects Spring-AOP AOP

spring cloud生态中Feign、Ribbon、loadbalancer的一些历史

背景 本意是想写个feign中loadbalancer组件和nacos相遇后,一个兼容相关的问题,后面发现Feign这套东西很深,想一篇文章写清楚很难,就先开一篇,讲历史。 Feign、OpenFeign、Spring Cloud OpenFeign Feign Feign是Java生态中的一个库, ......
loadbalancer 生态 spring Ribbon 历史

springboot的图书馆座位管理系统(Java毕业设计,提供数据库和源码)

2 关键技术介绍2.1 springboot技术 Spring boot,是简化后的spring应用开发,是一种配置工具。相对于spring而言,spring boot拥有更加简便的操作、快速的响应。Spring boot能够快速的创建spring框架,并且能够集成很多主流框架内容,可以通过大量的自 ......

SpringBoot出现406的问题

出现问题: 在项目中自定义返回类R时,没有写Getter和Setter方法 { "timestamp": "2023-12-14T14:01:37.153+00:00", "status": 406, "error": "Not Acceptable", "path": "/user" } 解决:在 ......
SpringBoot 问题 406

SpringBoot+MyBatis-Plus没有扫描到Mapper的问题

一、问题: WARN 22052 [ main] ConfigServletWebServerApplicationContext : No MyBatis mapper was found in '[xxx.xxx.xxxx]' package. Please check your configu ......

Spring-第四章:Spring注解配置

四、Spring注解配置 1、IoC注解 1.1 常用注解 1.2 数据装配 1.3 其他bean的引用 1.4 集合的装配 1.5 生命周期 1.6 实例化时机 & scope作用域 2、AOP注解 ......
Spring 注解

Springboot第13天(拦截器)

一、Interceptor (拦截器)介绍 1、介绍 拦截器(Interceptor)同 Filter 过滤器一样,它俩都是面向切面编程——AOP 的具体实现(AOP切面编程只是一种编程思想而已)。 你可以使用 Interceptor 来执行某些任务,例如在 Controller 处理请求之前编写日 ......
Springboot

spring 中的类型转换工具类

在看 org.springframework.data.redis.support.atomic.RedisAtomicInteger 的源码时,发现了 Spring 的一个类型转换的工具类:DefaultConversionService 能够轻松的将 String 类型和其他类型进行相互转换。 ......
类型 工具 spring

Spring-第三章:AOP(面向切面编程)

三、AOP(面向切面编程) 1、AOP & 代理模式 2、动态代理:JDK动态代理和CGLIB技术 2.1 动态代理 2.2 cglib技术 2.3 AOP原理 2.4 案例 3、Spring AOP 1.x配置 3.1 Spring AOP的配置方式 3.2 Spring AOP 1.x (1)前 ......
切面 第三章 Spring AOP

Spring-第二章:IoC容器

二、IoC容器 1、IoC Ioc必须要添加的四个包 2、DI 3、第一个程序 4、IoC容器的类型 5、数据装配 toString方法不是构造方法 不同bean之间的引用使用ref Array:数组 值可重复 Set:集合 值不可重复 Map:键值对 6、bean生命周期 6.1 练习 7、实例化 ......
容器 第二章 Spring IoC

Spring Cloud Gateway的Filter中如果有耗时操作应该如何处理?

1,如果不处理,会大大影响吞吐量; 2,spring cloud gateway是reactive的编码风格,改造代码难度很大,很不习惯; 3,spring cloud gateway使用事件线程处理一个http请求 4,事件线程比较少(参考netty event loop),不能有耗时操作,否则影 ......
Gateway Spring Filter Cloud

项目实战接口开发SpringBoot

目录一、springboot官方demo开发二、使用SpringBoot开发get方法接口三、一个要求携带cookie信息访问的get接口开发四、需要携带参数的get请求两种开发方式4.1 方式1:url:key=value&key=value4.2 方式2:url:ip:port/get/with ......
SpringBoot 实战 接口 项目

Java Spring Boot 规范统一响应体结构

在进行 web开发 中,如果我们的返回数据不统一,会是啥样呢,比如像下面这种: @RestController public class DemoController { @GetMapping("/haha") public Object haha() { return ""; } @GetMap ......
结构 Spring Java Boot

Java Spring Boot 自定义异常与全局异常处理

我们在对比 过滤器与拦截器 一文中,知道请求过来,各种拦截处理的顺序: 1.过滤器 2.拦截器 3.controllerAdvice 4.AOP 5.controller 6.AOP 7.controllerAdvice 8.拦截器 9.过滤器 今天我们学习的 自定义异常与异常处理 这块内容,恰好就 ......
全局 Spring Java Boot

Java Spring Boot 过滤器的使用与拦截器对比

在 web 应用中,早期在 servlet 中使用 filter过滤器,随着 spring 的发展,不同于依托 servlet容器,拦截器依托 Spring框架 应用也很广泛。 今天主要内容分两部分: 1.filter的使用 2.filter和interceptors对比 filter的使用 导入依 ......
过滤器 Spring Java Boot

spring boot项目中org.springframework.boot.autoconfigure.AutoConfiguration.imports和META-INF.spring下的文件的作用汇总

一、resource下的文件 org.springframework.boot.autoconfigure.AutoConfiguration.imports spring.factories messages_zh_CN.properties 二、spring.factories文件我们知道在sp ......

SpringBoot中项目启动及定时任务缓存数据库常用数据至内存变量并转换后高频调用

场景 定时任务中需要获取数据库中数据进行数据转换成需要的格式并进行后续的业务处理。 数据库中的数据更新频率不高。 可将数据库中数据在项目启动后读取一遍数据,然后再通过定时任务定时查询数据库更新数据。 实现数据库缓存的方式有多种,比如以下: SpringBoot中通过自定义缓存注解(AOP切面拦截)实 ......
数据 缓存 变量 SpringBoot 内存