标签:客户端 spring框架 回收 depend 使用 -- ota single singleton
@Configuration public class AppConfig{ @Bean public MyService myService() { return new MyServiceImpl(); } }
上面的@Bean配置等价XML配置如下
<beans> <bean id="myService" class="com.services.MyServiceImpl"/> </beans>
<beans>
<context:annotation-config/>
</beans>
<beans> <!-- Definition for javaCollection --> <bean id="javaCollection" class="com.gupaoedu.JavaCollection"> <!-- java.util.List --> <property name="customList"> <list> <value>INDIA</value> <value>Pakistan</value> <value>USA</value> <value>UK</value> </list> </property> <!-- java.util.Set --> <property name="customSet"> <set> <value>INDIA</value> <value>Pakistan</value> <value>USA</value> <value>UK</value> </set> </property> <!-- java.util.Map --> <property name="customMap"> <map> <entry key="1" value="INDIA"/> <entry key="2" value="Pakistan"/> <entry key="3" value="USA"/> <entry key="4" value="UK"/> </map> </property> <!-- java.util.Properties --> <property name="customProperies"> <props> <prop key="admin">admin@gupaoedu.com</prop> <prop key="support">support@gupaoedu.com</prop> </props> </property> </bean> </beans>
标签:客户端 spring框架 回收 depend 使用 -- ota single singleton
原文地址:https://www.cnblogs.com/lynn16/p/10686128.html