note  nginx 笔记

配置:
https://www.nginx.com/resources/wiki/start/topics/examples/full/#

ng config 使用if出错导致无法正常启动

1
2

if($domain = "test") {}

上面代码会报错 nginx unknown directive “if( ,导致无法启动

1
if ($domain = "test") {}

解决方法: 在 if 后面添加一个空格,另外注意,如果是字符串需要 双引号包起来。
*if 不赞成使用,具体请参考:https://www.nginx.com/resources/wiki/start/topics/depth/ifisevil/#why-this-happens-and-still-not-fixed

note  https 单/双向认证
1
2
3
4
5
生成服务端证书
keytool-genkey -v -alias server -keyalg RSA -storetype PKCS12 -keystore E:\7\server.key.p12

导出证书公钥,安装到客户端
keytool-keystore E:\7\server.key.p12 -export -alias server -file E:\7\server.cer

参考:https://blog.csdn.net/weixin_41917987/article/details/80987835

note  Hyper-v 记录

Hyper-v

1
2
3
4
#关闭hyper-v
bcdedit /set hypervisorlaunchtype off。
#启用hyper-v
bcdedit /set hypervisorlaunchtype auto
note  cordova + vue 开发 Mobile app

技术框架

cordova 9.0.0 (cordova-lib@9.0.1)
vue-cli3 ,vue^2.6.10

遇到的问题记录

  1. 使用 vue build + cordova build android 后,在手机上运行,出现一片白屏后无反应
    解决办法:
    在 vue.config.js 增加配置项如下
    1
    baseUrl: 'android_asset/www/'
note  Spring boot+ mybatis + Spring security 集成

Spring boot+ mybatis + Spring security 集成

项目使用 Maven 管理依赖

引入 Spring Security 库

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
<version>2.0.4.RELEASE</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>26.0-jre</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.8</version>
</dependency>