17 lines
441 B
Java
17 lines
441 B
Java
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);
|
|
}
|
|
}
|