~~~
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/aop https://www.springframework.org/schema/aop/spring-aop.xsd">
<!-- 1.注冊目標對象 -->
<bean name="userService" class="com.nobb.service.UserServiceImpl" ></bean>
<!-- 2.注冊通知對象 -->
<bean name="myAdvice" class="com.nobb.advice.MyAdvice" ></bean>
<!-- 3.配置織入(切面) -->
<aop:config>
<!-- 配置切點
id:為配置的切點起個名字,為了方便后續引用
expression:切點表達式,描述誰是切點
切點表達式語法:
execution:描述具體哪個類中的哪個方法需要增強
語法: execution(返回值 包名.類名.方法名(方法參數))
例子: execution(void com.kaikeba.service.UserServiceImpl.save()) 指定某一個方法為切點
execution(* com.kaikeba.service.UserServiceImpl.save()) 方法返回值任意
execution(* com.kaikeba.service.*ServiceImpl.save()) 指定包中以ServiceImpl結尾的類
execution(* com.kaikeba.service.*ServiceImpl.*()) 空參方法名任意
execution(* com.kaikeba.service.*ServiceImpl.*(..)) 參數列表任意(常用)
execution(* com.kaikeba.service.*ServiceImpl.*(Long,..)) 第一個參數是Long型,其他任意.
execution(* *..*.*ServiceImpl.*(..)) 任意包下
execution(* *..*.*.*(..)) 所有類中的所有方法都是切點(開玩笑,不常用)
-->
<aop:pointcut id="myPC" expression="execution(* com.nobb.service.*ServiceImpl.*(..))"/>
<!-- 配置切面
切面:切點+通知
ref:指定通知對象
-->
<aop:aspect ref="myAdvice" >
<!-- 前置切面:切點+前置通知 -->
<aop:before method="before" pointcut-ref="myPC"/>
<!-- 后置通知 -->
<aop:after-returning method="after" pointcut-ref="myPC"/>
<!-- 最終通知 -->
<aop:after method="end" pointcut-ref="myPC"/>
<!-- 異常通知 -->
<aop:after-throwing method="afterThrowing" pointcut-ref="myPC"/>
</aop:aspect>
</aop:config>
</beans>
~~~
- mybatis
- 基礎
- maven依賴
- 主配置文件
- 實體映射表
- Mapper接口
- xxxMapper.xml
- 代碼測試
- CURD
- 查詢操作
- 新增操作
- 修改操作
- 刪除操作
- 生命周期&作用域
- 實體類型配置別名
- 進階查詢
- 列名與屬性名不對應
- 多條件sql查詢
- 模糊查詢
- 獲取保存后的主鍵
- 動態sql
- where配合If
- where配合choose
- where配合foreach
- Sql片段
- 關聯查詢
- 表結構設計及實體類
- 多對一&一對一
- 一對多
- 多對多
- 嵌套查詢(多條sql)
- 多對一&一對一
- 一對多
- 多對多
- 加載策略
- 緩存
- 一級緩存
- 二級緩存
- 配置進階
- properties
- mapper注冊
- 連接池
- 注解開發
- spring
- 基礎
- maven依賴
- bean創建
- 基礎配置
- 測試代碼
- 簡單原理
- 構造方法創建對象
- 靜態工廠創建對象
- 動態工廠創建對象
- 作用域
- 初始化&銷毀方法
- 單例和原型作用域
- 依賴注入
- 構造方法注入
- set方法注入
- 集合&數組屬性注入
- 配置文件模塊化
- 注解配置
- 配置相關
- 注解釋義
- 純注解配置
- 小結
- Spring整合junit
- 依賴管理
- 使用
- Aop
- 依賴管理
- 配置相關
- aopDemo(非環繞通知)
- 名詞解釋
- 環繞通知
- xml混合注解Aop開發
- 純注解Aop
- Aop事務
- 代理相關
- 動態代理觀光代碼
- cglib代理觀光代碼
- SpringMVC
- 基礎
- 依賴管理
- 配置web.xml
- spring-mvc.xml
- idea tomcat配置
- Hello Controller
- Api解析
- @Controller
- @RequestMapping
- 編碼問題解決
- 獲取請求頭信息
- 獲取Cookie的值
- json相關
- 依賴管理
- 接收json請求參數
- 以json形式返回給客戶端
- restful風格
- 轉發
- 重定向
- 頁面傳值
- Request域
- Session域
- Aop異常處理
- 攔截器
- 番外篇
- Tomcat
- Servlet
- 創建
- 線程安全問題
- 生命周期相關
- Filter
- Listener
- ssm整合
- mybatis基礎篇
- mybatis依賴
- mybatis實體
- Mapper接口
- mybatis配置
- 測試代碼
- spring基礎篇
- 依賴
- AccountService接口
- AccountServiceImpl
- 測試代碼
- springmvc
- 依賴
- web.xml
- spring-mvc.xml
- AccountController
- spring整合mybatis
- 依賴
- 配置
- spring整合springmvc
- web.xml
- SpringBoot
- maven配置
- 引入SpringBoot技術
- 入口及測試控制器
- 打包插件
- 配置相關
- 配置實踐
- 配置自動適配
- 配置校驗
- 配置文件制定
- SpringBoot整合Junit
- 整合mybatis
- 依賴管理
- 配置相關
- @Mapper
- 整合freemarker
- 依賴管理
- 配置相關
- 測試控制器
- 目錄相關
- 驗證器
- maven依賴
- 驗證器定義
- 控制器接收參數
- 全局異常通知
- filter跨域解決方案
- 模板相關問題
- 上傳解決方案
- redis相關
- maven依賴管理
- 配置相關
- cache簡單封裝
- json處理
- SpringCloud
- 簡介
- 版本號
- eureka
- 簡介
- 組件
- eureka服務依賴
- eureka配置
- 項目啟動
- 父類依賴庫
- eureka_cli
- eureka客戶端依賴
- 配置項
- 啟動項
- eureka集群原理
- ribbon
- maven
- 配置
- 微服務實戰
- 項目架構
- 基類依賴
- eureka注冊中心
- 1依賴相關
- 2.配置相關
- 3.啟動項
- 業務service
- supergo-manager-service
- 依賴
- 配置
- 數據源監控
- 啟動項
- feign調用
- supergo-manager-feign
- 依賴
- 調用代碼
- 接口層
- supergo-manager-web
- 依賴
- 配置項
- 啟動項
- 通用mapper
- 逆向工程
- 數據庫連接配置
- 逆向工程配置
- 操作
- base-service
- 簡介
- 跨域
- 網關層
- zuul
- 依賴項
- 配置
- 啟動項