丙午🐎年

acc8226 的博客

For full documentation visit mkdocs.org.

Commands

  • mkdocs new [dir-name] - Create a new project.
  • mkdocs serve - Start the live-reloading docs server.
  • mkdocs build - Build the documentation site.
  • mkdocs -h - Print help message and exit.

Project layout

mkdocs.yml    # The configuration file.
docs/
    index.md  # The documentation homepage.
    ...       # Other markdown pages, images and other files.
阅读全文 »

坚果云

【全平台】坚果云 主要用于存少量文档

功能完备, 多端同步, 为数不多支持 WebDAV 协议。 (在手机上使用 ES 浏览器可不装其他客户端都能访问坚果云内容)

非会员每个周期内流量有限, 适合保存文档
每月 1G 上传流量,下载 3G 流量。我一般将其作为同步文档用
非会员也有稀缺的同步盘。

坚果云 如何启用 WebDAV

小飞机

小飞机 用于网页分享不限速分享文件

阿里云盘

【win mac】阿里云盘 主打大容量 + 同步功能,高峰时段限速但一般没感觉。然后再搭配猫头鹰文件。可以读取阿里网盘的视频文件

建议安装客户端全量体验。而非网页版。

阿里云盘获取 refresh_token 的方法

首先要有一个属于自己的阿里云盘账号(一般为手机号);进入阿里云盘的官网地址,输入阿里云盘账号和密码登陆;在浏览器上按一次 F12 键,进入开发者工具模式,在顶上菜单栏点 Application ,然后在左边菜单找到 Local storage 下面的 https://www.aliyundrive.com 这个域名,点到这个域名会看到有一个 token 选项,再点 token ,就找到 refresh_token 了。

阅读全文 »

设置激活 Spring Profiles

SPRING Environment 为此提供了一个 API,但是您通常会设置一个 System 属性(spring.profiles.active) 或者一个 OS 环境变量(SPRING_PROFILES_ACTIVE)。此外,您可以使用 -D 参数启动应用程序(记住将其放在 main 类或 jar 归档之前) ,如下所示:

1
java -jar -Dspring.profiles.active=production demo-0.0.1-SNAPSHOT.jar

或者

1
java -jar demo-0.0.1-SNAPSHOT.jar --spring.profiles.active=production

在 Spring Boot 中,您还可以在 application.properties 中设置 active profile ,如下面的示例所示:

可以是一个

1
spring.profiles.active=production

也可以是多个

1
spring.profiles.active=dev,hsqldb

或者使用 application.yml 形式

1
2
3
spring:
profiles:
active: dev, hsqldb
阅读全文 »

Spring 配置的三种方案

  1. 在 XML 中进行显式配置。
  2. 隐式的 bean 发现机制和自动装配。
  3. 在 Java 中进行显式配置。

使用 xml 配置 bean

通过 ClassPathXmlApplicationContext 进行文件加载。

基于 XML 的配置方法有对构造(有区分了无参构造 和 有参构造)注入和 setter 注入有自己的实现。然后还有工厂方法。后面还新增了 p-schema 和 c-schema。

由于字符串的约束性较差,现在更推荐使用自动扫描 + Java 进行显式配置。

阅读全文 »
0%