I had a question while writing to test auto-configuration.
@Configuration
public class SimpleConfiguration {
@Bean
public BigDecimal aDecimal( String example ) {
return new BigDecimal( example );
}
}
@Configuration
public class BigDecimal {
}
I think the above two codes have the same result of registering BigDecimal object as bean. However, if you look at the example of auto-configuration, it is implemented with the code above. Why use the code above if the two results are the same