
Spring
不夜城的油条
这个作者很懒,什么都没留下…
展开
-
Spring使用DeferredResult实现长连接
@RestController@RequestMapping("/notifications")public class NotificationResource implements ReleaseMessageListener { private static final Logger logger = LoggerFactory.getLogger(NotificationRe...原创 2018-11-15 16:00:46 · 5058 阅读 · 1 评论 -
Spring Cloud使用BootstrapConfiguration配置启动加载项
使用BootstrapConfiguration加载,等同于bootstrap.yml中的配置使用PropertySourceLocator接口@Configurationpublic class BootstrapConfigurer implements PropertySourceLocator { private static final Logger log = L...原创 2018-11-15 16:11:42 · 14700 阅读 · 1 评论 -
Spring使用EnvironmentPostProcessor自定义启动配置项
public class MyEnvironmentPostProcessor implements EnvironmentPostProcessor { private static final String PROPERTY_SOURCE_NAME = "defaultProperties"; @Override public void postProcessEn...原创 2018-11-15 16:37:45 · 7477 阅读 · 0 评论 -
使用WebAsyncTask与Callable实现异步Http接口
1.实现一个接口@RestControllerpublic class LocalController { private static final Log log = LogFactory.getLog(MethodHandles.lookup().lookupClass()); @RequestMapping("/ac") public WebAsyncTas...原创 2018-11-15 17:36:30 · 1473 阅读 · 0 评论