when spring bean is loaded and if i have a constructor and setters which one will be called first?

spring

Solution

The constructor must be called before any setter methods are called. Use the `init-method` to tell Spring to invoke some logic after the setters are called:

<bean class="my.CoolClass" init-method="startup">
    <constructor-arg value="Foo" />
    <property name="bar" value="baz" />
</bean>

Problem

This is a basic question - when spring bean is loaded and if i have a constructor and setters which one will be called first? Thanks

Original source