06 2018 档案
摘要:线程中调用service 处理具体的业务,在多线程时使用@Autowired总是获取不到bean,原因是:new thread不在spring容器中,也就无法获得spring中的bean对象。 线程入口,直接写个main方法执行的,运行则获取不到service。需要在 SpringBootAppli
阅读全文
摘要:对接天气的api很多都有次数限制,或者需要去申请一些appcode才能访问,有没有一些比较简单的方式来获取实时天气呢?基于此,本人整理了此篇博客。 一、天气对接。 中国天气网 1、 http://m.weather.com.cn/data/101110101.html 已失效 2、 http://w
阅读全文