ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、视频、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
``` @Component public class OccAuthenticationUtil { // 把 yml 中的配置绑定到工具类静态变量上 private static String jointAccount; @Value("${occ.gooki.joint-account}") public void setJointAccount(String jointAccount) { OccAuthenticationUtil.jointAccount = jointAccount; } // 直接 jointAccount 就能使用了 } 类上需要加@Component 这种注解, 不然还是null ```