摘要: 一、目录结构 . ├── boogle-common │ ├── build.gradle.kts │ └── src ├── boogle-core │ ├── build.gradle.kts │ └── src ├── boogle-generator │ ├── build.gradle.k 阅读全文
posted @ 2022-08-28 14:48 我爱这世间美貌女子 阅读(895) 评论(0) 推荐(0) 编辑
摘要: 一、安装相关的依赖 $ pip install djangorestframework $ pip install markdown # Markdown support for the browsable API. $ pip install django-filter # Filtering s 阅读全文
posted @ 2022-08-21 00:09 我爱这世间美貌女子 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 一、设计模式之单一之责原则 定义 单一之责原则的定义是:有且仅有一个原因引起类或接口的变更。 反例 电话通话有4个过程:拨号、通话、回应、挂断,代码实现如下: public interface IPhone { // 拨通电话 void dial(); // 通话 void chat(); // 通 阅读全文
posted @ 2022-07-02 21:15 我爱这世间美貌女子 阅读(30) 评论(0) 推荐(0) 编辑
摘要: Casbin configuration rbac_model.conf [request_definition] r = sub, obj, act [policy_definition] p = sub, obj, act [role_definition] g = _, _ [policy_e 阅读全文
posted @ 2022-06-29 00:40 我爱这世间美貌女子 阅读(792) 评论(0) 推荐(0) 编辑
摘要: client_secret_basic 调用授权服务器token端点,添加Authorization header,值为client_id:client_secret Base64编码后的值,grant_type=client_credentials client_secret_post 调用授权服 阅读全文
posted @ 2022-06-06 23:36 我爱这世间美貌女子 阅读(723) 评论(0) 推荐(0) 编辑
摘要: 新建Spring boot项目 <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.7.0</version> <rel 阅读全文
posted @ 2022-05-30 23:39 我爱这世间美貌女子 阅读(66) 评论(0) 推荐(0) 编辑
摘要: SavedRequestAwareAuthenticationSuccessHandler类是SpringSecurity提供的登录成功处理器,登录成功后该处理器会从Session中获取认证之前访问的url,然后将用户重定向到该url地址, 设置认证之前的url RequestCache.java 阅读全文
posted @ 2022-05-28 23:46 我爱这世间美貌女子 阅读(230) 评论(0) 推荐(0) 编辑
摘要: Linux or Mac os # 配置 GOPROXY 环境变量 $ export GOPROXY=https://proxy.golang.com.cn,direct Window powershell # 配置 GOPROXY 环境变量 $env:GOPROXY = "https://prox 阅读全文
posted @ 2022-05-05 23:05 我爱这世间美貌女子 阅读(110) 评论(0) 推荐(0) 编辑
摘要: mysql数据库迁移 1、相同版本数据库迁移 # 将old-mysql-host的数据库dbname迁移到new-mysql-host $ mysqldump -h old-mysql-host -uroot -ppassword dbname | mysql -h new-mysql-host - 阅读全文
posted @ 2022-04-11 01:03 我爱这世间美貌女子 阅读(32) 评论(0) 推荐(0) 编辑
摘要: spring security为了防止固定回话攻击会一直修改sessionId,所以在登录前存在session里的数据在登录后是获取不到的。为了解决这种情况可以监听session的变化做相应的更改。 @WebListener public class SessionListener implemen 阅读全文
posted @ 2022-04-07 00:49 我爱这世间美貌女子 阅读(621) 评论(0) 推荐(0) 编辑