
Spring Boot
W的世界
前行
展开
-
解决 SpringMvc 非controller类使用@Autowired注解 service注入为null的问题
原地址:http://blog.sina.com.cn/s/blog_98721cfd0102xj96.html 使用SpringMVC框架,在开发的过程中有一些工具类、静态非controller类需要调用由spring管理的service层。但是使用@Autowired注解注入Service,会报null异常;搜索了下网上的一些方法,又实际测试了下,发现网上说的还缺少了点东西,转载 2018-02-02 13:44:41 · 6405 阅读 · 0 评论 -
springboot 部署
作者:https://my.oschina.net/watsonos/blog/1647708 springboot的应用打包默认是打成jar包,并且如果是web应用的话,默认使用内置的tomcat充当servlet容器,但内置的tomcat有时候并不满足我们的需求,当我们需要把springboot的jar应用打包成war包并在外部tomcat中部署时,默认的设置就需要更改了。 ...转载 2018-03-21 09:44:34 · 324 阅读 · 0 评论