Mysql高级-day04

  金牌会员 | 2024-10-19 15:21:24 | 显示全部楼层 | 阅读模式
打印 上一主题 下一主题

主题 805|帖子 805|积分 2415

Mysql高级-day04

1. MySql中常用工具

1.1 mysql

该mysql不是指mysql服务,而是指mysql的客户端工具。
语法 :
  1. mysql [options] [database]
复制代码
1.1.1 连接选项
  1. 参数 :
  2.         -u, --user=name                        指定用户名
  3.         -p, --password[=name]        指定密码
  4.         -h, --host=name                        指定服务器IP或域名
  5.         -P, --port=#                        指定连接端口
  6. 示例 :
  7.         mysql -h 127.0.0.1 -P 3306 -u root -p
  8.        
  9.         mysql -h127.0.0.1 -P3306 -uroot -p2143
  10.        
复制代码
1.1.2 执行选项
  1. -e, --execute=name                执行SQL语句并退出
复制代码
此选项可以在Mysql客户端执行SQL语句,而不用连接到MySQL数据库再执行,对于一些批处理脚本,这种方式尤其方便。
  1. 示例:
  2.         mysql -uroot -p2143 db01 -e "select * from tb_book";
复制代码

1.2 mysqladmin

mysqladmin 是一个执行管理操纵的客户端程序。可以用它来检查服务器的设置和当前状态、创建并删除数据库等。
可以通过 : mysqladmin --help  指令查察帮助文档
  1. 示例 :
  2.         mysqladmin -uroot -p2143 create 'test01';  
  3.         mysqladmin -uroot -p2143 drop 'test01';
  4.         mysqladmin -uroot -p2143 version;
  5.        
复制代码
1.3 mysqlbinlog

由于服务器生成的二进制日记文件以二进制格式保存,所以如果想要检查这些文本的文本格式,就会使用到mysqlbinlog 日记管理工具。
语法 :
  1. mysqlbinlog [options]  log-files1 log-files2 ...
  2. 选项:
  3.        
  4.         -d, --database=name : 指定数据库名称,只列出指定的数据库相关操作。
  5.        
  6.         -o, --offset=# : 忽略掉日志中的前n行命令。
  7.        
  8.         -r,--result-file=name : 将输出的文本格式日志输出到指定文件。
  9.        
  10.         -s, --short-form : 显示简单格式, 省略掉一些信息。
  11.        
  12.         --start-datatime=date1  --stop-datetime=date2 : 指定日期间隔内的所有日志。
  13.        
  14.         --start-position=pos1 --stop-position=pos2 : 指定位置间隔内的所有日志。
复制代码
1.4 mysqldump

mysqldump 客户端工具用来备份数据库或在不同数据库之间进行数据迁移。备份内容包含创建表,及插入表的SQL语句。
语法 :
  1. mysqldump [options] db_name [tables]
  2. mysqldump [options] --database/-B db1 [db2 db3...]
  3. mysqldump [options] --all-databases/-A
复制代码
1.4.1 连接选项
  1. 参数 :
  2.         -u, --user=name                        指定用户名
  3.         -p, --password[=name]        指定密码
  4.         -h, --host=name                        指定服务器IP或域名
  5.         -P, --port=#                        指定连接端口
复制代码
1.4.2 输出内容选项
  1. 参数:
  2.         --add-drop-database                在每个数据库创建语句前加上 Drop database 语句
  3.         --add-drop-table                在每个表创建语句前加上 Drop table 语句 , 默认开启 ; 不开启 (--skip-add-drop-table)
  4.        
  5.         -n, --no-create-db                不包含数据库的创建语句
  6.         -t, --no-create-info        不包含数据表的创建语句
  7.         -d --no-data                        不包含数据
  8.        
  9.          -T, --tab=name                        自动生成两个文件:一个.sql文件,创建表结构的语句;
  10.                                                          一个.txt文件,数据文件,相当于select into outfile  
复制代码
  1. 示例 :
  2.         mysqldump -uroot -p2143 db01 tb_book --add-drop-database --add-drop-table > a
  3.        
  4.         mysqldump -uroot -p2143 -T /tmp test city
复制代码
1.5 mysqlimport/source

mysqlimport 是客户端数据导入工具,用来导入mysqldump 加 -T 参数后导出的文本文件。
语法:
  1. mysqlimport [options]  db_name  textfile1  [textfile2...]
复制代码
示例:
  1. mysqlimport -uroot -p2143 test /tmp/city.txt
复制代码
如果需要导入sql文件,可以使用mysql中的source 指令 :
  1. source /root/tb_book.sql
复制代码
1.6 mysqlshow

mysqlshow 客户端对象查找工具,用来很快地查找存在哪些数据库、数据库中的表、表中的列或者索引。
语法:
  1. mysqlshow [options] [db_name [table_name [col_name]]]
复制代码
参数:
  1. --count                显示数据库及表的统计信息(数据库,表 均可以不指定)
  2. -i                        显示指定数据库或者指定表的状态信息
复制代码
示例:
  1. #查询每个数据库的表的数量及表中记录的数量
  2. mysqlshow -uroot -p2143 --count
  3. #查询test库中每个表中的字段书,及行数
  4. mysqlshow -uroot -p2143 test --count
  5. #查询test库中book表的详细情况
  6. mysqlshow -uroot -p2143 test book --count
复制代码
2. Mysql 日记

在任何一种数据库中,都会有各种各样的日记,记载着数据库工作的方方面面,以帮助数据库管理员追踪数据库曾经发生过的各种事件。MySQL 也不例外,在 MySQL 中,有 4 种不同的日记,分别是错误日记、二进制日记(BINLOG 日记)、查询日记和慢查询日记,这些日记记载着数据库在不同方面的踪迹。
2.1 错误日记

错误日记是 MySQL 中最重要的日记之一,它记载了当 mysqld 启动和停止时,以及服务器在运行过程中发生任何严重错误时的相关信息。当数据库出现任何以障导致无法正常使用时,可以起首查察此日记。
该日记是默认开启的 , 默认存放目录为 mysql 的数据目录(var/lib/mysql), 默认的日记文件名为  hostname.err(hostname是主机名)。
查察日记位置指令 :
  1. show variables like 'log_error%';
复制代码

查察日记内容 :
  1. tail -f /var/lib/mysql/xaxh-server.err
复制代码

2.2 二进制日记

2.2.1概述

二进制日记(BINLOG)记载了所有的 DDL(数据定义语言)语句和 DML(数据操纵语言)语句,但是不包括数据查询语句。此日记对于灾难时的数据规复起着极其重要的作用,MySQL的主从复制, 就是通过该binlog实现的。
二进制日记,默认情况下是没有开启的,需要到MySQL的设置文件中开启,并设置MySQL日记的格式。
设置文件位置 : /usr/my.cnf
日记存放位置 : 设置时,给定了文件名但是没有指定路径,日记默认写入Mysql的数据目录。
  1. #配置开启binlog日志, 日志的文件前缀为 mysqlbin -----> 生成的文件名如 : mysqlbin.000001,mysqlbin.000002
  2. log_bin=mysqlbin
  3. #配置二进制日志的格式
  4. binlog_format=STATEMENT
复制代码
2.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工具来查察,语法如下 :
  1. mysqlbinlog log-file;
复制代码
查察STATEMENT格式日记
执行插入语句 :
  1. insert into tb_book values(null,'Lucene','2088-05-01','0');
复制代码
查察日记文件 :

mysqlbin.index : 该文件是日记索引文件 , 记载日记的文件名;
mysqlbing.000001 :日记文件
查察日记内容 :
  1. mysqlbinlog mysqlbing.000001;
复制代码

查察ROW格式日记
设置 :
  1. #配置开启binlog日志, 日志的文件前缀为 mysqlbin -----> 生成的文件名如 : mysqlbin.000001,mysqlbin.000002
  2. log_bin=mysqlbin
  3. #配置二进制日志的格式
  4. binlog_format=ROW
复制代码
插入数据 :
  1. insert into tb_book values(null,'SpringCloud实战','2088-05-05','0');
复制代码
如果日记格式是 ROW , 直接查察数据 , 是查察不懂的 ; 可以在mysqlbinlog 后面加上参数 -vv
  1. mysqlbinlog -vv mysqlbin.000002
复制代码

2.2.4 日记删除

对于比较繁忙的系统,由于每天生成日记量大 ,这些日记如果长时间不清楚,将会占用大量的磁盘空间。下面我们将会讲解几种删除日记的常见方法 :
方式一
通过 Reset Master 指令删除全部 binlog 日记,删除之后,日记编号,将从 xxxx.000001重新开始 。
查询之前 ,先查询下日记文件 :

执行删除日记指令:
  1. Reset Master
复制代码
执行之后, 查察日记文件 :

方式二
执行指令  purge  master logs to 'mysqlbin.******' ,该命令将删除   ****** 编号之前的所有日记。
方式三
执行指令  purge master logs before 'yyyy-mm-dd hh24:mi:ss' ,该命令将删除日记为 "yyyy-mm-dd hh24:mi:ss" 之前产生的所有日记 。
方式四
设置参数 --expire_logs_days=# ,此参数的含义是设置日记的逾期天数, 过了指定的天数后日记将会被自动删除,这样将有利于减少DBA 管理日记的工作量。
设置如下 :

2.3 查询日记

查询日记中记载了客户端的所有操纵语句,而二进制日记不包含查询数据的SQL语句。
默认情况下, 查询日记是未开启的。如果需要开启查询日记,可以设置以下设置 :
  1. #该选项用来开启查询日志 , 可选值 : 0 或者 1 ; 0 代表关闭, 1 代表开启
  2. general_log=1
  3. #设置日志的文件名 , 如果没有指定, 默认的文件名为 host_name.log
  4. general_log_file=file_name
复制代码
在 mysql 的设置文件 /usr/my.cnf 中设置如下内容 :

设置完毕之后,在数据库执行以下操纵 :
  1. select * from tb_book;
  2. select * from tb_book where id = 1;
  3. update tb_book set name = 'lucene入门指南' where id = 5;
  4. select * from tb_book where id < 8;
复制代码
执行完毕之后, 再次来查询日记文件 :

2.4 慢查询日记

慢查询日记记载了所有执行时间超过参数 long_query_time 设置值而且扫描记载数不小于 min_examined_row_limit 的所有的SQL语句的日记。long_query_time 默认为 10 秒,最小为 0, 精度可以到微秒。
2.4.1 文件位置和格式

慢查询日记默认是关闭的 。可以通过两个参数来控制慢查询日记 :
  1. # 该参数用来控制慢查询日志是否开启, 可取值: 1 和 0 , 1 代表开启, 0 代表关闭
  2. slow_query_log=1
  3. # 该参数用来指定慢查询日志的文件名
  4. slow_query_log_file=slow_query.log
  5. # 该选项用来配置查询的时间限制, 超过这个时间将认为值慢查询, 将需要进行日志记录, 默认10s
  6. long_query_time=10
复制代码
2.4.2 日记的读取

和错误日记、查询日记一样,慢查询日记记载的格式也是纯文本,可以被直接读取。
1) 查询long_query_time 的值。

2) 执行查询操纵
  1. select id, title,price,num ,status from tb_item where id = 1;
复制代码

由于该语句执行时间很短,为0s , 所以不会记载在慢查询日记中。
  1. select * from tb_item where title like '%阿尔卡特 (OT-927) 炭黑 联通3G手机 双卡双待165454%' ;
复制代码

该SQL语句 , 执行时长为 26.77s ,超过10s , 所以会记载在慢查询日记文件中。
3) 查察慢查询日记文件
直接通过cat 指令查询该日记文件 :

如果慢查询日记内容很多, 直接查察文件,比较麻烦, 这个时候可以借助于mysql自带的 mysqldumpslow 工具, 来对慢查询日记进行分类汇总。

3. Mysql复制

3.1 复制概述

复制是指将主数据库的DDL 和 DML 操纵通过二进制日记传到从库服务器中,然后在从库上对这些日记重新执行(也叫重做),从而使得从库和主库的数据保持同步。
MySQL支持一台主库同时向多台从库进行复制, 从库同时也可以作为其他从服务器的主库,实现链状复制。
3.2 复制原理

MySQL 的主从复制原理如下。

从上层来看,复制分成三步:

  • Master 主库在事务提交时,会把数据变更作为时间 Events 记载在二进制日记文件 Binlog 中。
  • 主库推送二进制日记文件 Binlog 中的日记事件到从库的中继日记 Relay Log 。
  • slave重做中继日记中的事件,将改变反映它自己的数据。
3.3 复制上风

MySQL 复制的有点重要包含以下三个方面:

  • 主库出现题目,可以快速切换到从库提供服务。
  • 可以在从库上执行查询操纵,从主库中更新,实现读写分离,低落主库的访问压力。
  • 可以在从库中执行备份,以制止备份期间影响主库的服务。
3.4 搭建步调

3.4.1 master

1) 在master 的设置文件(/usr/my.cnf)中,设置如下内容:
  1. #mysql 服务ID,保证整个集群环境中唯一
  2. server-id=1
  3. #mysql binlog 日志的存储路径和文件名
  4. log-bin=/var/lib/mysql/mysqlbin
  5. #错误日志,默认已经开启
  6. #log-err
  7. #mysql的安装目录
  8. #basedir
  9. #mysql的临时目录
  10. #tmpdir
  11. #mysql的数据存放目录
  12. #datadir
  13. #是否只读,1 代表只读, 0 代表读写
  14. read-only=0
  15. #忽略的数据, 指不需要同步的数据库
  16. binlog-ignore-db=mysql
  17. #指定同步的数据库
  18. #binlog-do-db=db01
复制代码
2) 执行完毕之后,需要重启Mysql:
  1. service mysql restart ;
复制代码
3) 创建同步数据的账户,而且进行授权操纵:
  1. grant replication slave on *.* to 'itcast'@'192.168.192.131' identified by 'itcast';       
  2. flush privileges;
复制代码
4) 查察master状态:
  1. show master status;
复制代码

字段含义:
  1. File : 从哪个日志文件开始推送日志文件
  2. Position : 从哪个位置开始推送日志
  3. Binlog_Ignore_DB : 指定不需要同步的数据库
复制代码
3.4.2 slave

