spring boot
baicp3
这个作者很懒,什么都没留下…
展开
-
spring boot遇到的问题
1.cannot initialize context because there is already a root application context present - check whether you have multiple contextloader* definitions in your web.xml!解决方案:我这个工程spring boot里没有web.xml。 ...原创 2019-05-29 17:24:30 · 1572 阅读 · 0 评论 -
spring boot bean的注入方式
1.xml的配置2.三大组件注解注入(@Controller,@Service,@Repository,@Component)+ComponentScan(组件扫描)3.通过@Import注解注入(注解跟进去,有三种方式)4.@Configuration + @Bean注解的方式去出事话bean二:bean的自动注入通过@Autowired方式可作用于属性...原创 2019-06-27 10:15:42 · 11471 阅读 · 0 评论 -
springboot全局字符编码设置(解决乱码问题)
进入DispatcherServlet前,先进入filter。filter->serlet->interceptorinterceptor有preHandle 然后回调postHandle ->afterCompletion有时候我们会发现这种问题,明明已经设置了字符编码过滤器但是还会有乱码的情况出现,这个问题令我们很是头疼,我之前也遇到过这种情况。那怎么解决...转载 2019-08-27 17:46:33 · 6626 阅读 · 0 评论