spring boot全局捕获异常 制作人:全心全意 @ExceptionHandler:标识拦截异常 @ControllerAdvice:Controller的一个辅助类,最常用的就是作为全局异常处理的切面类 @ControllerAdvice可以指定扫描范围 @ControllerAdvice约 ...
分类:
编程语言 时间:
2020-12-29 11:02:27
阅读次数:
0
体系结构概述: @Bean 之前时候,在xml配置文件使用: <bean id="person" class="com.atguigu.bean.Person" scope="prototype" > <property name="age" value="${}"></property> <pro ...
分类:
编程语言 时间:
2020-12-28 12:01:10
阅读次数:
0
首先Spring Boot项目中都会如下启动类: @SpringBootApplication public class Application { public static void main(String[] args) { SpringApplication.run(Application. ...
分类:
编程语言 时间:
2020-12-28 11:58:46
阅读次数:
0
spring源码有很多值得学习的地方,自己搭建了一套源码框架,方便跟踪和查看。对理解底层的结构有非常大的帮助。下面开始: step1 准备环境: 官方下载spring的源码:记得切换分支,我下的是5.1.x https://github.com/spring-projects/spring-fram ...
分类:
编程语言 时间:
2020-12-28 11:50:19
阅读次数:
0
名称与标识 id 使用了约束中的唯一约束。里面不能出现特殊字符的 name 没有使用约束中的唯一约束。里面可以出现特殊字符。 设置对象的生命周期方法 init-method Bean被初始化的时候执行的方法 destroy-method Bean被销毁的时候执行的方法(Bean是单例创建,工厂关闭) ...
分类:
编程语言 时间:
2020-12-28 11:33:21
阅读次数:
0
https://blog.csdn.net/shichen2010/article/details/105022321?utm_medium=distribute.pc_relevant.none-task-blog-baidujs_title-2&spm=1001.2101.3001.4242 ...
分类:
其他好文 时间:
2020-12-28 11:33:07
阅读次数:
0
在对 Spring Batch 源代码进行编译的时候,提示仓库配置错误错误: org.gradle.api.resources.ResourceException: Could not get resource 'http://repo.spring.io/plugins-release/org/s ...
分类:
编程语言 时间:
2020-12-28 11:13:10
阅读次数:
0
前言 我们都知道ArrayList适合查询/替换、LinkedList适合添加/删除,造成这样子的原因也在于它们底层的实现。光说这些理论似乎大家都会,所以准备用更加具体的例子来证明它,也能更好地比较这两者之间的性能关系。在测试具体场景前,简单说明下环境配置,window环境下:内存8个G;JDK8; ...
分类:
其他好文 时间:
2020-12-28 11:09:04
阅读次数:
0
Spring Boot + Layui + Spring Data JPA 实现前后端分离下简单增删改查分页操作 1.项目背景 自己搭着玩,写个小demo 2.项目构成 后端:Spring boot 2.3 JDK1.8 数据库:Spring Data JPA MySQL 5.7.31 前端: La ...
分类:
编程语言 时间:
2020-12-28 11:04:17
阅读次数:
0
spring: data: mongodb: database: test (自己创建的库) port: 3717 host: aliyun~.com username: username password: 123456 authentication-database: admin 这里有一个大坑 ...
分类:
数据库 时间:
2020-12-28 11:02:07
阅读次数:
0