parent
64baef9f19
commit
cf2e1ffc65
|
@ -79,8 +79,8 @@ public class SpringConfiguratorTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void getEndpointInstanceSingletonByComponentName() throws Exception {
|
public void getEndpointInstanceSingletonByComponentName() throws Exception {
|
||||||
AlternativeEchoEndpoint expected = this.webAppContext.getBean(AlternativeEchoEndpoint.class);
|
AnotherEchoEndpoint expected = this.webAppContext.getBean(AnotherEchoEndpoint.class);
|
||||||
AlternativeEchoEndpoint actual = this.configurator.getEndpointInstance(AlternativeEchoEndpoint.class);
|
AnotherEchoEndpoint actual = this.configurator.getEndpointInstance(AnotherEchoEndpoint.class);
|
||||||
assertSame(expected, actual);
|
assertSame(expected, actual);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,14 +115,14 @@ public class SpringConfiguratorTests {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Component("echoEndpoint")
|
@Component("myEchoEndpoint")
|
||||||
private static class AlternativeEchoEndpoint extends Endpoint {
|
private static class AnotherEchoEndpoint extends Endpoint {
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
private final EchoService service;
|
private final EchoService service;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public AlternativeEchoEndpoint(EchoService service) {
|
public AnotherEchoEndpoint(EchoService service) {
|
||||||
this.service = service;
|
this.service = service;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue