@Component
public class Setup {
private static final Log log = Logs.get();
private static Connection rabbitmq_conn;
private static Channel rabbitmq_channel;
@Autowired
private Dao nutDao;
@PostConstruct
public void init() {
try {
// 环境检查
if (!Charset.defaultCharset().name().equalsIgnoreCase(Encoding.UTF8)) {
log.warn("This project must run in UTF-8, pls add -Dfile.encoding=UTF-8 to JAVA_OPTS");
}
Ioc ioc = Mvcs.getIoc();
NutConfig config = Mvcs.getNutConfig();
这样根本获取不到IOC对象啊