Skip to content

Commit 1b748ca

Browse files
authored
Removes duplicate bean definition in ResourceControllerIntegrationTests (#2286)
1 parent 25366e8 commit 1b748ca

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/resource/ResourceControllerIntegrationTests.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,10 @@ public void resourceHttp() throws Exception {
122122
@Test
123123
public void resourceHttpDoesNotExist() throws Exception {
124124
when(this.resources.findOne("foo", "default", "master", "doesNotExist.txt"))
125-
.thenThrow(new NoSuchResourceException("Does not exist"));
125+
.thenThrow(new NoSuchResourceException("Does not exist"));
126126

127127
ResponseEntity<String> response = new TestRestTemplate()
128-
.getForEntity("http://localhost:" + port + "/foo/default/master/doesNotExist.txt", String.class);
128+
.getForEntity("http://localhost:" + port + "/foo/default/master/doesNotExist.txt", String.class);
129129
assertThat(response.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND);
130130
verify(this.resources).findOne("foo", "default", "master", "doesNotExist.txt");
131131
}
@@ -195,11 +195,6 @@ public ResourceRepository resourceRepository() {
195195
return repository;
196196
}
197197

198-
@Bean
199-
public ResourceControllerAdvice resourceControllerAdvice() {
200-
return new ResourceControllerAdvice();
201-
}
202-
203198
@Bean
204199
public EnvironmentController environmentController() {
205200
return new EnvironmentController(environmentRepository());

0 commit comments

Comments
 (0)