- 博客(10)
- 收藏
- 关注
原创 【Spring系列】Spring @DependsOn注解控制两个Bean的加载顺序
这里写自定义目录标题背景解决方案实现原理 背景 最近遇到了一个比较罕见的bug,灰度上线的机器在监控平台打的点应用名和方法名都是null,排查了一番,发现新增的A类调用了监控打点的切面B类的静态方法,而在Spring加载Bean的时候,先加载了A类的Bean,使得B类中需要Spring注入的被@Value修饰的应用名和方法名属性都没有注入成功。 A类 @Component public class A{ public void xxx(){ //用B类打点
2020-09-03 10:21:40
634
原创 MySQL系列——InnoDB行格式
InnoDB行格式 MySQL的每条数据都是以一条记录的形式存放在磁盘上的,它们存放的方式被称为行格式或者记录格式。InnoDB中定义了四种类型的行格式,分别是Compact、Redundant、Dynamic和Compressed。在我们创建或修改表的时候就可以指定当前表的行格式: CREATE TABLE t_user (id int(10) primary key, name varchar(20) ) ROW_FORMAT = Compact; ALTER TABLE t_user ROW_FOR
2020-07-21 11:20:07
243
原创 Java EE学习笔记 II——Web应用和web.xml文件
一、徒手构建Web应用 对于IDE工具,业内有个说法:IDE工具会加快高手的效率,也会使初学者更加白痴。所以,我们来暂时把IDE放一边,徒手构建一个简单的Web应用程序。 ①在任意目录下新建一个文件夹 ②在此文件夹内新建一个文件夹命名为WEB-INF(注意都是大写) ③进入Tomcat找到任意一个Web应用的WEB-INF文件夹下的web.xml文件复制到第②步的WEB-INF文
2016-10-18 22:05:00
433
原创 Java EE 学习笔记 I——Java EE 概述
一、Java EE应用的分层模型 层次 简介 Domain Object(领域对象)层 由POJO(普通的、传统的Java对象)组成 DAO(数据访问对象)层 由DAO组件组成,它们实现了对数据库的一些原子操作 业务逻辑层 系统所需要的业务逻辑方法 控制器层 拦截用户请求,调用业务逻辑方法,处理用户请求并转发至表现层组件 表现层 由JSP页面,Veloc
2016-10-18 18:42:13
585
原创 POJ 1005
Description Fred Mapper is considering purchasing some land in Louisiana to build his house on. In the process of investigating the land, he learned that the state of Louisiana is actually shrinkin
2015-06-12 00:36:29
257
原创 我的QT入门——QT版简单计算器
支持累加、累乘、归零的简单计算器...刚接触QT,贴上代码... #ifndef MAINWINDOW_H //mainwindow.h #define MAINWINDOW_H #include namespace Ui { class MainWindow; } class MainWindow : public QMainWindow { Q_OBJECT public:
2015-06-09 23:53:01
1461
原创 POJ 1006
Description Some people believe that there are three cycles in a person's life that start the day he or she is born. These three cycles are the physical, emotional, and intellectual cycles, and the
2015-06-09 19:28:56
273
原创 POJ 1004(EASY)
...这题真的很水...当一篇流水账好咯~#include #include using namespace std; int main() { float a[12]; float sum = 0.00; for (int i = 0; i < 12; i++) { cin >> a[i]; sum += a[i]; } cout << "$"<<setiosflag
2015-06-08 17:53:24
273
原创 POJ 1007
#include #include #include using namespace std; //696K 0MS int main() { int m, n; cin >> n >> m; vectora(m); a.reserve(m); vectort(m); t.reserve(m); vectortem(m); tem.reserve(m); c
2015-06-08 12:07:37
209
原创 POJ 1003
//刚接触算法,想在博客上记录下自己的POJ历程(虽然刚开始刷)#include using namespace std; const int size = 300; //快速排序 void Qsort(int a[], int low, int high) { if (low >= high) { return; } int first = low; int last = h
2015-06-08 09:36:28
303
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人