对象存储-初始化

This commit is contained in:
2026-02-05 16:27:23 +08:00
parent 018abc6675
commit ab574032c0
40 changed files with 935 additions and 237 deletions

View File

@@ -0,0 +1,16 @@
package com.blog.initializer;
import com.blog.context.GlobalContext;
import com.blog.holder.GlobalContextHolder;
import jakarta.annotation.PostConstruct;
import org.springframework.stereotype.Component;
@Component
public class GlobalContextInitializer {
@PostConstruct
public void initGlobalContext(){
GlobalContext globalContext = new GlobalContext();
GlobalContextHolder.setGlobalContext(globalContext);
}
}