1) 在 slave 端设置文件中,设置如下内容:
  1. #mysql服务端ID,唯一
  2. server-id=2
  3. #指定binlog日志
  4. log-bin=/var/lib/mysql/mysqlbin
复制代码
2)  执行完毕之后,需要重启Mysql:
  1. service mysql restart;
复制代码
3) 执行如下指令 :
  1. 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) 开启同步操纵
  1. start slave;
  2. show slave status;
复制代码

5) 停止同步操纵
  1. stop slave;
复制代码
3.4.3 验证同步操纵

1) 在主库中创建数据库,创建表,并插入数据 :
  1. create database db01;
  2. user db01;
  3. create table user(
  4.         id int(11) not null auto_increment,
  5.         name varchar(50) not null,
  6.         sex varchar(1),
  7.         primary key (id)
  8. )engine=innodb default charset=utf8;
  9. insert into user(id,name,sex) values(null,'Tom','1');
  10. insert into user(id,name,sex) values(null,'Trigger','0');
  11. insert into user(id,name,sex) values(null,'Dawn','1');
复制代码
2) 在从库中查询数据,进行验证 :
在从库中,可以查察到刚才创建的数据库:

在该数据库中,查询user表中的数据:

4. 综合案例

4.1 需求分析

在业务系统中,需要记载当前业务系统的访问日记,该访问日记包含:操纵人,操纵时间,访问类,访问方法,哀求参数,哀求结果,哀求结果范例,哀求时长 等信息。记载详细的系统访问日记,重要便于对系统中的用户哀求进行追踪,而且在系统 的管理后台可以查察到用户的访问记载。
记载系统中的日记信息,可以通过Spring 框架的AOP来实现。详细的哀求处理流程,如下:

4.2 搭建案例情况

