Spring Boot - Spring Annotations
Given this configuration class, what will be the output when retrieving the bean named "calculator" and calling
add(2, 3)?
@Configuration
public class AppConfig {
@Bean
public Calculator calculator() {
return new Calculator();
}
}
public class Calculator {
public int add(int a, int b) { return a + b; }
}