2020-01-11 14:14:04 +01:00
|
|
|
package com.baeldung.beandefinitionoverrideexception;
|
|
|
|
|
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
|
|
|
|
@Configuration
|
|
|
|
public class TestConfiguration2 {
|
|
|
|
|
|
|
|
class TestBean2 {
|
|
|
|
|
|
|
|
private String name;
|
|
|
|
|
|
|
|
public String getName() {
|
|
|
|
return name;
|
|
|
|
}
|
|
|
|
|
2020-01-11 15:51:34 +01:00
|
|
|
public void setName(String name) {
|
|
|
|
this.name = name;
|
|
|
|
}
|
|
|
|
|
2020-01-11 14:14:04 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Bean
|
2020-01-11 15:51:34 +01:00
|
|
|
public TestBean2 testBean() {
|
2020-01-11 14:14:04 +01:00
|
|
|
return new TestBean2();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|