用netty做聊天的时候,Handler里面看别人这么写能拿到Bean,我获取到的为null
UserService userService = (UserService)SpringUtil.getBean("userServiceImpl");
SpringUtil
public class SpringUtil implements ApplicationContextAware {
private static ApplicationContext applicationContext;
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
if (SpringUtil