@Test public void test() { ApplicationContext applicationContext = BeanFactoryContext.currentApplicationContext(); LOGGER.info(ApplicationContextUtils.getMessage(applicationContext, Locale.CHINA, "helloWorld")); LOGGER.info(ApplicationContextUtils.getMessage(applicationContext, Locale.US, "helloWorld")); if (ApplicationContextUtils.getMessage(applicationContext, Locale.CHINA, "helloWorld1") == null) { LOGGER.info("helloWorld1 is not existsed"); } LOGGER.info(MessageUtils.success("helloWorld").getContent()); }
public T getContent() { return content; }
Message { public T getContent() { return content; } }
Message { public T getContent() { return content; } Message(MessageType type, T content); }
Message { public T getContent() { return content; } Message(MessageType type, T content); MessageType getType(); T getContent(); }
Message { public T getContent() { return content; } Message(MessageType type, T content); MessageType getType(); T getContent();  }