![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Spring
李怀念
这个作者很懒,什么都没留下…
展开
-
SpringBoot学习---Eureka的入门
Eureka的入门demo搭建遇到的坑SpringBoot和SpringCloud的版本一定要选择相对应的,且版本最好选择稳定的,否则项目会出现未知的异常。注册中心需设置不向注册中心注册自己,不去检索其它服务。将自身信息注册到Eureka中的参数可能会由于版本的不同导致参数的书写规则不同(即:eureka.client.service-url.defaultZone)。特在此记录,尤其...原创 2019-11-14 17:19:49 · 143 阅读 · 0 评论 -
spring中context:annotation-config配置
spring中<context:annotation-config/>配置的作用,现记录如下:<context:annotation-config/>的作用是向Spring容器注册以下四个BeanPostProcessor:AutowiredAnnotationBeanPostProcessorCommonAnnotationBeanPostProcessorP...转载 2019-02-25 18:49:12 · 441 阅读 · 0 评论 -
spring中context:component-scan配置
通常情况下我们在创建spring项目的时候在xml配置文件中都会配置这个标签,配置完这个标签后,spring就会去自动扫描base-package对应的路径或者该路径的子包下面的java文件,如果扫描到文件中带有@Service,@Component,@Repository,@Controller等这些注解的类,则把这些类注册为bean注:在注解后加上例如@Component(value=”...转载 2019-02-25 18:55:52 · 438 阅读 · 0 评论