西维蜀黍

【Java】Mybatis

  ...


【Spring】Spring 中的 AOP

AOP实现有哪些注解?

常用的注解包括:

  • @Aspect:用于定义切面,标注在切面类上。
  • @Pointcut:定义切入点,标注在方法上,用于指定连接点。
  • @Before:在方法执行之前执行通知。
  • @After:在方法执行之后执行通知。
  • @Around:在方法执行前后都执行通知。
  • @AfterReturning:在方法执行后返回结果后执行通知。
  • @AfterThrowing:在方法抛出异常后执行通知。
  • @Advice:通用的通知类型,可以取代 @Before、@After 等。
  ...


【Spring】Spring 中的 Beans

  ...


【Spring】Spring 中的注解(Annotation)

Annotations in Spring Framework

Spring Framework:

  • @Component, @Service, @Repository: Declare components for Spring to manage.
  • @Autowired: Enables dependency injection.
  • @RequestMapping, @GetMapping, @PostMapping: Define web endpoints.
  ...


【Java】注解(Annotation)

In Java, an annotation is a form of metadata that provides information to the compiler or runtime environment but does not directly affect program execution.

  ...


【Java】编码规范(Code Guideline)

  ...


【Blockchain】Cryptocurrency(加密货币)

  • Crypto:来自 “cryptography”(密码学),表示利用加密技术保障交易安全与匿名性。
  • Currency:货币。

所以 cryptocurrency 指的是:一种使用密码学技术支持的去中心化数字货币,例如比特币(Bitcoin)、以太坊(Ethereum)等。

  ...


【Blockchain】Cryto - Bitcoin(比特币)

Bitoin 比特币

数据结构

block header

  • version
  • hash of previous block header
  • merkle root hash
  • target
  • nonce

Block body

  • Transaction list
  ...


【Architecture】System Design - Payment System

Background

  ...


【Security】Authentication(身份认证)- JSON Web Token (JWT)

JSON Web Token (JWT)

  • No separate storage needed
  • Invalidation of a JWT is not easy
  • Scaling client and server is easy

Structure

The three parts are encoded separately using Base64url Encoding RFC 4648, and concatenated using periods to produce the JWT:

const token = base64urlEncoding(header) + '.' + base64urlEncoding(payload) + '.' + base64urlEncoding(signature)

Identifies which algorithm is used to generate the signature. In the below example, HS256 indicates that this token is signed using HMAC-SHA256. Typical cryptographic algorithms used are HMAC with SHA-256 (HS256) and RSA signature with SHA-256 (RS256). JWA (JSON Web Algorithms) RFC 7518 introduces many more for both authentication and encryption.

  ...