原创 springboot(3)- 屬性注入

1 banner 配置 1.1 關閉 banner package com.tzb; import org.springframework.boot.Banner; import org.springframework.b

原创 springboot(5)- profile

1 不同環境的採用不同的配置文件

原创 Spring Boot (3) - 集成 mybatis,junit, spring data jpa

1 springboot 集成 mybatis 1.1 添加Mybatis的起步依賴 <!--mybatis起步依賴--> <dependency> <groupId>org.mybatis

原创 springboot(14)- 整合web開發(6)- 通過 CORS實現跨域

1 通過 CORS實現跨域 1.1 新建 2 個 springboot 項目 package com.tzb.controller; import org.springframework.web.bind.annotatio

原创 springboot(16)- 整合web開發(8)- 實現系統啓動任務

1 實現系統啓動任務 1.1 實現 CommandLineRunner 接口 實現1 package com.tzb; import org.springframework.boot.CommandLineRunner; i

原创 springboot(12)- 整合web開發(4)- @ControllerAdvice

1 @ControllerAdvice 3 種用法 處理全局異常 預設全局數據 請求參數預處理 2 全局異常處理 依賴 <dependency> <groupId>org.springframewo

原创 SSM案例-企業權限系統(20)- AOP 日誌 - 域對象創建與基本操作

1 數據庫與表結構 1.1 日誌表信息描述sysLog CREATE TABLE sysLog( id VARCHAR2(32) default SYS_GUID() PRIMARY KEY, visitTime timest

原创 SSM案例-企業權限系統(18)-角色關聯權限

1 角色管理權限 1.1 頁面 1.2 DAO public interface IRoleDao { @Select("select * from role where id=#{roleId}") Rol

原创 SSM案例-企業權限系統(19)- spring security服務器端方法級權限控制

1 服務器端方法級權限控制 在服務器端我們可以通過Spring security提供的註解對方法來進行權限控制。Spring Security在方法的權限控制上支持三種類型的註解,JSR-250註解、@Secured註解和支持表

原创 SSM案例-企業權限系統(13)- 查詢所有用戶

1 查詢用戶 1.1 頁面 1.2 DAO public interface IUserDao { @Select("select * from users where username=#{username}")

原创 SSM案例-企業權限系統(12)- 用戶操作之登錄代碼

1 spring-security.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/be

原创 SSM案例-企業權限系統(14)-用戶詳情查詢

1 用戶詳情查詢 1.1 頁面 1.2 DAO IPermissionDao public interface IPermissionDao { @Select("select * from permissio

原创 SSM案例-企業權限系統(16)- 資源權限操作

1 查詢所有資源權限 1.1 頁面 1.2 DAO public interface IPermissionDao { @Select("select * from permission where id in" +

原创 SSM案例-企業權限系統(17)- 用戶關聯角色

1 用戶關聯角色 1.1 頁面 1.2 DAO public interface IUserDao { @Select("select * from role where id not in" +

原创 SSM案例-企業權限系統(15)- 角色管理

1 角色查詢 1.1 頁面 1.2 DAO public interface IRoleDao { @Select("select * from role") public List<Role> findA