spring
一只真菜鸟
Good Good Study, Day Day Coding
展开
-
@PropertySource 外部属性注入 @Profile指定激活环境
一、@PropertySource 外部属性注入 在xml的配置文件中,导入外部属性的配置文件往往使用如下方式: <context:property-placeholder location="classpath:test.properties"/> 在基于注解的开发中,可以使用@PropertySource导入外部属性的配置文件,可以和@Value结合使用,给类注...原创 2020-01-20 11:28:49 · 1769 阅读 · 0 评论 -
@Bean 给容器中添加组件 @ComponentScan包扫描使用
一、@Bean使用 在spring中,基于配置的开发过程中,往spring容器中添加组件可以在xml文件中配置,如下: <bean id="person" class="com.gdw.springtest.bean.Person"> <property name="name" value="zhangsan"/> </bean> 在sp...原创 2020-01-19 15:57:18 · 589 阅读 · 1 评论 -
Spring、SpringMVC、Mybatis学习笔记
原创 2019-05-11 15:15:27 · 253 阅读 · 0 评论