4.2.1 数据库表
  1. CREATE DATABASE mysql_demo DEFAULT CHARACTER SET utf8mb4 ;
  2. CREATE TABLE `brand` (
  3.   `id` bigint(20) NOT NULL AUTO_INCREMENT,
  4.   `name` varchar(255) DEFAULT NULL COMMENT '品牌名称',
  5.   `first_char` varchar(1) DEFAULT NULL COMMENT '品牌首字母',
  6.   PRIMARY KEY (`id`)
  7. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  8. CREATE TABLE `item` (
  9.   `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '商品id',
  10.   `title` varchar(100) NOT NULL COMMENT '商品标题',
  11.   `price` double(10,2) NOT NULL COMMENT '商品价格,单位为:元',
  12.   `num` int(10) NOT NULL COMMENT '库存数量',
  13.   `categoryid` bigint(10) NOT NULL COMMENT '所属类目,叶子类目',
  14.   `status` varchar(1) DEFAULT NULL COMMENT '商品状态,1-正常,2-下架,3-删除',
  15.   `sellerid` varchar(50) DEFAULT NULL COMMENT '商家ID',
  16.   `createtime` datetime DEFAULT NULL COMMENT '创建时间',
  17.   `updatetime` datetime DEFAULT NULL COMMENT '更新时间',
  18.   PRIMARY KEY (`id`)
  19. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='商品表';
  20. CREATE TABLE `user` (
  21.   `id` int(11) NOT NULL AUTO_INCREMENT,
  22.   `username` varchar(45) NOT NULL,
  23.   `password` varchar(96) NOT NULL,
  24.   `name` varchar(45) NOT NULL,
  25.   `birthday` datetime DEFAULT NULL,
  26.   `sex` char(1) DEFAULT NULL,
  27.   `email` varchar(45) DEFAULT NULL,
  28.   `phone` varchar(45) DEFAULT NULL,
  29.   `qq` varchar(32) DEFAULT NULL,
  30.   PRIMARY KEY (`id`)
  31. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  32. CREATE TABLE `operation_log` (
  33.   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  34.   `operate_class` varchar(200) DEFAULT NULL COMMENT '操作类',
  35.   `operate_method` varchar(200) DEFAULT NULL COMMENT '操作方法',
  36.   `return_class` varchar(200) DEFAULT NULL COMMENT '返回值类型',
  37.   `operate_user` varchar(20) DEFAULT NULL COMMENT '操作用户',
  38.   `operate_time` varchar(20) DEFAULT NULL COMMENT '操作时间',
  39.   `param_and_value` varchar(500) DEFAULT NULL COMMENT '请求参数名及参数值',
  40.   `cost_time` bigint(20) DEFAULT NULL COMMENT '执行方法耗时, 单位 ms',
  41.   `return_value` varchar(200) DEFAULT NULL COMMENT '返回值',
  42.   PRIMARY KEY (`id`)
  43. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4;
复制代码
4.2.2 pom.xml
  1. <properties>
  2.   <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  3.   <maven.compiler.source>1.7</maven.compiler.source>
  4.   <maven.compiler.target>1.7</maven.compiler.target>
  5.   <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  6.   <maven.compiler.source>1.8</maven.compiler.source>
  7.   <maven.compiler.target>1.8</maven.compiler.target>
  8.   <spring.version>5.0.2.RELEASE</spring.version>
  9.   <slf4j.version>1.6.6</slf4j.version>
  10.   <log4j.version>1.2.12</log4j.version>
  11.   <mybatis.version>3.4.5</mybatis.version>
  12. </properties>
  13. <dependencies>
  14.   <dependency>
  15.     <groupId>org.aspectj</groupId>
  16.     <artifactId>aspectjweaver</artifactId>
  17.     <version>1.6.8</version>
  18.   </dependency>
  19.   <dependency>
  20.     <groupId>org.projectlombok</groupId>
  21.     <artifactId>lombok</artifactId>
  22.     <version>1.16.16</version>
  23.   </dependency>
  24.   <dependency>
  25.     <groupId>org.springframework</groupId>
  26.     <artifactId>spring-context</artifactId>
  27.     <version>${spring.version}</version>
  28.   </dependency>
  29.   <dependency>
  30.     <groupId>org.springframework</groupId>
  31.     <artifactId>spring-context-support</artifactId>
  32.     <version>${spring.version}</version>
  33.   </dependency>
  34.   <dependency>
  35.     <groupId>org.springframework</groupId>
  36.     <artifactId>spring-orm</artifactId>
  37.     <version>${spring.version}</version>
  38.   </dependency>
  39.   <dependency>
  40.     <groupId>org.springframework</groupId>
  41.     <artifactId>spring-test</artifactId>
  42.     <version>${spring.version}</version>
  43.   </dependency>
  44.   <dependency>
  45.     <groupId>org.springframework</groupId>
  46.     <artifactId>spring-webmvc</artifactId>
  47.     <version>${spring.version}</version>
  48.   </dependency>
  49.   <dependency>
  50.     <groupId>org.springframework</groupId>
  51.     <artifactId>spring-tx</artifactId>
  52.     <version>${spring.version}</version>
  53.   </dependency>
  54.   <dependency>
  55.     <groupId>junit</groupId>
  56.     <artifactId>junit</artifactId>
  57.     <version>4.12</version>
  58.     <scope>test</scope>
  59.   </dependency>
  60.   <dependency>
  61.     <groupId>javax.servlet</groupId>
  62.     <artifactId>javax.servlet-api</artifactId>
  63.     <version>3.1.0</version>
  64.     <scope>provided</scope>
  65.   </dependency>
  66.   <dependency>
  67.     <groupId>javax.servlet.jsp</groupId>
  68.     <artifactId>jsp-api</artifactId>
  69.     <version>2.0</version>
  70.     <scope>provided</scope>
  71.   </dependency>
  72.   <dependency>
  73.     <groupId>log4j</groupId>
  74.     <artifactId>log4j</artifactId>
  75.     <version>${log4j.version}</version>
  76.   </dependency>
  77.   <dependency>
  78.     <groupId>org.mybatis</groupId>
  79.     <artifactId>mybatis</artifactId>
  80.     <version>${mybatis.version}</version>
  81.   </dependency>
  82.   <dependency>
  83.     <groupId>org.mybatis</groupId>
  84.     <artifactId>mybatis-spring</artifactId>
  85.     <version>1.3.0</version>
  86.   </dependency>
  87.   <dependency>
  88.     <groupId>c3p0</groupId>
  89.     <artifactId>c3p0</artifactId>
  90.     <version>0.9.1.2</version>
  91.   </dependency>
  92.   <dependency>
  93.     <groupId>mysql</groupId>
  94.     <artifactId>mysql-connector-java</artifactId>
  95.     <version>5.1.5</version>
  96.   </dependency>
  97.   <dependency>
  98.     <groupId>com.fasterxml.jackson.core</groupId>
  99.     <artifactId>jackson-core</artifactId>
  100.     <version>2.9.0</version>
  101.   </dependency>
  102.   <dependency>
  103.     <groupId>com.fasterxml.jackson.core</groupId>
  104.     <artifactId>jackson-databind</artifactId>
  105.     <version>2.9.0</version>
  106.   </dependency>
  107.   <dependency>
  108.     <groupId>com.fasterxml.jackson.core</groupId>
  109.     <artifactId>jackson-annotations</artifactId>
  110.     <version>2.9.0</version>
  111.   </dependency>
  112. </dependencies>
  113. <build>
  114.    <plugins>
  115.      <plugin>
  116.        <groupId>org.apache.tomcat.maven</groupId>
  117.        <artifactId>tomcat7-maven-plugin</artifactId>
  118.        <version>2.2</version>
  119.        <configuration>
  120.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  121.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  122.     </zpagenav> <port>8080</port>
  123.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  124.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  125.     </zpagenav> <path>/</path>
  126.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  127.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  128.     </zpagenav> <uriEncoding>utf-8</uriEncoding>
  129.        </configuration>
  130.      </plugin>
  131.    </plugins>
  132. </build>
复制代码
4.2.3 web.xml
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee"
  3.        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
  4.        version="2.5">
  5.    
  6.     <filter>
  7.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  8.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  9.     </zpagenav><filter-name>CharacterEncodingFilter</filter-name>
  10.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  11.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  12.     </zpagenav><filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
  13.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  14.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  15.     </zpagenav><init-param>
  16. <?xml version="1.0" encoding="UTF-8"?>
  17. <beans xmlns="http://www.springframework.org/schema/beans"
  18.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  19.        xmlns:context="http://www.springframework.org/schema/context"
  20.        xmlns:aop="http://www.springframework.org/schema/aop"
  21.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  22.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  23.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  24.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  25.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  26.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  27.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  28.     </zpagenav>    http://www.springframework.org/schema/mvc
  29.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  30.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  31.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  32.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  33.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  34.     </zpagenav>    http://www.springframework.org/schema/aop
  35.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  36.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  37.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  38.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  39.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  40.     </zpagenav>    http://www.springframework.org/schema/context
  41.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  42.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  43.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  44.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  45.     <mvc:annotation-driven></mvc:annotation-driven>
  46.     <aop:aspectj-autoproxy />
  47. </beans><param-name>encoding</param-name>
  48. <?xml version="1.0" encoding="UTF-8"?>
  49. <beans xmlns="http://www.springframework.org/schema/beans"
  50.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  51.        xmlns:context="http://www.springframework.org/schema/context"
  52.        xmlns:aop="http://www.springframework.org/schema/aop"
  53.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  54.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  55.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  56.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  57.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  58.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  59.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  60.     </zpagenav>    http://www.springframework.org/schema/mvc
  61.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  62.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  63.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  64.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  65.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  66.     </zpagenav>    http://www.springframework.org/schema/aop
  67.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  68.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  69.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  70.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  71.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  72.     </zpagenav>    http://www.springframework.org/schema/context
  73.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  74.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  75.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  76.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  77.     <mvc:annotation-driven></mvc:annotation-driven>
  78.     <aop:aspectj-autoproxy />
  79. </beans><param-value>utf-8</param-value>
  80.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  81.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  82.     </zpagenav></init-param>
  83.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  84.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  85.     </zpagenav><init-param>
  86. <?xml version="1.0" encoding="UTF-8"?>
  87. <beans xmlns="http://www.springframework.org/schema/beans"
  88.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  89.        xmlns:context="http://www.springframework.org/schema/context"
  90.        xmlns:aop="http://www.springframework.org/schema/aop"
  91.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  92.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  93.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  94.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  95.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  96.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  97.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  98.     </zpagenav>    http://www.springframework.org/schema/mvc
  99.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  100.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  101.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  102.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  103.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  104.     </zpagenav>    http://www.springframework.org/schema/aop
  105.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  106.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  107.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  108.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  109.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  110.     </zpagenav>    http://www.springframework.org/schema/context
  111.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  112.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  113.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  114.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  115.     <mvc:annotation-driven></mvc:annotation-driven>
  116.     <aop:aspectj-autoproxy />
  117. </beans><param-name>forceEncoding</param-name>
  118. <?xml version="1.0" encoding="UTF-8"?>
  119. <beans xmlns="http://www.springframework.org/schema/beans"
  120.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  121.        xmlns:context="http://www.springframework.org/schema/context"
  122.        xmlns:aop="http://www.springframework.org/schema/aop"
  123.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  124.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  125.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  126.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  127.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  128.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  129.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  130.     </zpagenav>    http://www.springframework.org/schema/mvc
  131.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  132.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  133.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  134.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  135.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  136.     </zpagenav>    http://www.springframework.org/schema/aop
  137.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  138.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  139.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  140.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  141.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  142.     </zpagenav>    http://www.springframework.org/schema/context
  143.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  144.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  145.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  146.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  147.     <mvc:annotation-driven></mvc:annotation-driven>
  148.     <aop:aspectj-autoproxy />
  149. </beans><param-value>true</param-value>
  150.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  151.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  152.     </zpagenav></init-param>
  153.     </filter>
  154.     <filter-mapping>
  155.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  156.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  157.     </zpagenav><filter-name>CharacterEncodingFilter</filter-name>
  158.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  159.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  160.     </zpagenav><url-pattern>/*</url-pattern>
  161.     </filter-mapping>
  162.     <context-param>
  163.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  164.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  165.     </zpagenav><param-name>contextConfigLocation</param-name>
  166.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  167.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  168.     </zpagenav><param-value>classpath:applicationContext.xml</param-value>
  169.     </context-param>
  170.     <listener>
  171.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  172.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  173.     </zpagenav><listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  174.     </listener>
  175.     <servlet>
  176.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  177.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  178.     </zpagenav><servlet-name>springmvc</servlet-name>
  179.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  180.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  181.     </zpagenav><servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  182.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  183.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  184.     </zpagenav>
  185.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  186.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  187.     </zpagenav><init-param>
  188. <?xml version="1.0" encoding="UTF-8"?>
  189. <beans xmlns="http://www.springframework.org/schema/beans"
  190.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  191.        xmlns:context="http://www.springframework.org/schema/context"
  192.        xmlns:aop="http://www.springframework.org/schema/aop"
  193.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  194.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  195.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  196.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  197.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  198.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  199.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  200.     </zpagenav>    http://www.springframework.org/schema/mvc
  201.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  202.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  203.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  204.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  205.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  206.     </zpagenav>    http://www.springframework.org/schema/aop
  207.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  208.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  209.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  210.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  211.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  212.     </zpagenav>    http://www.springframework.org/schema/context
  213.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  214.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  215.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  216.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  217.     <mvc:annotation-driven></mvc:annotation-driven>
  218.     <aop:aspectj-autoproxy />
  219. </beans><param-name>contextConfigLocation</param-name>
  220. <?xml version="1.0" encoding="UTF-8"?>
  221. <beans xmlns="http://www.springframework.org/schema/beans"
  222.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  223.        xmlns:context="http://www.springframework.org/schema/context"
  224.        xmlns:aop="http://www.springframework.org/schema/aop"
  225.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  226.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  227.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  228.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  229.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  230.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  231.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  232.     </zpagenav>    http://www.springframework.org/schema/mvc
  233.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  234.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  235.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  236.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  237.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  238.     </zpagenav>    http://www.springframework.org/schema/aop
  239.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  240.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  241.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  242.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  243.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  244.     </zpagenav>    http://www.springframework.org/schema/context
  245.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  246.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  247.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  248.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  249.     <mvc:annotation-driven></mvc:annotation-driven>
  250.     <aop:aspectj-autoproxy />
  251. </beans><param-value>classpath:springmvc.xml</param-value>
  252.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  253.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  254.     </zpagenav></init-param>
  255.     </servlet>
  256.     <servlet-mapping>
  257.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  258.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  259.     </zpagenav><servlet-name>springmvc</servlet-name>
  260.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  261.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  262.     </zpagenav><url-pattern>*.do</url-pattern>
  263.     </servlet-mapping>
  264.     <welcome-file-list>
  265.       <welcome-file>log-datalist.html</welcome-file>
  266.     </welcome-file-list>
  267. </web-app>
复制代码
4.2.4 db.properties
  1. jdbc.driver=com.mysql.jdbc.Driver
  2. jdbc.url=jdbc:mysql://192.168.142.128:3306/mysql_demo
  3. jdbc.username=root
  4. jdbc.password=itcast
复制代码
4.2.5 applicationContext.xml
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4.        xmlns:aop="http://www.springframework.org/schema/aop"
  5.        xmlns:tx="http://www.springframework.org/schema/tx"
  6.        xmlns:context="http://www.springframework.org/schema/context"
  7.            xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
  8. <?xml version="1.0" encoding="UTF-8"?>
  9. <beans xmlns="http://www.springframework.org/schema/beans"
  10.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  11.        xmlns:context="http://www.springframework.org/schema/context"
  12.        xmlns:aop="http://www.springframework.org/schema/aop"
  13.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  14.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  15.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  16.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  17.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  18.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  19.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  20.     </zpagenav>    http://www.springframework.org/schema/mvc
  21.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  22.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  23.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  24.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  25.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  26.     </zpagenav>    http://www.springframework.org/schema/aop
  27.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  28.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  29.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  30.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  31.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  32.     </zpagenav>    http://www.springframework.org/schema/context
  33.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  34.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  35.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  36.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  37.     <mvc:annotation-driven></mvc:annotation-driven>
  38.     <aop:aspectj-autoproxy />
  39. </beans><?xml version="1.0" encoding="UTF-8"?>
  40. <beans xmlns="http://www.springframework.org/schema/beans"
  41.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  42.        xmlns:context="http://www.springframework.org/schema/context"
  43.        xmlns:aop="http://www.springframework.org/schema/aop"
  44.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  45.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  46.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  47.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  48.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  49.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  50.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  51.     </zpagenav>    http://www.springframework.org/schema/mvc
  52.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  53.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  54.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  55.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  56.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  57.     </zpagenav>    http://www.springframework.org/schema/aop
  58.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  59.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  60.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  61.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  62.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  63.     </zpagenav>    http://www.springframework.org/schema/context
  64.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  65.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  66.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  67.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  68.     <mvc:annotation-driven></mvc:annotation-driven>
  69.     <aop:aspectj-autoproxy />
  70. </beans>   http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
  71. <?xml version="1.0" encoding="UTF-8"?>
  72. <beans xmlns="http://www.springframework.org/schema/beans"
  73.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  74.        xmlns:context="http://www.springframework.org/schema/context"
  75.        xmlns:aop="http://www.springframework.org/schema/aop"
  76.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  77.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  78.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  79.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  80.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  81.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  82.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  83.     </zpagenav>    http://www.springframework.org/schema/mvc
  84.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  85.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  86.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  87.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  88.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  89.     </zpagenav>    http://www.springframework.org/schema/aop
  90.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  91.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  92.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  93.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  94.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  95.     </zpagenav>    http://www.springframework.org/schema/context
  96.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  97.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  98.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  99.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  100.     <mvc:annotation-driven></mvc:annotation-driven>
  101.     <aop:aspectj-autoproxy />
  102. </beans><?xml version="1.0" encoding="UTF-8"?>
  103. <beans xmlns="http://www.springframework.org/schema/beans"
  104.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  105.        xmlns:context="http://www.springframework.org/schema/context"
  106.        xmlns:aop="http://www.springframework.org/schema/aop"
  107.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  108.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  109.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  110.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  111.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  112.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  113.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  114.     </zpagenav>    http://www.springframework.org/schema/mvc
  115.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  116.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  117.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  118.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  119.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  120.     </zpagenav>    http://www.springframework.org/schema/aop
  121.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  122.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  123.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  124.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  125.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  126.     </zpagenav>    http://www.springframework.org/schema/context
  127.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  128.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  129.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  130.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  131.     <mvc:annotation-driven></mvc:annotation-driven>
  132.     <aop:aspectj-autoproxy />
  133. </beans>    http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
  134. <?xml version="1.0" encoding="UTF-8"?>
  135. <beans xmlns="http://www.springframework.org/schema/beans"
  136.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  137.        xmlns:context="http://www.springframework.org/schema/context"
  138.        xmlns:aop="http://www.springframework.org/schema/aop"
  139.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  140.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  141.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  142.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  143.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  144.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  145.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  146.     </zpagenav>    http://www.springframework.org/schema/mvc
  147.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  148.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  149.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  150.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  151.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  152.     </zpagenav>    http://www.springframework.org/schema/aop
  153.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  154.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  155.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  156.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  157.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  158.     </zpagenav>    http://www.springframework.org/schema/context
  159.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  160.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  161.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  162.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  163.     <mvc:annotation-driven></mvc:annotation-driven>
  164.     <aop:aspectj-autoproxy />
  165. </beans><?xml version="1.0" encoding="UTF-8"?>
  166. <beans xmlns="http://www.springframework.org/schema/beans"
  167.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  168.        xmlns:context="http://www.springframework.org/schema/context"
  169.        xmlns:aop="http://www.springframework.org/schema/aop"
  170.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  171.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  172.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  173.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  174.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  175.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  176.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  177.     </zpagenav>    http://www.springframework.org/schema/mvc
  178.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  179.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  180.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  181.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  182.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  183.     </zpagenav>    http://www.springframework.org/schema/aop
  184.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  185.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  186.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  187.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  188.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  189.     </zpagenav>    http://www.springframework.org/schema/context
  190.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  191.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  192.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  193.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  194.     <mvc:annotation-driven></mvc:annotation-driven>
  195.     <aop:aspectj-autoproxy />
  196. </beans>    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
  197.    
  198.     <context:property-placeholder location="classpath:db.properties"/>
  199.    
  200.     <context:component-scan base-package="cn.itcast">
  201.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  202.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  203.     </zpagenav><context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller">       
  204.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  205.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  206.     </zpagenav></context:exclude-filter>
  207.     </context:component-scan>
  208.    
  209.     <bean id="sqlSessionFactory" >
  210.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  211.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  212.     </zpagenav><property name="dataSource" ref="dataSource"/>
  213.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  214.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  215.     </zpagenav><property name="typeAliasesPackage" value="cn.itcast.pojo"/>
  216.      </bean>
  217.    
  218.     <bean id="dataSource" >
  219.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  220.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  221.     </zpagenav><property name="driverClass" value="${jdbc.driver}"></property>
  222.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  223.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  224.     </zpagenav><property name="jdbcUrl" value="${jdbc.url}"></property>
  225.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  226.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  227.     </zpagenav><property name="user" value="${jdbc.username}"></property>
  228.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  229.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  230.     </zpagenav><property name="password" value="${jdbc.password}"></property>
  231.     </bean>
  232.    
  233.     <bean >
  234.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  235.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  236.     </zpagenav><property name="basePackage" value="cn.itcast.mapper"/>
  237.     </bean>
  238.    
  239.     <bean id="transactionManager" >
  240.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  241.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  242.     </zpagenav><property name="dataSource" ref="dataSource"/>
  243.     </bean>
  244.    
  245.     <tx:annotation-driven transaction-manager="transactionManager"></tx:annotation-driven>
  246. </beans>
复制代码
4.2.6 springmvc.xml
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  4.        xmlns:context="http://www.springframework.org/schema/context"
  5.        xmlns:aop="http://www.springframework.org/schema/aop"
  6.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  7.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  8.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  9.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  10.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  11.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  12.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  13.     </zpagenav>    http://www.springframework.org/schema/mvc
  14.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  15.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  16.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  17.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  18.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  19.     </zpagenav>    http://www.springframework.org/schema/aop
  20.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  21.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  22.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  23.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  24.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  25.     </zpagenav>    http://www.springframework.org/schema/context
  26.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  27.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  28.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  29.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  30.     <mvc:annotation-driven></mvc:annotation-driven>
  31.     <aop:aspectj-autoproxy />
  32. </beans>
复制代码
4.2.7 导入基础工程


4.3 通过AOP记载操纵日记

4.3.1 自定义注解

通过自定义注解,来标示方法需不需要进行记载日记,如果该方法在访问时需要记载日记,则在该方法上标示该注解既可。
  1. @Inherited
  2. @Documented
  3. @Target(ElementType.METHOD)
  4. @Retention(RetentionPolicy.RUNTIME)
  5. public @interface OperateLog {
  6. }
复制代码
4.3.2 定义通知类
  1. @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(" ************************ 记载日记 [start]  ****************************** ");<?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  4.        xmlns:context="http://www.springframework.org/schema/context"
  5.        xmlns:aop="http://www.springframework.org/schema/aop"
  6.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  7.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  8.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  9.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  10.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  11.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  12.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  13.     </zpagenav>    http://www.springframework.org/schema/mvc
  14.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  15.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  16.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  17.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  18.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  19.     </zpagenav>    http://www.springframework.org/schema/aop
  20.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  21.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  22.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  23.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  24.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  25.     </zpagenav>    http://www.springframework.org/schema/context
  26.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  27.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  28.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  29.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  30.     <mvc:annotation-driven></mvc:annotation-driven>
  31.     <aop:aspectj-autoproxy />
  32. </beans>OperationLog op = new OperationLog();<?xml version="1.0" encoding="UTF-8"?>
  33. <beans xmlns="http://www.springframework.org/schema/beans"
  34.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  35.        xmlns:context="http://www.springframework.org/schema/context"
  36.        xmlns:aop="http://www.springframework.org/schema/aop"
  37.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  38.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  39.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  40.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  41.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  42.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  43.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  44.     </zpagenav>    http://www.springframework.org/schema/mvc
  45.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  46.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  47.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  48.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  49.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  50.     </zpagenav>    http://www.springframework.org/schema/aop
  51.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  52.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  53.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  54.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  55.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  56.     </zpagenav>    http://www.springframework.org/schema/context
  57.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  58.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  59.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  60.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  61.     <mvc:annotation-driven></mvc:annotation-driven>
  62.     <aop:aspectj-autoproxy />
  63. </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"?>
  64. <beans xmlns="http://www.springframework.org/schema/beans"
  65.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  66.        xmlns:context="http://www.springframework.org/schema/context"
  67.        xmlns:aop="http://www.springframework.org/schema/aop"
  68.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  69.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  70.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  71.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  72.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  73.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  74.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  75.     </zpagenav>    http://www.springframework.org/schema/mvc
  76.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  77.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  78.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  79.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  80.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  81.     </zpagenav>    http://www.springframework.org/schema/aop
  82.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  83.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  84.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  85.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  86.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  87.     </zpagenav>    http://www.springframework.org/schema/context
  88.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  89.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  90.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  91.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  92.     <mvc:annotation-driven></mvc:annotation-driven>
  93.     <aop:aspectj-autoproxy />
  94. </beans>op.setOperateClass(pjp.getTarget().getClass().getName());      op.setOperateMethod(pjp.getSignature().getName());<?xml version="1.0" encoding="UTF-8"?>
  95. <beans xmlns="http://www.springframework.org/schema/beans"
  96.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  97.        xmlns:context="http://www.springframework.org/schema/context"
  98.        xmlns:aop="http://www.springframework.org/schema/aop"
  99.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  100.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  101.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  102.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  103.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  104.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  105.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  106.     </zpagenav>    http://www.springframework.org/schema/mvc
  107.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  108.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  109.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  110.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  111.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  112.     </zpagenav>    http://www.springframework.org/schema/aop
  113.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  114.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  115.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  116.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  117.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  118.     </zpagenav>    http://www.springframework.org/schema/context
  119.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  120.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  121.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  122.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  123.     <mvc:annotation-driven></mvc:annotation-driven>
  124.     <aop:aspectj-autoproxy />
  125. </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"
  126.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  127.     </zpagenav> op.setReturnClass(object.getClass().getName());    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  128.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  129.     </zpagenav> op.setReturnValue(object.toString());      }else{    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  130.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  131.     </zpagenav> op.setReturnClass("java.lang.Object");    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  132.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  133.     </zpagenav> op.setParamAndValue("void");      }      log.error(JsonUtils.obj2JsonString(op));      operationLogService.insert(op);<?xml version="1.0" encoding="UTF-8"?>
  134. <beans xmlns="http://www.springframework.org/schema/beans"
  135.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  136.        xmlns:context="http://www.springframework.org/schema/context"
  137.        xmlns:aop="http://www.springframework.org/schema/aop"
  138.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  139.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  140.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  141.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  142.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  143.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  144.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  145.     </zpagenav>    http://www.springframework.org/schema/mvc
  146.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  147.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  148.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  149.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  150.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  151.     </zpagenav>    http://www.springframework.org/schema/aop
  152.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  153.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  154.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  155.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  156.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  157.     </zpagenav>    http://www.springframework.org/schema/context
  158.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  159.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  160.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  161.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  162.     <mvc:annotation-driven></mvc:annotation-driven>
  163.     <aop:aspectj-autoproxy />
  164. </beans>System.out.println(" ************************** 记载日记 [end]  *************************** ");<?xml version="1.0" encoding="UTF-8"?>
  165. <beans xmlns="http://www.springframework.org/schema/beans"
  166.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  167.        xmlns:context="http://www.springframework.org/schema/context"
  168.        xmlns:aop="http://www.springframework.org/schema/aop"
  169.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  170.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  171.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  172.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  173.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  174.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  175.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  176.     </zpagenav>    http://www.springframework.org/schema/mvc
  177.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  178.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  179.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  180.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  181.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  182.     </zpagenav>    http://www.springframework.org/schema/aop
  183.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  184.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  185.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  186.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  187.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  188.     </zpagenav>    http://www.springframework.org/schema/context
  189.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  190.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  191.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  192.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  193.     <mvc:annotation-driven></mvc:annotation-driven>
  194.     <aop:aspectj-autoproxy />
  195. </beans>return object;   }   }
复制代码
4.3.3 方法上加注解

在需要记载日记的方法上加上注解@OperateLog。
  1. @OperateLog
  2. @RequestMapping("/insert")
  3. public Result insert(@RequestBody Brand brand){
  4.     try {
  5.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  6.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  7.     </zpagenav>brandService.insert(brand);
  8.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  9.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  10.     </zpagenav>return new Result(true,"操作成功");
  11.     } catch (Exception e) {
  12.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  13.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  14.     </zpagenav>e.printStackTrace();
  15.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  16.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  17.     </zpagenav>return new Result(false,"操作失败");
  18.     }
  19. }
复制代码
4.4 日记查询后端代码实现

4.4.1 Mapper接口
  1. public interface OperationLogMapper {
  2.     public void insert(OperationLog operationLog);
  3.     public List<OperationLog> selectListByCondition(Map dataMap);
  4.     public Long countByCondition(Map dataMap);
  5. }
复制代码
4.4.2 Mapper.xml 映射设置文件
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  4.        xmlns:context="http://www.springframework.org/schema/context"
  5.        xmlns:aop="http://www.springframework.org/schema/aop"
  6.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  7.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  8.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  9.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  10.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  11.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  12.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  13.     </zpagenav>    http://www.springframework.org/schema/mvc
  14.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  15.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  16.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  17.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  18.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  19.     </zpagenav>    http://www.springframework.org/schema/aop
  20.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  21.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  22.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  23.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  24.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  25.     </zpagenav>    http://www.springframework.org/schema/context
  26.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  27.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  28.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  29.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  30.     <mvc:annotation-driven></mvc:annotation-driven>
  31.     <aop:aspectj-autoproxy />
  32. </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"
  33.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  34.     </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"
  35.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  36.     </zpagenav>#{operateClass},#{operateMethod},#{costTime})<?xml version="1.0" encoding="UTF-8"?>
  37. <beans xmlns="http://www.springframework.org/schema/beans"
  38.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  39.        xmlns:context="http://www.springframework.org/schema/context"
  40.        xmlns:aop="http://www.springframework.org/schema/aop"
  41.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  42.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  43.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  44.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  45.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  46.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  47.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  48.     </zpagenav>    http://www.springframework.org/schema/mvc
  49.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  50.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  51.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  52.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  53.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  54.     </zpagenav>    http://www.springframework.org/schema/aop
  55.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  56.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  57.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  58.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  59.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  60.     </zpagenav>    http://www.springframework.org/schema/context
  61.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  62.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  63.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  64.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  65.     <mvc:annotation-driven></mvc:annotation-driven>
  66.     <aop:aspectj-autoproxy />
  67. </beans>  select    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  68.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  69.     </zpagenav>id ,    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  70.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  71.     </zpagenav>operate_class as operateClass ,    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  72.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  73.     </zpagenav>operate_method as operateMethod,    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  74.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  75.     </zpagenav>return_class as returnClass,    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  76.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  77.     </zpagenav>operate_user as operateUser,    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  78.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  79.     </zpagenav>operate_time as operateTime,    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  80.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  81.     </zpagenav>param_and_value as paramAndValue,    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  82.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  83.     </zpagenav>cost_time as costTime,    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  84.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  85.     </zpagenav>return_value as returnValue      from operation_log<?xml version="1.0" encoding="UTF-8"?>
  86. <beans xmlns="http://www.springframework.org/schema/beans"
  87.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  88.        xmlns:context="http://www.springframework.org/schema/context"
  89.        xmlns:aop="http://www.springframework.org/schema/aop"
  90.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  91.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  92.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  93.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  94.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  95.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  96.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  97.     </zpagenav>    http://www.springframework.org/schema/mvc
  98.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  99.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  100.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  101.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  102.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  103.     </zpagenav>    http://www.springframework.org/schema/aop
  104.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  105.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  106.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  107.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  108.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  109.     </zpagenav>    http://www.springframework.org/schema/context
  110.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  111.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  112.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  113.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  114.     <mvc:annotation-driven></mvc:annotation-driven>
  115.     <aop:aspectj-autoproxy />
  116. </beans>limit #{start},#{size}<?xml version="1.0" encoding="UTF-8"?>
  117. <beans xmlns="http://www.springframework.org/schema/beans"
  118.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  119.        xmlns:context="http://www.springframework.org/schema/context"
  120.        xmlns:aop="http://www.springframework.org/schema/aop"
  121.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  122.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  123.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  124.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  125.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  126.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  127.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  128.     </zpagenav>    http://www.springframework.org/schema/mvc
  129.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  130.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  131.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  132.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  133.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  134.     </zpagenav>    http://www.springframework.org/schema/aop
  135.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  136.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  137.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  138.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  139.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  140.     </zpagenav>    http://www.springframework.org/schema/context
  141.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  142.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  143.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  144.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  145.     <mvc:annotation-driven></mvc:annotation-driven>
  146.     <aop:aspectj-autoproxy />
  147. </beans>    select count(*) from operation_log<?xml version="1.0" encoding="UTF-8"?>
  148. <beans xmlns="http://www.springframework.org/schema/beans"
  149.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  150.        xmlns:context="http://www.springframework.org/schema/context"
  151.        xmlns:aop="http://www.springframework.org/schema/aop"
  152.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  153.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  154.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  155.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  156.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  157.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  158.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  159.     </zpagenav>    http://www.springframework.org/schema/mvc
  160.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  161.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  162.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  163.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  164.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  165.     </zpagenav>    http://www.springframework.org/schema/aop
  166.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  167.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  168.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  169.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  170.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  171.     </zpagenav>    http://www.springframework.org/schema/context
  172.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  173.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  174.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  175.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  176.     <mvc:annotation-driven></mvc:annotation-driven>
  177.     <aop:aspectj-autoproxy />
  178. </beans><?xml version="1.0" encoding="UTF-8"?>
  179. <beans xmlns="http://www.springframework.org/schema/beans"
  180.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  181.        xmlns:context="http://www.springframework.org/schema/context"
  182.        xmlns:aop="http://www.springframework.org/schema/aop"
  183.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  184.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  185.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  186.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  187.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  188.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  189.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  190.     </zpagenav>    http://www.springframework.org/schema/mvc
  191.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  192.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  193.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  194.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  195.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  196.     </zpagenav>    http://www.springframework.org/schema/aop
  197.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  198.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  199.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  200.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  201.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  202.     </zpagenav>    http://www.springframework.org/schema/context
  203.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  204.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  205.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  206.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  207.     <mvc:annotation-driven></mvc:annotation-driven>
  208.     <aop:aspectj-autoproxy />
  209. </beans><?xml version="1.0" encoding="UTF-8"?>
  210. <beans xmlns="http://www.springframework.org/schema/beans"
  211.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  212.        xmlns:context="http://www.springframework.org/schema/context"
  213.        xmlns:aop="http://www.springframework.org/schema/aop"
  214.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  215.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  216.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  217.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  218.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  219.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  220.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  221.     </zpagenav>    http://www.springframework.org/schema/mvc
  222.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  223.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  224.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  225.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  226.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  227.     </zpagenav>    http://www.springframework.org/schema/aop
  228.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  229.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  230.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  231.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  232.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  233.     </zpagenav>    http://www.springframework.org/schema/context
  234.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  235.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  236.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  237.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  238.     <mvc:annotation-driven></mvc:annotation-driven>
  239.     <aop:aspectj-autoproxy />
  240. </beans><?xml version="1.0" encoding="UTF-8"?>
  241. <beans xmlns="http://www.springframework.org/schema/beans"
  242.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  243.        xmlns:context="http://www.springframework.org/schema/context"
  244.        xmlns:aop="http://www.springframework.org/schema/aop"
  245.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  246.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  247.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  248.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  249.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  250.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  251.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  252.     </zpagenav>    http://www.springframework.org/schema/mvc
  253.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  254.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  255.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  256.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  257.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  258.     </zpagenav>    http://www.springframework.org/schema/aop
  259.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  260.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  261.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  262.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  263.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  264.     </zpagenav>    http://www.springframework.org/schema/context
  265.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  266.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  267.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  268.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  269.     <mvc:annotation-driven></mvc:annotation-driven>
  270.     <aop:aspectj-autoproxy />
  271. </beans>    and operate_class = #{operateClass}<?xml version="1.0" encoding="UTF-8"?>
  272. <beans xmlns="http://www.springframework.org/schema/beans"
  273.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  274.        xmlns:context="http://www.springframework.org/schema/context"
  275.        xmlns:aop="http://www.springframework.org/schema/aop"
  276.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  277.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  278.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  279.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  280.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  281.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  282.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  283.     </zpagenav>    http://www.springframework.org/schema/mvc
  284.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  285.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  286.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  287.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  288.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  289.     </zpagenav>    http://www.springframework.org/schema/aop
  290.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  291.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  292.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  293.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  294.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  295.     </zpagenav>    http://www.springframework.org/schema/context
  296.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  297.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  298.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  299.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  300.     <mvc:annotation-driven></mvc:annotation-driven>
  301.     <aop:aspectj-autoproxy />
  302. </beans><?xml version="1.0" encoding="UTF-8"?>
  303. <beans xmlns="http://www.springframework.org/schema/beans"
  304.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  305.        xmlns:context="http://www.springframework.org/schema/context"
  306.        xmlns:aop="http://www.springframework.org/schema/aop"
  307.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  308.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  309.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  310.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  311.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  312.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  313.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  314.     </zpagenav>    http://www.springframework.org/schema/mvc
  315.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  316.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  317.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  318.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  319.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  320.     </zpagenav>    http://www.springframework.org/schema/aop
  321.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  322.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  323.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  324.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  325.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  326.     </zpagenav>    http://www.springframework.org/schema/context
  327.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  328.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  329.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  330.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  331.     <mvc:annotation-driven></mvc:annotation-driven>
  332.     <aop:aspectj-autoproxy />
  333. </beans><?xml version="1.0" encoding="UTF-8"?>
  334. <beans xmlns="http://www.springframework.org/schema/beans"
  335.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  336.        xmlns:context="http://www.springframework.org/schema/context"
  337.        xmlns:aop="http://www.springframework.org/schema/aop"
  338.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  339.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  340.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  341.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  342.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  343.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  344.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  345.     </zpagenav>    http://www.springframework.org/schema/mvc
  346.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  347.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  348.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  349.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  350.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  351.     </zpagenav>    http://www.springframework.org/schema/aop
  352.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  353.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  354.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  355.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  356.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  357.     </zpagenav>    http://www.springframework.org/schema/context
  358.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  359.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  360.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  361.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  362.     <mvc:annotation-driven></mvc:annotation-driven>
  363.     <aop:aspectj-autoproxy />
  364. </beans>    and operate_method = #{operateMethod}<?xml version="1.0" encoding="UTF-8"?>
  365. <beans xmlns="http://www.springframework.org/schema/beans"
  366.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  367.        xmlns:context="http://www.springframework.org/schema/context"
  368.        xmlns:aop="http://www.springframework.org/schema/aop"
  369.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  370.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  371.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  372.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  373.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  374.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  375.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  376.     </zpagenav>    http://www.springframework.org/schema/mvc
  377.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  378.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  379.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  380.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  381.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  382.     </zpagenav>    http://www.springframework.org/schema/aop
  383.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  384.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  385.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  386.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  387.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  388.     </zpagenav>    http://www.springframework.org/schema/context
  389.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  390.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  391.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  392.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  393.     <mvc:annotation-driven></mvc:annotation-driven>
  394.     <aop:aspectj-autoproxy />
  395. </beans><?xml version="1.0" encoding="UTF-8"?>
  396. <beans xmlns="http://www.springframework.org/schema/beans"
  397.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  398.        xmlns:context="http://www.springframework.org/schema/context"
  399.        xmlns:aop="http://www.springframework.org/schema/aop"
  400.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  401.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  402.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  403.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  404.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  405.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  406.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  407.     </zpagenav>    http://www.springframework.org/schema/mvc
  408.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  409.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  410.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  411.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  412.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  413.     </zpagenav>    http://www.springframework.org/schema/aop
  414.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  415.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  416.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  417.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  418.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  419.     </zpagenav>    http://www.springframework.org/schema/context
  420.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  421.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  422.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  423.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  424.     <mvc:annotation-driven></mvc:annotation-driven>
  425.     <aop:aspectj-autoproxy />
  426. </beans><?xml version="1.0" encoding="UTF-8"?>
  427. <beans xmlns="http://www.springframework.org/schema/beans"
  428.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  429.        xmlns:context="http://www.springframework.org/schema/context"
  430.        xmlns:aop="http://www.springframework.org/schema/aop"
  431.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  432.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  433.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  434.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  435.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  436.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  437.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  438.     </zpagenav>    http://www.springframework.org/schema/mvc
  439.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  440.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  441.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  442.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  443.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  444.     </zpagenav>    http://www.springframework.org/schema/aop
  445.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  446.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  447.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  448.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  449.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  450.     </zpagenav>    http://www.springframework.org/schema/context
  451.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  452.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  453.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  454.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  455.     <mvc:annotation-driven></mvc:annotation-driven>
  456.     <aop:aspectj-autoproxy />
  457. </beans>    and return_class = #{returnClass}<?xml version="1.0" encoding="UTF-8"?>
  458. <beans xmlns="http://www.springframework.org/schema/beans"
  459.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  460.        xmlns:context="http://www.springframework.org/schema/context"
  461.        xmlns:aop="http://www.springframework.org/schema/aop"
  462.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  463.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  464.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  465.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  466.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  467.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  468.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  469.     </zpagenav>    http://www.springframework.org/schema/mvc
  470.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  471.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  472.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  473.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  474.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  475.     </zpagenav>    http://www.springframework.org/schema/aop
  476.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  477.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  478.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  479.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  480.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  481.     </zpagenav>    http://www.springframework.org/schema/context
  482.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  483.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  484.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  485.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  486.     <mvc:annotation-driven></mvc:annotation-driven>
  487.     <aop:aspectj-autoproxy />
  488. </beans><?xml version="1.0" encoding="UTF-8"?>
  489. <beans xmlns="http://www.springframework.org/schema/beans"
  490.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  491.        xmlns:context="http://www.springframework.org/schema/context"
  492.        xmlns:aop="http://www.springframework.org/schema/aop"
  493.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  494.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  495.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  496.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  497.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  498.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  499.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  500.     </zpagenav>    http://www.springframework.org/schema/mvc
  501.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  502.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  503.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  504.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  505.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  506.     </zpagenav>    http://www.springframework.org/schema/aop
  507.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  508.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  509.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  510.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  511.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  512.     </zpagenav>    http://www.springframework.org/schema/context
  513.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  514.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  515.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  516.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  517.     <mvc:annotation-driven></mvc:annotation-driven>
  518.     <aop:aspectj-autoproxy />
  519. </beans><?xml version="1.0" encoding="UTF-8"?>
  520. <beans xmlns="http://www.springframework.org/schema/beans"
  521.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  522.        xmlns:context="http://www.springframework.org/schema/context"
  523.        xmlns:aop="http://www.springframework.org/schema/aop"
  524.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  525.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  526.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  527.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  528.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  529.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  530.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  531.     </zpagenav>    http://www.springframework.org/schema/mvc
  532.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  533.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  534.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  535.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  536.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  537.     </zpagenav>    http://www.springframework.org/schema/aop
  538.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  539.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  540.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  541.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  542.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  543.     </zpagenav>    http://www.springframework.org/schema/context
  544.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  545.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  546.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  547.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  548.     <mvc:annotation-driven></mvc:annotation-driven>
  549.     <aop:aspectj-autoproxy />
  550. </beans>    and cost_time =  #{costTime}<?xml version="1.0" encoding="UTF-8"?>
  551. <beans xmlns="http://www.springframework.org/schema/beans"
  552.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  553.        xmlns:context="http://www.springframework.org/schema/context"
  554.        xmlns:aop="http://www.springframework.org/schema/aop"
  555.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  556.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  557.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  558.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  559.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  560.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  561.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  562.     </zpagenav>    http://www.springframework.org/schema/mvc
  563.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  564.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  565.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  566.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  567.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  568.     </zpagenav>    http://www.springframework.org/schema/aop
  569.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  570.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  571.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  572.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  573.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  574.     </zpagenav>    http://www.springframework.org/schema/context
  575.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  576.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  577.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  578.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  579.     <mvc:annotation-driven></mvc:annotation-driven>
  580.     <aop:aspectj-autoproxy />
  581. </beans><?xml version="1.0" encoding="UTF-8"?>
  582. <beans xmlns="http://www.springframework.org/schema/beans"
  583.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  584.        xmlns:context="http://www.springframework.org/schema/context"
  585.        xmlns:aop="http://www.springframework.org/schema/aop"
  586.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  587.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  588.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  589.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  590.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  591.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  592.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  593.     </zpagenav>    http://www.springframework.org/schema/mvc
  594.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  595.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  596.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  597.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  598.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  599.     </zpagenav>    http://www.springframework.org/schema/aop
  600.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  601.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  602.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  603.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  604.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  605.     </zpagenav>    http://www.springframework.org/schema/context
  606.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  607.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  608.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  609.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  610.     <mvc:annotation-driven></mvc:annotation-driven>
  611.     <aop:aspectj-autoproxy />
  612. </beans>
复制代码
4.4.3 Service
  1. @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"
  2.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  3.     </zpagenav>operationLogMapper.insert(operationLog);    }    //根据条件查询    public PageResult selectListByCondition(Map dataMap, Integer pageNum , Integer pageSize){       if(paramMap ==null){<?xml version="1.0" encoding="UTF-8"?>
  4. <beans xmlns="http://www.springframework.org/schema/beans"
  5.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  6.        xmlns:context="http://www.springframework.org/schema/context"
  7.        xmlns:aop="http://www.springframework.org/schema/aop"
  8.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  9.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  10.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  11.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  12.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  13.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  14.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  15.     </zpagenav>    http://www.springframework.org/schema/mvc
  16.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  17.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  18.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  19.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  20.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  21.     </zpagenav>    http://www.springframework.org/schema/aop
  22.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  23.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  24.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  25.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  26.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  27.     </zpagenav>    http://www.springframework.org/schema/context
  28.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  29.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  30.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  31.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  32.     <mvc:annotation-driven></mvc:annotation-driven>
  33.     <aop:aspectj-autoproxy />
  34. </beans>paramMap = new HashMap();    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  35.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  36.     </zpagenav>}    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  37.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  38.     </zpagenav>paramMap.put("start" , (pageNum-1)*rows);    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  39.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  40.     </zpagenav>paramMap.put("rows",rows);    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  41.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  42.     </zpagenav>Object costTime = paramMap.get("costTime");    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  43.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  44.     </zpagenav>if(costTime != null){<?xml version="1.0" encoding="UTF-8"?>
  45. <beans xmlns="http://www.springframework.org/schema/beans"
  46.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  47.        xmlns:context="http://www.springframework.org/schema/context"
  48.        xmlns:aop="http://www.springframework.org/schema/aop"
  49.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  50.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  51.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  52.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  53.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  54.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  55.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  56.     </zpagenav>    http://www.springframework.org/schema/mvc
  57.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  58.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  59.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  60.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  61.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  62.     </zpagenav>    http://www.springframework.org/schema/aop
  63.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  64.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  65.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  66.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  67.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  68.     </zpagenav>    http://www.springframework.org/schema/context
  69.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  70.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  71.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  72.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  73.     <mvc:annotation-driven></mvc:annotation-driven>
  74.     <aop:aspectj-autoproxy />
  75. </beans>if("".equals(costTime.toString())){<?xml version="1.0" encoding="UTF-8"?>
  76. <beans xmlns="http://www.springframework.org/schema/beans"
  77.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  78.        xmlns:context="http://www.springframework.org/schema/context"
  79.        xmlns:aop="http://www.springframework.org/schema/aop"
  80.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  81.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  82.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  83.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  84.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  85.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  86.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  87.     </zpagenav>    http://www.springframework.org/schema/mvc
  88.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  89.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  90.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  91.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  92.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  93.     </zpagenav>    http://www.springframework.org/schema/aop
  94.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  95.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  96.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  97.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  98.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  99.     </zpagenav>    http://www.springframework.org/schema/context
  100.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  101.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  102.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  103.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  104.     <mvc:annotation-driven></mvc:annotation-driven>
  105.     <aop:aspectj-autoproxy />
  106. </beans>    paramMap.put("costTime",null);<?xml version="1.0" encoding="UTF-8"?>
  107. <beans xmlns="http://www.springframework.org/schema/beans"
  108.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  109.        xmlns:context="http://www.springframework.org/schema/context"
  110.        xmlns:aop="http://www.springframework.org/schema/aop"
  111.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  112.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  113.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  114.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  115.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  116.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  117.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  118.     </zpagenav>    http://www.springframework.org/schema/mvc
  119.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  120.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  121.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  122.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  123.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  124.     </zpagenav>    http://www.springframework.org/schema/aop
  125.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  126.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  127.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  128.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  129.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  130.     </zpagenav>    http://www.springframework.org/schema/context
  131.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  132.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  133.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  134.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  135.     <mvc:annotation-driven></mvc:annotation-driven>
  136.     <aop:aspectj-autoproxy />
  137. </beans>}else{<?xml version="1.0" encoding="UTF-8"?>
  138. <beans xmlns="http://www.springframework.org/schema/beans"
  139.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  140.        xmlns:context="http://www.springframework.org/schema/context"
  141.        xmlns:aop="http://www.springframework.org/schema/aop"
  142.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  143.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  144.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  145.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  146.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  147.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  148.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  149.     </zpagenav>    http://www.springframework.org/schema/mvc
  150.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  151.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  152.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  153.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  154.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  155.     </zpagenav>    http://www.springframework.org/schema/aop
  156.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  157.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  158.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  159.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  160.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  161.     </zpagenav>    http://www.springframework.org/schema/context
  162.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  163.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  164.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  165.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  166.     <mvc:annotation-driven></mvc:annotation-driven>
  167.     <aop:aspectj-autoproxy />
  168. </beans>    paramMap.put("costTime",new Long(paramMap.get("costTime").toString()));<?xml version="1.0" encoding="UTF-8"?>
  169. <beans xmlns="http://www.springframework.org/schema/beans"
  170.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  171.        xmlns:context="http://www.springframework.org/schema/context"
  172.        xmlns:aop="http://www.springframework.org/schema/aop"
  173.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  174.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  175.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  176.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  177.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  178.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  179.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  180.     </zpagenav>    http://www.springframework.org/schema/mvc
  181.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  182.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  183.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  184.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  185.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  186.     </zpagenav>    http://www.springframework.org/schema/aop
  187.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  188.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  189.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  190.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  191.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  192.     </zpagenav>    http://www.springframework.org/schema/context
  193.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  194.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  195.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  196.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  197.     <mvc:annotation-driven></mvc:annotation-driven>
  198.     <aop:aspectj-autoproxy />
  199. </beans>}    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  200.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  201.     </zpagenav>}    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  202.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  203.     </zpagenav>System.out.println(dataMap);    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  204.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  205.     </zpagenav>long countStart = System.currentTimeMillis();    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  206.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  207.     </zpagenav>Long count = operationLogMapper.countByCondition(dataMap);    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  208.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  209.     </zpagenav>long countEnd = System.currentTimeMillis();    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  210.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  211.     </zpagenav>System.out.println("Count Cost Time : " + (countEnd-countStart)+" ms");    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  212.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  213.     </zpagenav>List list = operationLogMapper.selectListByCondition(dataMap);    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  214.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  215.     </zpagenav>long queryEnd = System.currentTimeMillis();    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  216.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  217.     </zpagenav>System.out.println("Query Cost Time : " + (queryEnd-countEnd)+" ms");    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  218.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  219.     </zpagenav>return new PageResult(count,list);    }}
复制代码
4.4.4 Controller
  1. @RestController
  2. @RequestMapping("/operationLog")
  3. public class OperationLogController {
  4.     @Autowired
  5.     private OperationLogService operationLogService;
  6.     @RequestMapping("/findList")
  7.     public PageResult findList(@RequestBody Map dataMap, Integer pageNum , Integer pageSize){
  8.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  9.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  10.     </zpagenav>PageResult page = operationLogService.selectListByCondition(dataMap, pageNum, pageSize);
  11.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  12.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  13.     </zpagenav>return page;
  14.     }
  15. }
复制代码
4.5 日记查询前端代码实现

前端代码使用 BootStrap + AdminLTE 进行布局, 使用Vuejs 进行视图层展示。
4.5.1 js
  1. [/code][size=2]4.5.2 列表数据展示[/size]
  2. [code]<tr v-for="item in dataList">
  3.     <td><input name="ids" type="checkbox"></td>
  4.     <td>{{item.id}}</td>
  5.     <td>{{item.operateClass}}</td>
  6.     <td>{{item.operateMethod}}</td>
  7.     <td>{{item.returnClass}}</td>
  8.     <td>{{item.returnValue}}</td>
  9.     <td>{{item.operateUser}}</td>
  10.     <td>{{item.operateTime}}</td>
  11.     <td>{{item.costTime}}</td>
  12.     <td >
  13.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  14.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  15.     </zpagenav><button type="button" >详情</button>
  16.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  17.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  18.     </zpagenav><button type="button" >删除</button>
  19.     </td>
  20. </tr>
复制代码
4.5.3 分页插件
  1.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  2.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  3.     </zpagenav>
复制代码
4.6 联调测试

可以通过postman来访问业务系统,再查察数据库中的日记信息,验证能不能将用户的访问日记记载下来。

4.7 分析性能题目

系统中用户访问日记的数据量,随着时间的推移,这张表的数据量会越来越大,因此我们需要根据业务需求,来对日记查询模块的性能进行优化。
1) 分页查询优化
由于在进行日记查询时,是进行分页查询,那也就意味着,在查察时,至少需要查询两次:
A. 查询符合条件的总记载数。--> count 操纵
B. 查询符合条件的列表数据。--> 分页查询 limit 操纵
通常来说,count() 都需要扫描大量的行(意味着需要访问大量的数据)才能获得精确的结果,因此是很难对该SQL进行优化操纵的。如果需要对count进行优化,可以采用另外一种思路,可以增加汇总表,或者redis缓存来专门记载该表对应的记载数,这样的话,就可以很轻松的实现汇总数据的查询,而且效率很高,但是这种统计并不能保证百分之百的正确 。对于数据库的操纵,“快速、精确、实现简单”,三者永久只能满足其二,必须舍掉其中一个。
2) 条件查询优化
针对于条件查询,需要对查询条件,及排序字段建立索引。
3) 读写分离
通过主从复制集群,来完成读写分离,使写操纵走主节点, 而读操纵,走从节点。
4) MySQL服务器优化
5) 应用优化
4.8 性能优化 - 分页

4.8.1 优化count

创建一张表用来记载日记表的总数据量:
  1. create table log_counter(
  2.         logcount bigint not null
  3. )engine = innodb default CHARSET = utf8;
复制代码
在每次插入数据之后,更新该表 :
  1. <update id="updateLogCounter" >
  2.     update log_counter set logcount = logcount + 1
  3. </update>
复制代码
在进行分页查询时, 获取总记载数,从该表中查询既可。
  1. <select id="countLogFromCounter" resultType="long">
  2.     select logcount from log_counter limit 1
  3. </select>
复制代码
4.8.2 优化 limit

在进行分页时,一般通过创建覆盖索引,可以或许比较好的进步性能。一个非常常见,而又非常头疼的分页场景就是 "limit 1000000,10" ,此时MySQL需要搜索出前1000010 条记载后,仅仅需要返回第 1000001 到 1000010 条记载,前1000000 记载会被抛弃,查询代价非常大。

当点击比较靠后的页码时,就会出现这个题目,查询效率非常慢。
优化SQL:
  1. select * from operation_log limit 3000000 , 10;
复制代码
将上述SQL优化为 :
  1. select * from operation_log t , (select id from operation_log order by id limit 3000000,10) b where t.id = b.id ;
复制代码
  1.   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 returnValue  from operation_log t,      (select id from operation_log    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  2.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  3.     </zpagenav>   order by id limit #{start},#{rows}) b  where t.id = b.id  
复制代码
4.9 性能优化 - 索引


当根据操纵人进行查询时, 查询的效率很低,耗时比较长。原因就是因为在创建数据库表布局时,并没有针对于 操纵人 字段建立索引。
  1. CREATE INDEX idx_user_method_return_cost ON operation_log(operate_user,operate_method,return_class,cost_time);
复制代码
同上 , 为了查询效率高,我们也需要对 操纵方法、返回值范例、操纵耗时 等字段进行创建索引,以进步查询效率。
  1. CREATE INDEX idx_optlog_method_return_cost ON operation_log(operate_method,return_class,cost_time);
  2. CREATE INDEX idx_optlog_return_cost ON operation_log(return_class,cost_time);
  3. CREATE INDEX idx_optlog_cost ON operation_log(cost_time);
复制代码
4.10 性能优化 - 排序

在查询数据时,如果业务需求中需要我们对结果内容进行了排序处理 , 这个时候,我们还需要对排序的字段建立得当的索引, 来进步排序的效率 。
4.11 性能优化 - 读写分离

4.11.1 概述

在Mysql主从复制的基础上,可以使用读写分离来低落单台Mysql节点的压力,从而来进步访问效率,读写分离的架构如下:

对于读写分离的实现,可以通过Spring AOP 来进举措态的切换数据源,进行操纵 :
4.11.2 实现方式

db.properties
  1. jdbc.write.driver=com.mysql.jdbc.Driver
  2. jdbc.write.url=jdbc:mysql://192.168.142.128:3306/mysql_demo
  3. jdbc.write.username=root
  4. jdbc.write.password=itcast
  5. jdbc.read.driver=com.mysql.jdbc.Driver
  6. jdbc.read.url=jdbc:mysql://192.168.142.129:3306/mysql_demo
  7. jdbc.read.username=root
  8. jdbc.read.password=itcast
复制代码
applicationContext-datasource.xml
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  4.        xmlns:context="http://www.springframework.org/schema/context"
  5.        xmlns:aop="http://www.springframework.org/schema/aop"
  6.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  7.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  8.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  9.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  10.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  11.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  12.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  13.     </zpagenav>    http://www.springframework.org/schema/mvc
  14.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  15.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  16.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  17.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  18.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  19.     </zpagenav>    http://www.springframework.org/schema/aop
  20.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  21.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  22.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  23.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  24.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  25.     </zpagenav>    http://www.springframework.org/schema/context
  26.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  27.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  28.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  29.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  30.     <mvc:annotation-driven></mvc:annotation-driven>
  31.     <aop:aspectj-autoproxy />
  32. </beans><?xml version="1.0" encoding="UTF-8"?>
  33. <beans xmlns="http://www.springframework.org/schema/beans"
  34.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  35.        xmlns:context="http://www.springframework.org/schema/context"
  36.        xmlns:aop="http://www.springframework.org/schema/aop"
  37.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  38.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  39.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  40.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  41.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  42.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  43.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  44.     </zpagenav>    http://www.springframework.org/schema/mvc
  45.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  46.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  47.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  48.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  49.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  50.     </zpagenav>    http://www.springframework.org/schema/aop
  51.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  52.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  53.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  54.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  55.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  56.     </zpagenav>    http://www.springframework.org/schema/context
  57.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  58.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  59.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  60.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  61.     <mvc:annotation-driven></mvc:annotation-driven>
  62.     <aop:aspectj-autoproxy />
  63. </beans><?xml version="1.0" encoding="UTF-8"?>
  64. <beans xmlns="http://www.springframework.org/schema/beans"
  65.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  66.        xmlns:context="http://www.springframework.org/schema/context"
  67.        xmlns:aop="http://www.springframework.org/schema/aop"
  68.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  69.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  70.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  71.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  72.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  73.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  74.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  75.     </zpagenav>    http://www.springframework.org/schema/mvc
  76.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  77.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  78.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  79.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  80.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  81.     </zpagenav>    http://www.springframework.org/schema/aop
  82.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  83.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  84.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  85.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  86.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  87.     </zpagenav>    http://www.springframework.org/schema/context
  88.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  89.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  90.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  91.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  92.     <mvc:annotation-driven></mvc:annotation-driven>
  93.     <aop:aspectj-autoproxy />
  94. </beans><?xml version="1.0" encoding="UTF-8"?>
  95. <beans xmlns="http://www.springframework.org/schema/beans"
  96.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  97.        xmlns:context="http://www.springframework.org/schema/context"
  98.        xmlns:aop="http://www.springframework.org/schema/aop"
  99.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  100.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  101.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  102.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  103.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  104.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  105.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  106.     </zpagenav>    http://www.springframework.org/schema/mvc
  107.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  108.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  109.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  110.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  111.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  112.     </zpagenav>    http://www.springframework.org/schema/aop
  113.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  114.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  115.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  116.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  117.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  118.     </zpagenav>    http://www.springframework.org/schema/context
  119.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  120.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  121.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  122.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  123.     <mvc:annotation-driven></mvc:annotation-driven>
  124.     <aop:aspectj-autoproxy />
  125. </beans><?xml version="1.0" encoding="UTF-8"?>
  126. <beans xmlns="http://www.springframework.org/schema/beans"
  127.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  128.        xmlns:context="http://www.springframework.org/schema/context"
  129.        xmlns:aop="http://www.springframework.org/schema/aop"
  130.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  131.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  132.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  133.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  134.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  135.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  136.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  137.     </zpagenav>    http://www.springframework.org/schema/mvc
  138.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  139.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  140.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  141.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  142.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  143.     </zpagenav>    http://www.springframework.org/schema/aop
  144.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  145.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  146.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  147.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  148.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  149.     </zpagenav>    http://www.springframework.org/schema/context
  150.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  151.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  152.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  153.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  154.     <mvc:annotation-driven></mvc:annotation-driven>
  155.     <aop:aspectj-autoproxy />
  156. </beans><?xml version="1.0" encoding="UTF-8"?>
  157. <beans xmlns="http://www.springframework.org/schema/beans"
  158.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  159.        xmlns:context="http://www.springframework.org/schema/context"
  160.        xmlns:aop="http://www.springframework.org/schema/aop"
  161.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  162.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  163.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  164.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  165.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  166.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  167.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  168.     </zpagenav>    http://www.springframework.org/schema/mvc
  169.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  170.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  171.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  172.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  173.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  174.     </zpagenav>    http://www.springframework.org/schema/aop
  175.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  176.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  177.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  178.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  179.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  180.     </zpagenav>    http://www.springframework.org/schema/context
  181.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  182.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  183.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  184.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  185.     <mvc:annotation-driven></mvc:annotation-driven>
  186.     <aop:aspectj-autoproxy />
  187. </beans><?xml version="1.0" encoding="UTF-8"?>
  188. <beans xmlns="http://www.springframework.org/schema/beans"
  189.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  190.        xmlns:context="http://www.springframework.org/schema/context"
  191.        xmlns:aop="http://www.springframework.org/schema/aop"
  192.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  193.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  194.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  195.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  196.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  197.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  198.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  199.     </zpagenav>    http://www.springframework.org/schema/mvc
  200.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  201.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  202.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  203.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  204.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  205.     </zpagenav>    http://www.springframework.org/schema/aop
  206.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  207.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  208.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  209.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  210.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  211.     </zpagenav>    http://www.springframework.org/schema/context
  212.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  213.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  214.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  215.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  216.     <mvc:annotation-driven></mvc:annotation-driven>
  217.     <aop:aspectj-autoproxy />
  218. </beans><?xml version="1.0" encoding="UTF-8"?>
  219. <beans xmlns="http://www.springframework.org/schema/beans"
  220.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  221.        xmlns:context="http://www.springframework.org/schema/context"
  222.        xmlns:aop="http://www.springframework.org/schema/aop"
  223.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  224.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  225.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  226.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  227.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  228.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  229.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  230.     </zpagenav>    http://www.springframework.org/schema/mvc
  231.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  232.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  233.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  234.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  235.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  236.     </zpagenav>    http://www.springframework.org/schema/aop
  237.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  238.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  239.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  240.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  241.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  242.     </zpagenav>    http://www.springframework.org/schema/context
  243.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  244.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  245.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  246.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  247.     <mvc:annotation-driven></mvc:annotation-driven>
  248.     <aop:aspectj-autoproxy />
  249. </beans><?xml version="1.0" encoding="UTF-8"?>
  250. <beans xmlns="http://www.springframework.org/schema/beans"
  251.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  252.        xmlns:context="http://www.springframework.org/schema/context"
  253.        xmlns:aop="http://www.springframework.org/schema/aop"
  254.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  255.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  256.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  257.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  258.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  259.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  260.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  261.     </zpagenav>    http://www.springframework.org/schema/mvc
  262.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  263.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  264.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  265.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  266.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  267.     </zpagenav>    http://www.springframework.org/schema/aop
  268.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  269.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  270.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  271.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  272.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  273.     </zpagenav>    http://www.springframework.org/schema/context
  274.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  275.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  276.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  277.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  278.     <mvc:annotation-driven></mvc:annotation-driven>
  279.     <aop:aspectj-autoproxy />
  280. </beans><?xml version="1.0" encoding="UTF-8"?>
  281. <beans xmlns="http://www.springframework.org/schema/beans"
  282.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  283.        xmlns:context="http://www.springframework.org/schema/context"
  284.        xmlns:aop="http://www.springframework.org/schema/aop"
  285.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  286.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  287.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  288.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  289.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  290.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  291.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  292.     </zpagenav>    http://www.springframework.org/schema/mvc
  293.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  294.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  295.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  296.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  297.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  298.     </zpagenav>    http://www.springframework.org/schema/aop
  299.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  300.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  301.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  302.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  303.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  304.     </zpagenav>    http://www.springframework.org/schema/context
  305.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  306.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  307.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  308.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  309.     <mvc:annotation-driven></mvc:annotation-driven>
  310.     <aop:aspectj-autoproxy />
  311. </beans><?xml version="1.0" encoding="UTF-8"?>
  312. <beans xmlns="http://www.springframework.org/schema/beans"
  313.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  314.        xmlns:context="http://www.springframework.org/schema/context"
  315.        xmlns:aop="http://www.springframework.org/schema/aop"
  316.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  317.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  318.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  319.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  320.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  321.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  322.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  323.     </zpagenav>    http://www.springframework.org/schema/mvc
  324.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  325.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  326.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  327.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  328.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  329.     </zpagenav>    http://www.springframework.org/schema/aop
  330.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  331.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  332.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  333.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  334.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  335.     </zpagenav>    http://www.springframework.org/schema/context
  336.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  337.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  338.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  339.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  340.     <mvc:annotation-driven></mvc:annotation-driven>
  341.     <aop:aspectj-autoproxy />
  342. </beans><?xml version="1.0" encoding="UTF-8"?>
  343. <beans xmlns="http://www.springframework.org/schema/beans"
  344.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  345.        xmlns:context="http://www.springframework.org/schema/context"
  346.        xmlns:aop="http://www.springframework.org/schema/aop"
  347.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  348.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  349.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  350.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  351.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  352.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  353.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  354.     </zpagenav>    http://www.springframework.org/schema/mvc
  355.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  356.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  357.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  358.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  359.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  360.     </zpagenav>    http://www.springframework.org/schema/aop
  361.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  362.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  363.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  364.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  365.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  366.     </zpagenav>    http://www.springframework.org/schema/context
  367.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  368.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  369.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  370.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  371.     <mvc:annotation-driven></mvc:annotation-driven>
  372.     <aop:aspectj-autoproxy />
  373. </beans><?xml version="1.0" encoding="UTF-8"?>
  374. <beans xmlns="http://www.springframework.org/schema/beans"
  375.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  376.        xmlns:context="http://www.springframework.org/schema/context"
  377.        xmlns:aop="http://www.springframework.org/schema/aop"
  378.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  379.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  380.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  381.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  382.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  383.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  384.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  385.     </zpagenav>    http://www.springframework.org/schema/mvc
  386.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  387.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  388.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  389.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  390.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  391.     </zpagenav>    http://www.springframework.org/schema/aop
  392.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  393.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  394.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  395.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  396.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  397.     </zpagenav>    http://www.springframework.org/schema/context
  398.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  399.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  400.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  401.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  402.     <mvc:annotation-driven></mvc:annotation-driven>
  403.     <aop:aspectj-autoproxy />
  404. </beans><?xml version="1.0" encoding="UTF-8"?>
  405. <beans xmlns="http://www.springframework.org/schema/beans"
  406.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  407.        xmlns:context="http://www.springframework.org/schema/context"
  408.        xmlns:aop="http://www.springframework.org/schema/aop"
  409.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  410.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  411.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  412.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  413.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  414.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  415.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  416.     </zpagenav>    http://www.springframework.org/schema/mvc
  417.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  418.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  419.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  420.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  421.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  422.     </zpagenav>    http://www.springframework.org/schema/aop
  423.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  424.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  425.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  426.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  427.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  428.     </zpagenav>    http://www.springframework.org/schema/context
  429.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  430.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  431.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  432.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  433.     <mvc:annotation-driven></mvc:annotation-driven>
  434.     <aop:aspectj-autoproxy />
  435. </beans><?xml version="1.0" encoding="UTF-8"?>
  436. <beans xmlns="http://www.springframework.org/schema/beans"
  437.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  438.        xmlns:context="http://www.springframework.org/schema/context"
  439.        xmlns:aop="http://www.springframework.org/schema/aop"
  440.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  441.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  442.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  443.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  444.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  445.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  446.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  447.     </zpagenav>    http://www.springframework.org/schema/mvc
  448.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  449.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  450.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  451.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  452.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  453.     </zpagenav>    http://www.springframework.org/schema/aop
  454.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  455.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  456.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  457.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  458.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  459.     </zpagenav>    http://www.springframework.org/schema/context
  460.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  461.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  462.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  463.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  464.     <mvc:annotation-driven></mvc:annotation-driven>
  465.     <aop:aspectj-autoproxy />
  466. </beans><?xml version="1.0" encoding="UTF-8"?>
  467. <beans xmlns="http://www.springframework.org/schema/beans"
  468.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  469.        xmlns:context="http://www.springframework.org/schema/context"
  470.        xmlns:aop="http://www.springframework.org/schema/aop"
  471.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  472.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  473.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  474.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  475.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  476.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  477.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  478.     </zpagenav>    http://www.springframework.org/schema/mvc
  479.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  480.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  481.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  482.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  483.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  484.     </zpagenav>    http://www.springframework.org/schema/aop
  485.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  486.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  487.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  488.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  489.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  490.     </zpagenav>    http://www.springframework.org/schema/context
  491.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  492.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  493.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  494.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  495.     <mvc:annotation-driven></mvc:annotation-driven>
  496.     <aop:aspectj-autoproxy />
  497. </beans><?xml version="1.0" encoding="UTF-8"?>
  498. <beans xmlns="http://www.springframework.org/schema/beans"
  499.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  500.        xmlns:context="http://www.springframework.org/schema/context"
  501.        xmlns:aop="http://www.springframework.org/schema/aop"
  502.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  503.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  504.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  505.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  506.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  507.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  508.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  509.     </zpagenav>    http://www.springframework.org/schema/mvc
  510.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  511.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  512.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  513.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  514.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  515.     </zpagenav>    http://www.springframework.org/schema/aop
  516.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  517.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  518.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  519.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  520.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  521.     </zpagenav>    http://www.springframework.org/schema/context
  522.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  523.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  524.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  525.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  526.     <mvc:annotation-driven></mvc:annotation-driven>
  527.     <aop:aspectj-autoproxy />
  528. </beans><?xml version="1.0" encoding="UTF-8"?>
  529. <beans xmlns="http://www.springframework.org/schema/beans"
  530.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  531.        xmlns:context="http://www.springframework.org/schema/context"
  532.        xmlns:aop="http://www.springframework.org/schema/aop"
  533.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  534.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  535.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  536.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  537.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  538.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  539.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  540.     </zpagenav>    http://www.springframework.org/schema/mvc
  541.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  542.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  543.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  544.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  545.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  546.     </zpagenav>    http://www.springframework.org/schema/aop
  547.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  548.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  549.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  550.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  551.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  552.     </zpagenav>    http://www.springframework.org/schema/context
  553.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  554.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  555.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  556.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  557.     <mvc:annotation-driven></mvc:annotation-driven>
  558.     <aop:aspectj-autoproxy />
  559. </beans><?xml version="1.0" encoding="UTF-8"?>
  560. <beans xmlns="http://www.springframework.org/schema/beans"
  561.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  562.        xmlns:context="http://www.springframework.org/schema/context"
  563.        xmlns:aop="http://www.springframework.org/schema/aop"
  564.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  565.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  566.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  567.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  568.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  569.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  570.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  571.     </zpagenav>    http://www.springframework.org/schema/mvc
  572.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  573.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  574.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  575.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  576.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  577.     </zpagenav>    http://www.springframework.org/schema/aop
  578.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  579.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  580.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  581.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  582.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  583.     </zpagenav>    http://www.springframework.org/schema/context
  584.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  585.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  586.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  587.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  588.     <mvc:annotation-driven></mvc:annotation-driven>
  589.     <aop:aspectj-autoproxy />
  590. </beans><?xml version="1.0" encoding="UTF-8"?>
  591. <beans xmlns="http://www.springframework.org/schema/beans"
  592.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  593.        xmlns:context="http://www.springframework.org/schema/context"
  594.        xmlns:aop="http://www.springframework.org/schema/aop"
  595.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  596.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  597.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  598.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  599.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  600.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  601.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  602.     </zpagenav>    http://www.springframework.org/schema/mvc
  603.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  604.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  605.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  606.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  607.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  608.     </zpagenav>    http://www.springframework.org/schema/aop
  609.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  610.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  611.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  612.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  613.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  614.     </zpagenav>    http://www.springframework.org/schema/context
  615.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  616.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  617.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  618.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  619.     <mvc:annotation-driven></mvc:annotation-driven>
  620.     <aop:aspectj-autoproxy />
  621. </beans><?xml version="1.0" encoding="UTF-8"?>
  622. <beans xmlns="http://www.springframework.org/schema/beans"
  623.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  624.        xmlns:context="http://www.springframework.org/schema/context"
  625.        xmlns:aop="http://www.springframework.org/schema/aop"
  626.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  627.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  628.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  629.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  630.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  631.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  632.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  633.     </zpagenav>    http://www.springframework.org/schema/mvc
  634.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  635.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  636.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  637.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  638.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  639.     </zpagenav>    http://www.springframework.org/schema/aop
  640.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  641.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  642.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  643.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  644.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  645.     </zpagenav>    http://www.springframework.org/schema/context
  646.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  647.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  648.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  649.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  650.     <mvc:annotation-driven></mvc:annotation-driven>
  651.     <aop:aspectj-autoproxy />
  652. </beans>
复制代码
ChooseDataSource
  1. 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"
  2.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  3.     </zpagenav>return DataSourceHandler.getDataSource();    }    // 设置方法名前缀对应的数据源    public void setMethodType(Map map) {    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  4.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  5.     </zpagenav>for (String key : map.keySet()) {<?xml version="1.0" encoding="UTF-8"?>
  6. <beans xmlns="http://www.springframework.org/schema/beans"
  7.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  8.        xmlns:context="http://www.springframework.org/schema/context"
  9.        xmlns:aop="http://www.springframework.org/schema/aop"
  10.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  11.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  12.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  13.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  14.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  15.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  16.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  17.     </zpagenav>    http://www.springframework.org/schema/mvc
  18.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  19.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  20.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  21.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  22.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  23.     </zpagenav>    http://www.springframework.org/schema/aop
  24.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  25.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  26.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  27.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  28.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  29.     </zpagenav>    http://www.springframework.org/schema/context
  30.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  31.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  32.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  33.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  34.     <mvc:annotation-driven></mvc:annotation-driven>
  35.     <aop:aspectj-autoproxy />
  36. </beans>List v = new ArrayList();<?xml version="1.0" encoding="UTF-8"?>
  37. <beans xmlns="http://www.springframework.org/schema/beans"
  38.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  39.        xmlns:context="http://www.springframework.org/schema/context"
  40.        xmlns:aop="http://www.springframework.org/schema/aop"
  41.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  42.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  43.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  44.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  45.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  46.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  47.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  48.     </zpagenav>    http://www.springframework.org/schema/mvc
  49.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  50.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  51.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  52.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  53.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  54.     </zpagenav>    http://www.springframework.org/schema/aop
  55.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  56.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  57.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  58.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  59.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  60.     </zpagenav>    http://www.springframework.org/schema/context
  61.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  62.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  63.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  64.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  65.     <mvc:annotation-driven></mvc:annotation-driven>
  66.     <aop:aspectj-autoproxy />
  67. </beans>String[] types = map.get(key).split(",");<?xml version="1.0" encoding="UTF-8"?>
  68. <beans xmlns="http://www.springframework.org/schema/beans"
  69.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  70.        xmlns:context="http://www.springframework.org/schema/context"
  71.        xmlns:aop="http://www.springframework.org/schema/aop"
  72.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  73.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  74.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  75.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  76.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  77.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  78.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  79.     </zpagenav>    http://www.springframework.org/schema/mvc
  80.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  81.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  82.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  83.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  84.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  85.     </zpagenav>    http://www.springframework.org/schema/aop
  86.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  87.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  88.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  89.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  90.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  91.     </zpagenav>    http://www.springframework.org/schema/context
  92.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  93.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  94.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  95.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  96.     <mvc:annotation-driven></mvc:annotation-driven>
  97.     <aop:aspectj-autoproxy />
  98. </beans>for (String type : types) {<?xml version="1.0" encoding="UTF-8"?>
  99. <beans xmlns="http://www.springframework.org/schema/beans"
  100.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  101.        xmlns:context="http://www.springframework.org/schema/context"
  102.        xmlns:aop="http://www.springframework.org/schema/aop"
  103.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  104.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  105.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  106.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  107.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  108.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  109.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  110.     </zpagenav>    http://www.springframework.org/schema/mvc
  111.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  112.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  113.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  114.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  115.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  116.     </zpagenav>    http://www.springframework.org/schema/aop
  117.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  118.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  119.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  120.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  121.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  122.     </zpagenav>    http://www.springframework.org/schema/context
  123.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  124.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  125.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  126.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  127.     <mvc:annotation-driven></mvc:annotation-driven>
  128.     <aop:aspectj-autoproxy />
  129. </beans>    if (!StringUtils.isEmpty(type)) {<?xml version="1.0" encoding="UTF-8"?>
  130. <beans xmlns="http://www.springframework.org/schema/beans"
  131.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  132.        xmlns:context="http://www.springframework.org/schema/context"
  133.        xmlns:aop="http://www.springframework.org/schema/aop"
  134.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  135.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  136.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  137.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  138.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  139.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  140.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  141.     </zpagenav>    http://www.springframework.org/schema/mvc
  142.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  143.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  144.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  145.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  146.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  147.     </zpagenav>    http://www.springframework.org/schema/aop
  148.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  149.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  150.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  151.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  152.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  153.     </zpagenav>    http://www.springframework.org/schema/context
  154.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  155.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  156.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  157.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  158.     <mvc:annotation-driven></mvc:annotation-driven>
  159.     <aop:aspectj-autoproxy />
  160. </beans>    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  161.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  162.     </zpagenav>v.add(type);<?xml version="1.0" encoding="UTF-8"?>
  163. <beans xmlns="http://www.springframework.org/schema/beans"
  164.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  165.        xmlns:context="http://www.springframework.org/schema/context"
  166.        xmlns:aop="http://www.springframework.org/schema/aop"
  167.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  168.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  169.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  170.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  171.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  172.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  173.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  174.     </zpagenav>    http://www.springframework.org/schema/mvc
  175.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  176.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  177.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  178.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  179.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  180.     </zpagenav>    http://www.springframework.org/schema/aop
  181.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  182.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  183.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  184.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  185.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  186.     </zpagenav>    http://www.springframework.org/schema/context
  187.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  188.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  189.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  190.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  191.     <mvc:annotation-driven></mvc:annotation-driven>
  192.     <aop:aspectj-autoproxy />
  193. </beans>    }<?xml version="1.0" encoding="UTF-8"?>
  194. <beans xmlns="http://www.springframework.org/schema/beans"
  195.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  196.        xmlns:context="http://www.springframework.org/schema/context"
  197.        xmlns:aop="http://www.springframework.org/schema/aop"
  198.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  199.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  200.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  201.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  202.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  203.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  204.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  205.     </zpagenav>    http://www.springframework.org/schema/mvc
  206.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  207.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  208.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  209.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  210.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  211.     </zpagenav>    http://www.springframework.org/schema/aop
  212.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  213.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  214.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  215.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  216.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  217.     </zpagenav>    http://www.springframework.org/schema/context
  218.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  219.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  220.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  221.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  222.     <mvc:annotation-driven></mvc:annotation-driven>
  223.     <aop:aspectj-autoproxy />
  224. </beans>}<?xml version="1.0" encoding="UTF-8"?>
  225. <beans xmlns="http://www.springframework.org/schema/beans"
  226.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  227.        xmlns:context="http://www.springframework.org/schema/context"
  228.        xmlns:aop="http://www.springframework.org/schema/aop"
  229.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  230.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  231.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  232.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  233.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  234.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  235.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  236.     </zpagenav>    http://www.springframework.org/schema/mvc
  237.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  238.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  239.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  240.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  241.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  242.     </zpagenav>    http://www.springframework.org/schema/aop
  243.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  244.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  245.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  246.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  247.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  248.     </zpagenav>    http://www.springframework.org/schema/context
  249.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  250.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  251.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  252.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  253.     <mvc:annotation-driven></mvc:annotation-driven>
  254.     <aop:aspectj-autoproxy />
  255. </beans>METHOD_TYPE_MAP.put(key, v);    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  256.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  257.     </zpagenav>}    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  258.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  259.     </zpagenav>System.out.println("METHOD_TYPE_MAP : "+METHOD_TYPE_MAP);    }}
复制代码
DataSourceHandler
  1. 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"
  2.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  3.     </zpagenav>holder.set(datasource);    }    /**     * 从holer中获取数据源字符串     */    public static String getDataSource() {    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  4.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  5.     </zpagenav>return holder.get();    }}
复制代码
DataSourceAspect
  1. @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"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  4.        xmlns:context="http://www.springframework.org/schema/context"
  5.        xmlns:aop="http://www.springframework.org/schema/aop"
  6.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  7.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  8.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  9.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  10.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  11.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  12.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  13.     </zpagenav>    http://www.springframework.org/schema/mvc
  14.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  15.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  16.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  17.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  18.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  19.     </zpagenav>    http://www.springframework.org/schema/aop
  20.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  21.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  22.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  23.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  24.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  25.     </zpagenav>    http://www.springframework.org/schema/context
  26.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  27.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  28.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  29.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  30.     <mvc:annotation-driven></mvc:annotation-driven>
  31.     <aop:aspectj-autoproxy />
  32. </beans>    String className = point.getTarget().getClass().getName();    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  33.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  34.     </zpagenav>String method = point.getSignature().getName();    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  35.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  36.     </zpagenav>logger.info(className + "." + method + "(" + Arrays.asList(point.getArgs())+ ")");    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  37.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  38.     </zpagenav>try {<?xml version="1.0" encoding="UTF-8"?>
  39. <beans xmlns="http://www.springframework.org/schema/beans"
  40.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  41.        xmlns:context="http://www.springframework.org/schema/context"
  42.        xmlns:aop="http://www.springframework.org/schema/aop"
  43.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  44.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  45.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  46.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  47.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  48.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  49.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  50.     </zpagenav>    http://www.springframework.org/schema/mvc
  51.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  52.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  53.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  54.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  55.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  56.     </zpagenav>    http://www.springframework.org/schema/aop
  57.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  58.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  59.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  60.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  61.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  62.     </zpagenav>    http://www.springframework.org/schema/context
  63.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  64.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  65.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  66.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  67.     <mvc:annotation-driven></mvc:annotation-driven>
  68.     <aop:aspectj-autoproxy />
  69. </beans>for (String key : ChooseDataSource.METHOD_TYPE_MAP.keySet()) {<?xml version="1.0" encoding="UTF-8"?>
  70. <beans xmlns="http://www.springframework.org/schema/beans"
  71.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  72.        xmlns:context="http://www.springframework.org/schema/context"
  73.        xmlns:aop="http://www.springframework.org/schema/aop"
  74.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  75.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  76.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  77.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  78.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  79.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  80.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  81.     </zpagenav>    http://www.springframework.org/schema/mvc
  82.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  83.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  84.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  85.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  86.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  87.     </zpagenav>    http://www.springframework.org/schema/aop
  88.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  89.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  90.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  91.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  92.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  93.     </zpagenav>    http://www.springframework.org/schema/context
  94.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  95.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  96.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  97.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  98.     <mvc:annotation-driven></mvc:annotation-driven>
  99.     <aop:aspectj-autoproxy />
  100. </beans>    for (String type : ChooseDataSource.METHOD_TYPE_MAP.get(key)) {<?xml version="1.0" encoding="UTF-8"?>
  101. <beans xmlns="http://www.springframework.org/schema/beans"
  102.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  103.        xmlns:context="http://www.springframework.org/schema/context"
  104.        xmlns:aop="http://www.springframework.org/schema/aop"
  105.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  106.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  107.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  108.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  109.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  110.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  111.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  112.     </zpagenav>    http://www.springframework.org/schema/mvc
  113.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  114.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  115.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  116.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  117.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  118.     </zpagenav>    http://www.springframework.org/schema/aop
  119.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  120.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  121.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  122.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  123.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  124.     </zpagenav>    http://www.springframework.org/schema/context
  125.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  126.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  127.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  128.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  129.     <mvc:annotation-driven></mvc:annotation-driven>
  130.     <aop:aspectj-autoproxy />
  131. </beans>    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  132.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  133.     </zpagenav>if (method.startsWith(type)) {<?xml version="1.0" encoding="UTF-8"?>
  134. <beans xmlns="http://www.springframework.org/schema/beans"
  135.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  136.        xmlns:context="http://www.springframework.org/schema/context"
  137.        xmlns:aop="http://www.springframework.org/schema/aop"
  138.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  139.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  140.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  141.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  142.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  143.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  144.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  145.     </zpagenav>    http://www.springframework.org/schema/mvc
  146.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  147.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  148.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  149.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  150.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  151.     </zpagenav>    http://www.springframework.org/schema/aop
  152.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  153.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  154.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  155.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  156.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  157.     </zpagenav>    http://www.springframework.org/schema/context
  158.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  159.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  160.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  161.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  162.     <mvc:annotation-driven></mvc:annotation-driven>
  163.     <aop:aspectj-autoproxy />
  164. </beans><?xml version="1.0" encoding="UTF-8"?>
  165. <beans xmlns="http://www.springframework.org/schema/beans"
  166.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  167.        xmlns:context="http://www.springframework.org/schema/context"
  168.        xmlns:aop="http://www.springframework.org/schema/aop"
  169.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  170.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  171.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  172.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  173.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  174.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  175.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  176.     </zpagenav>    http://www.springframework.org/schema/mvc
  177.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  178.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  179.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  180.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  181.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  182.     </zpagenav>    http://www.springframework.org/schema/aop
  183.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  184.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  185.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  186.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  187.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  188.     </zpagenav>    http://www.springframework.org/schema/context
  189.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  190.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  191.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  192.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  193.     <mvc:annotation-driven></mvc:annotation-driven>
  194.     <aop:aspectj-autoproxy />
  195. </beans>System.out.println("key : " + key);<?xml version="1.0" encoding="UTF-8"?>
  196. <beans xmlns="http://www.springframework.org/schema/beans"
  197.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  198.        xmlns:context="http://www.springframework.org/schema/context"
  199.        xmlns:aop="http://www.springframework.org/schema/aop"
  200.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  201.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  202.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  203.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  204.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  205.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  206.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  207.     </zpagenav>    http://www.springframework.org/schema/mvc
  208.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  209.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  210.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  211.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  212.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  213.     </zpagenav>    http://www.springframework.org/schema/aop
  214.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  215.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  216.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  217.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  218.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  219.     </zpagenav>    http://www.springframework.org/schema/context
  220.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  221.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  222.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  223.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  224.     <mvc:annotation-driven></mvc:annotation-driven>
  225.     <aop:aspectj-autoproxy />
  226. </beans><?xml version="1.0" encoding="UTF-8"?>
  227. <beans xmlns="http://www.springframework.org/schema/beans"
  228.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  229.        xmlns:context="http://www.springframework.org/schema/context"
  230.        xmlns:aop="http://www.springframework.org/schema/aop"
  231.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  232.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  233.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  234.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  235.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  236.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  237.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  238.     </zpagenav>    http://www.springframework.org/schema/mvc
  239.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  240.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  241.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  242.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  243.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  244.     </zpagenav>    http://www.springframework.org/schema/aop
  245.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  246.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  247.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  248.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  249.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  250.     </zpagenav>    http://www.springframework.org/schema/context
  251.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  252.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  253.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  254.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  255.     <mvc:annotation-driven></mvc:annotation-driven>
  256.     <aop:aspectj-autoproxy />
  257. </beans>DataSourceHandler.putDataSource(key);<?xml version="1.0" encoding="UTF-8"?>
  258. <beans xmlns="http://www.springframework.org/schema/beans"
  259.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  260.        xmlns:context="http://www.springframework.org/schema/context"
  261.        xmlns:aop="http://www.springframework.org/schema/aop"
  262.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  263.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  264.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  265.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  266.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  267.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  268.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  269.     </zpagenav>    http://www.springframework.org/schema/mvc
  270.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  271.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  272.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  273.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  274.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  275.     </zpagenav>    http://www.springframework.org/schema/aop
  276.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  277.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  278.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  279.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  280.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  281.     </zpagenav>    http://www.springframework.org/schema/context
  282.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  283.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  284.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  285.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  286.     <mvc:annotation-driven></mvc:annotation-driven>
  287.     <aop:aspectj-autoproxy />
  288. </beans><?xml version="1.0" encoding="UTF-8"?>
  289. <beans xmlns="http://www.springframework.org/schema/beans"
  290.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  291.        xmlns:context="http://www.springframework.org/schema/context"
  292.        xmlns:aop="http://www.springframework.org/schema/aop"
  293.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  294.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  295.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  296.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  297.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  298.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  299.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  300.     </zpagenav>    http://www.springframework.org/schema/mvc
  301.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  302.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  303.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  304.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  305.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  306.     </zpagenav>    http://www.springframework.org/schema/aop
  307.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  308.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  309.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  310.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  311.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  312.     </zpagenav>    http://www.springframework.org/schema/context
  313.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  314.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  315.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  316.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  317.     <mvc:annotation-driven></mvc:annotation-driven>
  318.     <aop:aspectj-autoproxy />
  319. </beans>break;<?xml version="1.0" encoding="UTF-8"?>
  320. <beans xmlns="http://www.springframework.org/schema/beans"
  321.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  322.        xmlns:context="http://www.springframework.org/schema/context"
  323.        xmlns:aop="http://www.springframework.org/schema/aop"
  324.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  325.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  326.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  327.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  328.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  329.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  330.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  331.     </zpagenav>    http://www.springframework.org/schema/mvc
  332.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  333.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  334.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  335.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  336.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  337.     </zpagenav>    http://www.springframework.org/schema/aop
  338.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  339.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  340.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  341.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  342.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  343.     </zpagenav>    http://www.springframework.org/schema/context
  344.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  345.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  346.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  347.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  348.     <mvc:annotation-driven></mvc:annotation-driven>
  349.     <aop:aspectj-autoproxy />
  350. </beans>    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  351.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  352.     </zpagenav>}<?xml version="1.0" encoding="UTF-8"?>
  353. <beans xmlns="http://www.springframework.org/schema/beans"
  354.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  355.        xmlns:context="http://www.springframework.org/schema/context"
  356.        xmlns:aop="http://www.springframework.org/schema/aop"
  357.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  358.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  359.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  360.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  361.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  362.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  363.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  364.     </zpagenav>    http://www.springframework.org/schema/mvc
  365.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  366.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  367.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  368.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  369.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  370.     </zpagenav>    http://www.springframework.org/schema/aop
  371.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  372.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  373.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  374.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  375.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  376.     </zpagenav>    http://www.springframework.org/schema/context
  377.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  378.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  379.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  380.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  381.     <mvc:annotation-driven></mvc:annotation-driven>
  382.     <aop:aspectj-autoproxy />
  383. </beans>    }<?xml version="1.0" encoding="UTF-8"?>
  384. <beans xmlns="http://www.springframework.org/schema/beans"
  385.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  386.        xmlns:context="http://www.springframework.org/schema/context"
  387.        xmlns:aop="http://www.springframework.org/schema/aop"
  388.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  389.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  390.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  391.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  392.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  393.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  394.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  395.     </zpagenav>    http://www.springframework.org/schema/mvc
  396.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  397.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  398.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  399.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  400.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  401.     </zpagenav>    http://www.springframework.org/schema/aop
  402.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  403.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  404.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  405.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  406.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  407.     </zpagenav>    http://www.springframework.org/schema/context
  408.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  409.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  410.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  411.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  412.     <mvc:annotation-driven></mvc:annotation-driven>
  413.     <aop:aspectj-autoproxy />
  414. </beans>}    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  415.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  416.     </zpagenav>} catch (Exception e) {<?xml version="1.0" encoding="UTF-8"?>
  417. <beans xmlns="http://www.springframework.org/schema/beans"
  418.        xmlns:mvc="http://www.springframework.org/schema/mvc"
  419.        xmlns:context="http://www.springframework.org/schema/context"
  420.        xmlns:aop="http://www.springframework.org/schema/aop"
  421.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  422.        xsi:schemaLocation="http://www.springframework.org/schema/beans
  423.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  424.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  425.     </zpagenav>    http://www.springframework.org/schema/beans/spring-beans.xsd
  426.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  427.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  428.     </zpagenav>    http://www.springframework.org/schema/mvc
  429.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  430.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  431.     </zpagenav>    http://www.springframework.org/schema/mvc/spring-mvc.xsd
  432.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  433.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  434.     </zpagenav>    http://www.springframework.org/schema/aop
  435.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  436.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  437.     </zpagenav>    http://www.springframework.org/schema/aop/spring-aop.xsd
  438.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  439.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  440.     </zpagenav>    http://www.springframework.org/schema/context
  441.     <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  442.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  443.     </zpagenav>    http://www.springframework.org/schema/context/spring-context.xsd">
  444.     <context:component-scan base-package="cn.itcast.controller"></context:component-scan>
  445.     <mvc:annotation-driven></mvc:annotation-driven>
  446.     <aop:aspectj-autoproxy />
  447. </beans>e.printStackTrace();    <zpagenav v-bind:page="page" v-bind:page-size="pageSize" v-bind:total="total"
  448.               v-bind:max-page="maxPage"  v-on:pagehandler="pageHandler">
  449.     </zpagenav>}    }}
复制代码
通过 @Order(-9999) 注解来控制事务管理器, 与该通知类的加载顺序 , 需要让通知类 , 先加载 , 来判定使用哪个数据源 .
4.11.3 验证

在主库和从库中,执行如下SQL语句,来查察是否读的时候, 从从库中读取 ; 写入操纵的时候,是否写入到主库。
  1. show status like 'Innodb_rows_%' ;
复制代码

4.11.4 原理


4.12 性能优化 - 应用优化

4.12.1 缓存

可以在业务系统中使用redis来做缓存,缓存一些基础性的数据,来低落关系型数据库的压力,进步访问效率。
4.12.2 全文检索

如果业务系统中的数据量比较大(到达万万级别),这个时候,如果再对数据库进行查询,特别是进行分页查询,速度将变得很慢(因为在分页时起首需要count求合计数),为了进步访问效率,这个时候,可以考虑加入Solr 或者 ElasticSearch全文检索服务,来进步访问效率。
4.13.3 非关系数据库

也可以考虑将非焦点(重要)数据,存在 MongoDB 中,这样可以进步插入以及查询的效率。

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

0 个回复

倒序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

金牌会员
这个人很懒什么都没写!

标签云

快速回复 返回顶部 返回列表