Constructor injection type ambig

2015-08-20  本文已影响3人  lovePython
<?xml version="1.0"?>
<!--Spring-Customer.xml-->
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
    <bean id="CustomerBean" class="com.mkyong.common.Customer">
        <constructor-arg>
            <value>mkyong</value>
        </constructor-arg>
        <constructor-arg>
            <value>188</value>
        </constructor-arg>
        <constructor-arg>
            <value>28</value>
        </constructor-arg>
    </bean>
</beans>
<?xml version="1.0"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
    <bean id="CustomerBean" class="com.mkyong.common.Customer">
        <constructor-arg type="java.lang.String">
            <value>mkyong</value>
        </constructor-arg>
        <constructor-arg type="java.lang.String">
            <value>188</value>
        </constructor-arg>
        <constructor-arg type="int">
            <value>28</value>
        </constructor-arg>
    </bean>
</beans>
上一篇 下一篇

猜你喜欢

热点阅读