Mysql高级-day04
Mysql高级-day041. MySql中常用工具
1.1 mysql
该mysql不是指mysql服务,而是指mysql的客户端工具。
语法 :
mysql 1.1.1 连接选项
参数 :
-u, --user=name 指定用户名
-p, --password[=name] 指定密码
-h, --host=name 指定服务器IP或域名
-P, --port=# 指定连接端口
示例 :
mysql -h 127.0.0.1 -P 3306 -u root -p
mysql -h127.0.0.1 -P3306 -uroot -p2143
1.1.2 执行选项
-e, --execute=name 执行SQL语句并退出此选项可以在Mysql客户端执行SQL语句,而不用连接到MySQL数据库再执行,对于一些批处理脚本,这种方式尤其方便。
示例:
mysql -uroot -p2143 db01 -e "select * from tb_book";https://img2023.cnblogs.com/blog/401339/202410/401339-20241019170927269-633808149.png
1.2 mysqladmin
mysqladmin 是一个执行管理操纵的客户端程序。可以用它来检查服务器的设置和当前状态、创建并删除数据库等。
可以通过 : mysqladmin --help指令查察帮助文档
https://img2023.cnblogs.com/blog/401339/202410/401339-20241019170927311-1346146870.png
示例 :
mysqladmin -uroot -p2143 create 'test01';
mysqladmin -uroot -p2143 drop 'test01';
mysqladmin -uroot -p2143 version;
1.3 mysqlbinlog
由于服务器生成的二进制日记文件以二进制格式保存,所以如果想要检查这些文本的文本格式,就会使用到mysqlbinlog 日记管理工具。
语法 :
mysqlbinlog log-files1 log-files2 ...
选项:
-d, --database=name : 指定数据库名称,只列出指定的数据库相关操作。
-o, --offset=# : 忽略掉日志中的前n行命令。
-r,--result-file=name : 将输出的文本格式日志输出到指定文件。
-s, --short-form : 显示简单格式, 省略掉一些信息。
--start-datatime=date1--stop-datetime=date2 : 指定日期间隔内的所有日志。
--start-position=pos1 --stop-position=pos2 : 指定位置间隔内的所有日志。1.4 mysqldump
mysqldump 客户端工具用来备份数据库或在不同数据库之间进行数据迁移。备份内容包含创建表,及插入表的SQL语句。
语法 :
mysqldump db_name
mysqldump --database/-B db1
mysqldump --all-databases/-A1.4.1 连接选项
参数 :
-u, --user=name 指定用户名
-p, --password[=name] 指定密码
-h, --host=name 指定服务器IP或域名
-P, --port=# 指定连接端口1.4.2 输出内容选项
参数:
--add-drop-database 在每个数据库创建语句前加上 Drop database 语句
--add-drop-table 在每个表创建语句前加上 Drop table 语句 , 默认开启 ; 不开启 (--skip-add-drop-table)
-n, --no-create-db 不包含数据库的创建语句
-t, --no-create-info 不包含数据表的创建语句
-d --no-data 不包含数据
-T, --tab=name 自动生成两个文件:一个.sql文件,创建表结构的语句;
一个.txt文件,数据文件,相当于select into outfile示例 :
mysqldump -uroot -p2143 db01 tb_book --add-drop-database --add-drop-table > a
mysqldump -uroot -p2143 -T /tmp test city1.5 mysqlimport/source
mysqlimport 是客户端数据导入工具,用来导入mysqldump 加 -T 参数后导出的文本文件。
语法:
mysqlimport db_nametextfile1示例:
mysqlimport -uroot -p2143 test /tmp/city.txt如果需要导入sql文件,可以使用mysql中的source 指令 :
source /root/tb_book.sql1.6 mysqlshow
mysqlshow 客户端对象查找工具,用来很快地查找存在哪些数据库、数据库中的表、表中的列或者索引。
语法:
mysqlshow ]]参数:
--count 显示数据库及表的统计信息(数据库,表 均可以不指定)
-i 显示指定数据库或者指定表的状态信息示例:
#查询每个数据库的表的数量及表中记录的数量
mysqlshow -uroot -p2143 --count
#查询test库中每个表中的字段书,及行数
mysqlshow -uroot -p2143 test --count
#查询test库中book表的详细情况
mysqlshow -uroot -p2143 test book --count2. Mysql 日记
在任何一种数据库中,都会有各种各样的日记,记载着数据库工作的方方面面,以帮助数据库管理员追踪数据库曾经发生过的各种事件。MySQL 也不例外,在 MySQL 中,有 4 种不同的日记,分别是错误日记、二进制日记(BINLOG 日记)、查询日记和慢查询日记,这些日记记载着数据库在不同方面的踪迹。
2.1 错误日记
错误日记是 MySQL 中最重要的日记之一,它记载了当 mysqld 启动和停止时,以及服务器在运行过程中发生任何严重错误时的相关信息。当数据库出现任何以障导致无法正常使用时,可以起首查察此日记。
该日记是默认开启的 , 默认存放目录为 mysql 的数据目录(var/lib/mysql), 默认的日记文件名为hostname.err(hostname是主机名)。
查察日记位置指令 :
show variables like 'log_error%';https://img2023.cnblogs.com/blog/401339/202410/401339-20241019170927289-44335895.png
查察日记内容 :
tail -f /var/lib/mysql/xaxh-server.errhttps://img2023.cnblogs.com/blog/401339/202410/401339-20241019170927375-1355904218.png
2.2 二进制日记
2.2.1概述
二进制日记(BINLOG)记载了所有的 DDL(数据定义语言)语句和 DML(数据操纵语言)语句,但是不包括数据查询语句。此日记对于灾难时的数据规复起着极其重要的作用,MySQL的主从复制, 就是通过该binlog实现的。
二进制日记,默认情况下是没有开启的,需要到MySQL的设置文件中开启,并设置MySQL日记的格式。
设置文件位置 : /usr/my.cnf
日记存放位置 : 设置时,给定了文件名但是没有指定路径,日记默认写入Mysql的数据目录。
#配置开启binlog日志, 日志的文件前缀为 mysqlbin -----> 生成的文件名如 : mysqlbin.000001,mysqlbin.000002
log_bin=mysqlbin
#配置二进制日志的格式
binlog_format=STATEMENT2.2.2 日记格式
STATEMENT
该日记格式在日记文件中记载的都是SQL语句(statement),每一条对数据进行修改的SQL都会记载在日记文件中,通过Mysql提供的mysqlbinlog工具,可以清楚的查察到每条语句的文本。主从复制的时候,从库(slave)会将日记解析为原文本,并在从库重新执行一次。
ROW
该日记格式在日记文件中记载的是每一行的数据变更,而不是记载SQL语句。比如,执行SQL语句 : update tb_book set status='1' , 如果是STATEMENT 日记格式,在日记中会记载一行SQL文件; 如果是ROW,由于是对全表进行更新,也就是每一行记载都会发生变更,ROW 格式的日记中会记载每一行的数据变更。
MIXED
这是目前MySQL默认的日记格式,即混合了STATEMENT 和 ROW两种格式。默认情况下采用STATEMENT,但是在一些特别情况下采用ROW来进行记载。MIXED 格式能只管使用两种模式的长处,而避开他们的缺点。
2.2.3 日记读取
由于日记以二进制方式存储,不能直接读取,需要用mysqlbinlog工具来查察,语法如下 :
mysqlbinlog log-file;查察STATEMENT格式日记
执行插入语句 :
insert into tb_book values(null,'Lucene','2088-05-01','0');查察日记文件 :
https://img2023.cnblogs.com/blog/401339/202410/401339-20241019170927332-1075771062.png
mysqlbin.index : 该文件是日记索引文件 , 记载日记的文件名;
mysqlbing.000001 :日记文件
查察日记内容 :
mysqlbinlog mysqlbing.000001;https://img2023.cnblogs.com/blog/401339/202410/401339-20241019170927354-1839872312.png
查察ROW格式日记
设置 :
#配置开启binlog日志, 日志的文件前缀为 mysqlbin -----> 生成的文件名如 : mysqlbin.000001,mysqlbin.000002
log_bin=mysqlbin
#配置二进制日志的格式
binlog_format=ROW插入数据 :
insert into tb_book values(null,'SpringCloud实战','2088-05-05','0');如果日记格式是 ROW , 直接查察数据 , 是查察不懂的 ; 可以在mysqlbinlog 后面加上参数 -vv
mysqlbinlog -vv mysqlbin.000002 https://img2023.cnblogs.com/blog/401339/202410/401339-20241019170927413-801775280.png
2.2.4 日记删除
对于比较繁忙的系统,由于每天生成日记量大 ,这些日记如果长时间不清楚,将会占用大量的磁盘空间。下面我们将会讲解几种删除日记的常见方法 :
方式一
通过 Reset Master 指令删除全部 binlog 日记,删除之后,日记编号,将从 xxxx.000001重新开始 。
查询之前 ,先查询下日记文件 :
https://img2023.cnblogs.com/blog/401339/202410/401339-20241019170927374-1828275237.png
执行删除日记指令:
Reset Master执行之后, 查察日记文件 :
https://img2023.cnblogs.com/blog/401339/202410/401339-20241019170927355-365443496.png
方式二
执行指令purgemaster logs to 'mysqlbin.******' ,该命令将删除 ****** 编号之前的所有日记。
方式三
执行指令purge master logs before 'yyyy-mm-dd hh24:mi:ss' ,该命令将删除日记为 "yyyy-mm-dd hh24:mi:ss" 之前产生的所有日记 。
方式四
设置参数 --expire_logs_days=# ,此参数的含义是设置日记的逾期天数, 过了指定的天数后日记将会被自动删除,这样将有利于减少DBA 管理日记的工作量。
设置如下 :
https://img2023.cnblogs.com/blog/401339/202410/401339-20241019170927310-1443508776.png
2.3 查询日记
查询日记中记载了客户端的所有操纵语句,而二进制日记不包含查询数据的SQL语句。
默认情况下, 查询日记是未开启的。如果需要开启查询日记,可以设置以下设置 :
#该选项用来开启查询日志 , 可选值 : 0 或者 1 ; 0 代表关闭, 1 代表开启
general_log=1
#设置日志的文件名 , 如果没有指定, 默认的文件名为 host_name.log
general_log_file=file_name在 mysql 的设置文件 /usr/my.cnf 中设置如下内容 :
https://img2023.cnblogs.com/blog/401339/202410/401339-20241019170927330-1671191521.png
设置完毕之后,在数据库执行以下操纵 :
select * from tb_book;
select * from tb_book where id = 1;
update tb_book set name = 'lucene入门指南' where id = 5;
select * from tb_book where id < 8;执行完毕之后, 再次来查询日记文件 :
https://img2023.cnblogs.com/blog/401339/202410/401339-20241019170927376-72524692.png
2.4 慢查询日记
慢查询日记记载了所有执行时间超过参数 long_query_time 设置值而且扫描记载数不小于 min_examined_row_limit 的所有的SQL语句的日记。long_query_time 默认为 10 秒,最小为 0, 精度可以到微秒。
2.4.1 文件位置和格式
慢查询日记默认是关闭的 。可以通过两个参数来控制慢查询日记 :
# 该参数用来控制慢查询日志是否开启, 可取值: 1 和 0 , 1 代表开启, 0 代表关闭
slow_query_log=1
# 该参数用来指定慢查询日志的文件名
slow_query_log_file=slow_query.log
# 该选项用来配置查询的时间限制, 超过这个时间将认为值慢查询, 将需要进行日志记录, 默认10s
long_query_time=102.4.2 日记的读取
和错误日记、查询日记一样,慢查询日记记载的格式也是纯文本,可以被直接读取。
1) 查询long_query_time 的值。
https://img2023.cnblogs.com/blog/401339/202410/401339-20241019170927330-1401498289.png
2) 执行查询操纵
select id, title,price,num ,status from tb_item where id = 1;https://img2023.cnblogs.com/blog/401339/202410/401339-20241019170927331-1945746160.png
由于该语句执行时间很短,为0s , 所以不会记载在慢查询日记中。
select * from tb_item where title like '%阿尔卡特 (OT-927) 炭黑 联通3G手机 双卡双待165454%' ;https://img2023.cnblogs.com/blog/401339/202410/401339-20241019170927276-1586592647.png
该SQL语句 , 执行时长为 26.77s ,超过10s , 所以会记载在慢查询日记文件中。
3) 查察慢查询日记文件
直接通过cat 指令查询该日记文件 :
https://img2023.cnblogs.com/blog/401339/202410/401339-20241019170927375-1490933042.png
如果慢查询日记内容很多, 直接查察文件,比较麻烦, 这个时候可以借助于mysql自带的 mysqldumpslow 工具, 来对慢查询日记进行分类汇总。
https://img2023.cnblogs.com/blog/401339/202410/401339-20241019170927419-278153914.png
3. Mysql复制
3.1 复制概述
复制是指将主数据库的DDL 和 DML 操纵通过二进制日记传到从库服务器中,然后在从库上对这些日记重新执行(也叫重做),从而使得从库和主库的数据保持同步。
MySQL支持一台主库同时向多台从库进行复制, 从库同时也可以作为其他从服务器的主库,实现链状复制。
3.2 复制原理
MySQL 的主从复制原理如下。
https://img2023.cnblogs.com/blog/401339/202410/401339-20241019170927295-1941229352.jpg
从上层来看,复制分成三步:
[*]Master 主库在事务提交时,会把数据变更作为时间 Events 记载在二进制日记文件 Binlog 中。
[*]主库推送二进制日记文件 Binlog 中的日记事件到从库的中继日记 Relay Log 。
[*]slave重做中继日记中的事件,将改变反映它自己的数据。
3.3 复制上风
MySQL 复制的有点重要包含以下三个方面:
[*]主库出现题目,可以快速切换到从库提供服务。
[*]可以在从库上执行查询操纵,从主库中更新,实现读写分离,低落主库的访问压力。
[*]可以在从库中执行备份,以制止备份期间影响主库的服务。
3.4 搭建步调
3.4.1 master
1) 在master 的设置文件(/usr/my.cnf)中,设置如下内容:
#mysql 服务ID,保证整个集群环境中唯一
server-id=1
#mysql binlog 日志的存储路径和文件名
log-bin=/var/lib/mysql/mysqlbin
#错误日志,默认已经开启
#log-err
#mysql的安装目录
#basedir
#mysql的临时目录
#tmpdir
#mysql的数据存放目录
#datadir
#是否只读,1 代表只读, 0 代表读写
read-only=0
#忽略的数据, 指不需要同步的数据库
binlog-ignore-db=mysql
#指定同步的数据库
#binlog-do-db=db012) 执行完毕之后,需要重启Mysql:
service mysql restart ;3) 创建同步数据的账户,而且进行授权操纵:
grant replication slave on *.* to 'itcast'@'192.168.192.131' identified by 'itcast';
flush privileges;4) 查察master状态:
show master status;https://img2023.cnblogs.com/blog/401339/202410/401339-20241019170927376-1634259758.png
字段含义:
File : 从哪个日志文件开始推送日志文件
Position : 从哪个位置开始推送日志
Binlog_Ignore_DB : 指定不需要同步的数据库3.4.2 slave
1) 在 slave 端设置文件中,设置如下内容:
#mysql服务端ID,唯一
server-id=2
#指定binlog日志
log-bin=/var/lib/mysql/mysqlbin2)执行完毕之后,需要重启Mysql:
service mysql restart;3) 执行如下指令 :
change master to master_host= '192.168.192.130', master_user='itcast', master_password='itcast', master_log_file='mysqlbin.000001', master_log_pos=413;指定当前从库对应的主库的IP所在,用户名,密码,从哪个日记文件开始的那个位置开始同步推送日记。
4) 开启同步操纵
start slave;
show slave status;https://img2023.cnblogs.com/blog/401339/202410/401339-20241019170927418-1719183801.png
5) 停止同步操纵
stop slave;3.4.3 验证同步操纵
1) 在主库中创建数据库,创建表,并插入数据 :
create database db01;
user db01;
create table user(
id int(11) not null auto_increment,
name varchar(50) not null,
sex varchar(1),
primary key (id)
)engine=innodb default charset=utf8;
insert into user(id,name,sex) values(null,'Tom','1');
insert into user(id,name,sex) values(null,'Trigger','0');
insert into user(id,name,sex) values(null,'Dawn','1');2) 在从库中查询数据,进行验证 :
在从库中,可以查察到刚才创建的数据库:
https://img2023.cnblogs.com/blog/401339/202410/401339-20241019170927352-241049375.png
在该数据库中,查询user表中的数据:
https://img2023.cnblogs.com/blog/401339/202410/401339-20241019170927421-114361488.png
4. 综合案例
4.1 需求分析
在业务系统中,需要记载当前业务系统的访问日记,该访问日记包含:操纵人,操纵时间,访问类,访问方法,哀求参数,哀求结果,哀求结果范例,哀求时长 等信息。记载详细的系统访问日记,重要便于对系统中的用户哀求进行追踪,而且在系统 的管理后台可以查察到用户的访问记载。
记载系统中的日记信息,可以通过Spring 框架的AOP来实现。详细的哀求处理流程,如下:
https://img2023.cnblogs.com/blog/401339/202410/401339-20241019170927353-1451380656.png
4.2 搭建案例情况
4.2.1 数据库表
CREATE DATABASE mysql_demo DEFAULT CHARACTER SET utf8mb4 ;
CREATE TABLE `brand` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL COMMENT '品牌名称',
`first_char` varchar(1) DEFAULT NULL COMMENT '品牌首字母',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `item` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '商品id',
`title` varchar(100) NOT NULL COMMENT '商品标题',
`price` double(10,2) NOT NULL COMMENT '商品价格,单位为:元',
`num` int(10) NOT NULL COMMENT '库存数量',
`categoryid` bigint(10) NOT NULL COMMENT '所属类目,叶子类目',
`status` varchar(1) DEFAULT NULL COMMENT '商品状态,1-正常,2-下架,3-删除',
`sellerid` varchar(50) DEFAULT NULL COMMENT '商家ID',
`createtime` datetime DEFAULT NULL COMMENT '创建时间',
`updatetime` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='商品表';
CREATE TABLE `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(45) NOT NULL,
`password` varchar(96) NOT NULL,
`name` varchar(45) NOT NULL,
`birthday` datetime DEFAULT NULL,
`sex` char(1) DEFAULT NULL,
`email` varchar(45) DEFAULT NULL,
`phone` varchar(45) DEFAULT NULL,
`qq` varchar(32) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `operation_log` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`operate_class` varchar(200) DEFAULT NULL COMMENT '操作类',
`operate_method` varchar(200) DEFAULT NULL COMMENT '操作方法',
`return_class` varchar(200) DEFAULT NULL COMMENT '返回值类型',
`operate_user` varchar(20) DEFAULT NULL COMMENT '操作用户',
`operate_time` varchar(20) DEFAULT NULL COMMENT '操作时间',
`param_and_value` varchar(500) DEFAULT NULL COMMENT '请求参数名及参数值',
`cost_time` bigint(20) DEFAULT NULL COMMENT '执行方法耗时, 单位 ms',
`return_value` varchar(200) DEFAULT NULL COMMENT '返回值',
PRIMARY KEY (`id`)
) ENGINE=InnoDBDEFAULT CHARSET=utf8mb4;4.2.2 pom.xml
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<spring.version>5.0.2.RELEASE</spring.version>
<slf4j.version>1.6.6</slf4j.version>
<log4j.version>1.2.12</log4j.version>
<mybatis.version>3.4.5</mybatis.version>
</properties>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.6.8</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.16.16</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>${mybatis.version}</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>1.3.0</version>
</dependency>
<dependency>
<groupId>c3p0</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.1.2</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.5</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.9.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.9.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> <port>8080</port>
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> <path>/</path>
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> <uriEncoding>utf-8</uriEncoding>
</configuration>
</plugin>
</plugins>
</build>4.2.3 web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
<filter>
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav><filter-name>CharacterEncodingFilter</filter-name>
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav><filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav><init-param>
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><param-name>encoding</param-name>
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><param-value>utf-8</param-value>
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav></init-param>
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav><init-param>
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><param-name>forceEncoding</param-name>
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><param-value>true</param-value>
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav></init-param>
</filter>
<filter-mapping>
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav><filter-name>CharacterEncodingFilter</filter-name>
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav><url-pattern>/*</url-pattern>
</filter-mapping>
<context-param>
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav><param-name>contextConfigLocation</param-name>
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav><param-value>classpath:applicationContext.xml</param-value>
</context-param>
<listener>
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav><listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav><servlet-name>springmvc</servlet-name>
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav><servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav><init-param>
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><param-name>contextConfigLocation</param-name>
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><param-value>classpath:springmvc.xml</param-value>
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav></init-param>
</servlet>
<servlet-mapping>
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav><servlet-name>springmvc</servlet-name>
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav><url-pattern>*.do</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>log-datalist.html</welcome-file>
</welcome-file-list>
</web-app>4.2.4 db.properties
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://192.168.142.128:3306/mysql_demo
jdbc.username=root
jdbc.password=itcast4.2.5 applicationContext.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans> http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans> http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans> http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<context:property-placeholder location="classpath:db.properties"/>
<context:component-scan base-package="cn.itcast">
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav><context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller">
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav></context:exclude-filter>
</context:component-scan>
<bean id="sqlSessionFactory" >
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav><property name="dataSource" ref="dataSource"/>
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav><property name="typeAliasesPackage" value="cn.itcast.pojo"/>
</bean>
<bean id="dataSource" >
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav><property name="driverClass" value="${jdbc.driver}"></property>
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav><property name="jdbcUrl" value="${jdbc.url}"></property>
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav><property name="user" value="${jdbc.username}"></property>
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav><property name="password" value="${jdbc.password}"></property>
</bean>
<bean >
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav><property name="basePackage" value="cn.itcast.mapper"/>
</bean>
<bean id="transactionManager" >
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav><property name="dataSource" ref="dataSource"/>
</bean>
<tx:annotation-driven transaction-manager="transactionManager"></tx:annotation-driven>
</beans>4.2.6 springmvc.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans>4.2.7 导入基础工程
https://img2023.cnblogs.com/blog/401339/202410/401339-20241019170927416-1120497655.png
4.3 通过AOP记载操纵日记
4.3.1 自定义注解
通过自定义注解,来标示方法需不需要进行记载日记,如果该方法在访问时需要记载日记,则在该方法上标示该注解既可。
@Inherited
@Documented
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface OperateLog {
}4.3.2 定义通知类
@Component@Aspectpublic class OperateAdvice { private static Logger log = Logger.getLogger(OperateAdvice.class); @Autowired private OperationLogService operationLogService; @Around("execution(* cn.itcast.controller.*.*(..)) && @annotation(operateLog)") public Object insertLogAround(ProceedingJoinPoint pjp , OperateLog operateLog) throws Throwable{ System.out.println(" ************************ 记载日记 ****************************** ");<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans>OperationLog op = new OperationLog();<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans>DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); op.setOperateTime(sdf.format(new Date())); op.setOperateUser(DataUtils.getRandStr(8));<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans>op.setOperateClass(pjp.getTarget().getClass().getName()); op.setOperateMethod(pjp.getSignature().getName());<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans>//获取方法调用时传递的参数 Object[] args = pjp.getArgs(); op.setParamAndValue(Arrays.toString(args)); long start_time = System.currentTimeMillis(); //放行 Object object = pjp.proceed(); long end_time = System.currentTimeMillis(); op.setCostTime(end_time - start_time); if(object != null){ <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> op.setReturnClass(object.getClass().getName()); <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> op.setReturnValue(object.toString()); }else{ <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> op.setReturnClass("java.lang.Object"); <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> op.setParamAndValue("void"); } log.error(JsonUtils.obj2JsonString(op)); operationLogService.insert(op);<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans>System.out.println(" ************************** 记载日记 *************************** ");<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans>return object; } }4.3.3 方法上加注解
在需要记载日记的方法上加上注解@OperateLog。
@OperateLog
@RequestMapping("/insert")
public Result insert(@RequestBody Brand brand){
try {
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>brandService.insert(brand);
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>return new Result(true,"操作成功");
} catch (Exception e) {
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>e.printStackTrace();
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>return new Result(false,"操作失败");
}
}4.4 日记查询后端代码实现
4.4.1 Mapper接口
public interface OperationLogMapper {
public void insert(OperationLog operationLog);
public List<OperationLog> selectListByCondition(Map dataMap);
public Long countByCondition(Map dataMap);
}4.4.2 Mapper.xml 映射设置文件
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans>INSERT INTO operation_log(id,return_value,return_class,operate_user,operate_time,param_and_value, <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>operate_class,operate_method,cost_time) VALUES(NULL,#{returnValue},#{returnClass},#{operateUser},#{operateTime},#{paramAndValue}, <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>#{operateClass},#{operateMethod},#{costTime})<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans>select <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>id , <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>operate_class as operateClass , <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>operate_method as operateMethod, <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>return_class as returnClass, <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>operate_user as operateUser, <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>operate_time as operateTime, <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>param_and_value as paramAndValue, <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>cost_time as costTime, <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>return_value as returnValue from operation_log<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans>limit #{start},#{size}<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans> select count(*) from operation_log<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans> and operate_class = #{operateClass}<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans> and operate_method = #{operateMethod}<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans> and return_class = #{returnClass}<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans> and cost_time =#{costTime}<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans>4.4.3 Service
@Service@Transactionalpublic class OperationLogService { //private static Logger logger = Logger.getLogger(OperationLogService.class); @Autowired private OperationLogMapper operationLogMapper; //插入数据 public void insert(OperationLog operationLog){ <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>operationLogMapper.insert(operationLog); } //根据条件查询 public PageResult selectListByCondition(Map dataMap, Integer pageNum , Integer pageSize){ if(paramMap ==null){<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans>paramMap = new HashMap(); <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>} <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>paramMap.put("start" , (pageNum-1)*rows); <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>paramMap.put("rows",rows); <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>Object costTime = paramMap.get("costTime"); <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>if(costTime != null){<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans>if("".equals(costTime.toString())){<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans> paramMap.put("costTime",null);<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans>}else{<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans> paramMap.put("costTime",new Long(paramMap.get("costTime").toString()));<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans>} <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>} <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>System.out.println(dataMap); <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>long countStart = System.currentTimeMillis(); <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>Long count = operationLogMapper.countByCondition(dataMap); <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>long countEnd = System.currentTimeMillis(); <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>System.out.println("Count Cost Time : " + (countEnd-countStart)+" ms"); <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>List list = operationLogMapper.selectListByCondition(dataMap); <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>long queryEnd = System.currentTimeMillis(); <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>System.out.println("Query Cost Time : " + (queryEnd-countEnd)+" ms"); <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>return new PageResult(count,list); }}4.4.4 Controller
@RestController
@RequestMapping("/operationLog")
public class OperationLogController {
@Autowired
private OperationLogService operationLogService;
@RequestMapping("/findList")
public PageResult findList(@RequestBody Map dataMap, Integer pageNum , Integer pageSize){
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>PageResult page = operationLogService.selectListByCondition(dataMap, pageNum, pageSize);
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>return page;
}
}4.5 日记查询前端代码实现
前端代码使用 BootStrap + AdminLTE 进行布局, 使用Vuejs 进行视图层展示。
4.5.1 js
4.5.2 列表数据展示
<tr v-for="item in dataList">
<td><input name="ids" type="checkbox"></td>
<td>{{item.id}}</td>
<td>{{item.operateClass}}</td>
<td>{{item.operateMethod}}</td>
<td>{{item.returnClass}}</td>
<td>{{item.returnValue}}</td>
<td>{{item.operateUser}}</td>
<td>{{item.operateTime}}</td>
<td>{{item.costTime}}</td>
<td >
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav><button type="button" >详情</button>
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav><button type="button" >删除</button>
</td>
</tr>4.5.3 分页插件
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>4.6 联调测试
可以通过postman来访问业务系统,再查察数据库中的日记信息,验证能不能将用户的访问日记记载下来。
https://img2023.cnblogs.com/blog/401339/202410/401339-20241019170927417-1054458834.png
4.7 分析性能题目
系统中用户访问日记的数据量,随着时间的推移,这张表的数据量会越来越大,因此我们需要根据业务需求,来对日记查询模块的性能进行优化。
1) 分页查询优化
由于在进行日记查询时,是进行分页查询,那也就意味着,在查察时,至少需要查询两次:
A. 查询符合条件的总记载数。--> count 操纵
B. 查询符合条件的列表数据。--> 分页查询 limit 操纵
通常来说,count() 都需要扫描大量的行(意味着需要访问大量的数据)才能获得精确的结果,因此是很难对该SQL进行优化操纵的。如果需要对count进行优化,可以采用另外一种思路,可以增加汇总表,或者redis缓存来专门记载该表对应的记载数,这样的话,就可以很轻松的实现汇总数据的查询,而且效率很高,但是这种统计并不能保证百分之百的正确 。对于数据库的操纵,“快速、精确、实现简单”,三者永久只能满足其二,必须舍掉其中一个。
2) 条件查询优化
针对于条件查询,需要对查询条件,及排序字段建立索引。
3) 读写分离
通过主从复制集群,来完成读写分离,使写操纵走主节点, 而读操纵,走从节点。
4) MySQL服务器优化
5) 应用优化
4.8 性能优化 - 分页
4.8.1 优化count
创建一张表用来记载日记表的总数据量:
create table log_counter(
logcount bigint not null
)engine = innodb default CHARSET = utf8;在每次插入数据之后,更新该表 :
<update id="updateLogCounter" >
update log_counter set logcount = logcount + 1
</update>在进行分页查询时, 获取总记载数,从该表中查询既可。
<select id="countLogFromCounter" resultType="long">
select logcount from log_counter limit 1
</select>4.8.2 优化 limit
在进行分页时,一般通过创建覆盖索引,可以或许比较好的进步性能。一个非常常见,而又非常头疼的分页场景就是 "limit 1000000,10" ,此时MySQL需要搜索出前1000010 条记载后,仅仅需要返回第 1000001 到 1000010 条记载,前1000000 记载会被抛弃,查询代价非常大。
https://img2023.cnblogs.com/blog/401339/202410/401339-20241019170927350-2049894381.png
当点击比较靠后的页码时,就会出现这个题目,查询效率非常慢。
优化SQL:
select * from operation_log limit 3000000 , 10;将上述SQL优化为 :
select * from operation_log t , (select id from operation_log order by id limit 3000000,10) b where t.id = b.id ;select id , operate_class as operateClass , operate_method as operateMethod, return_class as returnClass, operate_user as operateUser, operate_time as operateTime, param_and_value as paramAndValue, cost_time as costTime, return_value as returnValuefrom operation_log t, (select id from operation_log <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> order by id limit #{start},#{rows}) bwhere t.id = b.id4.9 性能优化 - 索引
https://img2023.cnblogs.com/blog/401339/202410/401339-20241019170927286-1215931560.png
当根据操纵人进行查询时, 查询的效率很低,耗时比较长。原因就是因为在创建数据库表布局时,并没有针对于 操纵人 字段建立索引。
CREATE INDEX idx_user_method_return_cost ON operation_log(operate_user,operate_method,return_class,cost_time);同上 , 为了查询效率高,我们也需要对 操纵方法、返回值范例、操纵耗时 等字段进行创建索引,以进步查询效率。
CREATE INDEX idx_optlog_method_return_cost ON operation_log(operate_method,return_class,cost_time);
CREATE INDEX idx_optlog_return_cost ON operation_log(return_class,cost_time);
CREATE INDEX idx_optlog_cost ON operation_log(cost_time);4.10 性能优化 - 排序
在查询数据时,如果业务需求中需要我们对结果内容进行了排序处理 , 这个时候,我们还需要对排序的字段建立得当的索引, 来进步排序的效率 。
4.11 性能优化 - 读写分离
4.11.1 概述
在Mysql主从复制的基础上,可以使用读写分离来低落单台Mysql节点的压力,从而来进步访问效率,读写分离的架构如下:
https://img2023.cnblogs.com/blog/401339/202410/401339-20241019170927309-674477655.png
对于读写分离的实现,可以通过Spring AOP 来进举措态的切换数据源,进行操纵 :
4.11.2 实现方式
db.properties
jdbc.write.driver=com.mysql.jdbc.Driver
jdbc.write.url=jdbc:mysql://192.168.142.128:3306/mysql_demo
jdbc.write.username=root
jdbc.write.password=itcast
jdbc.read.driver=com.mysql.jdbc.Driver
jdbc.read.url=jdbc:mysql://192.168.142.129:3306/mysql_demo
jdbc.read.username=root
jdbc.read.password=itcastapplicationContext-datasource.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans>ChooseDataSource
public class ChooseDataSource extends AbstractRoutingDataSource { public static Map METHOD_TYPE_MAP = new HashMap(); /** * 实现父类中的抽象方法,获取数据源名称 * @return */ protected Object determineCurrentLookupKey() { <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>return DataSourceHandler.getDataSource(); } // 设置方法名前缀对应的数据源 public void setMethodType(Map map) { <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>for (String key : map.keySet()) {<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans>List v = new ArrayList();<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans>String[] types = map.get(key).split(",");<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans>for (String type : types) {<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans> if (!StringUtils.isEmpty(type)) {<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans> <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>v.add(type);<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans> }<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans>}<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans>METHOD_TYPE_MAP.put(key, v); <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>} <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>System.out.println("METHOD_TYPE_MAP : "+METHOD_TYPE_MAP); }}DataSourceHandler
public class DataSourceHandler { // 数据源名称 public static final ThreadLocal holder = new ThreadLocal(); /** * 在项目启动的时候将设置的读、写数据源加到holder中 */ public static void putDataSource(String datasource) { <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>holder.set(datasource); } /** * 从holer中获取数据源字符串 */ public static String getDataSource() { <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>return holder.get(); }}DataSourceAspect
@Aspect@Component@Order(-9999)@EnableAspectJAutoProxy(proxyTargetClass = true)public class DataSourceAspect { protected Logger logger = LoggerFactory.getLogger(this.getClass()); /** * 设置前置通知,使用在方法aspect()上注册的切入点 */ @Before("execution(* cn.itcast.service.*.*(..))") @Order(-9999) public void before(JoinPoint point) {<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans> String className = point.getTarget().getClass().getName(); <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>String method = point.getSignature().getName(); <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>logger.info(className + "." + method + "(" + Arrays.asList(point.getArgs())+ ")"); <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>try {<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans>for (String key : ChooseDataSource.METHOD_TYPE_MAP.keySet()) {<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans> for (String type : ChooseDataSource.METHOD_TYPE_MAP.get(key)) {<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans> <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>if (method.startsWith(type)) {<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans>System.out.println("key : " + key);<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans>DataSourceHandler.putDataSource(key);<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans>break;<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans> <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>}<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans> }<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans>} <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>} catch (Exception e) {<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/beans/spring-beans.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/mvc/spring-mvc.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/aop/spring-aop.xsd
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context
<zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav> http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="cn.itcast.controller"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<aop:aspectj-autoproxy />
</beans>e.printStackTrace(); <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
v-bind:max-page="maxPage"v-on:pagehandler="pageHandler">
</zpagenav>} }}通过 @Order(-9999) 注解来控制事务管理器, 与该通知类的加载顺序 , 需要让通知类 , 先加载 , 来判定使用哪个数据源 .
4.11.3 验证
在主库和从库中,执行如下SQL语句,来查察是否读的时候, 从从库中读取 ; 写入操纵的时候,是否写入到主库。
show status like 'Innodb_rows_%' ;https://img2023.cnblogs.com/blog/401339/202410/401339-20241019170927374-99678670.png
4.11.4 原理
https://img2023.cnblogs.com/blog/401339/202410/401339-20241019170927414-10249199.png
4.12 性能优化 - 应用优化
4.12.1 缓存
可以在业务系统中使用redis来做缓存,缓存一些基础性的数据,来低落关系型数据库的压力,进步访问效率。
4.12.2 全文检索
如果业务系统中的数据量比较大(到达万万级别),这个时候,如果再对数据库进行查询,特别是进行分页查询,速度将变得很慢(因为在分页时起首需要count求合计数),为了进步访问效率,这个时候,可以考虑加入Solr 或者 ElasticSearch全文检索服务,来进步访问效率。
4.13.3 非关系数据库
也可以考虑将非焦点(重要)数据,存在 MongoDB 中,这样可以进步插入以及查询的效率。
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页:
[1]