Introduce alias for 'value' attribute in @ResponseStatus

Issue: SPR-11393
This commit is contained in:
Sam Brannen
2015-05-31 17:00:23 +02:00
parent c55486d5d5
commit 6a5b2672e7
13 changed files with 56 additions and 62 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,7 +16,6 @@
package org.springframework.test.web.servlet.samples.standalone.resultmatchers;
import org.junit.Before;
import org.junit.Test;
import org.springframework.http.HttpStatus;
@@ -38,12 +37,7 @@ import static org.springframework.test.web.servlet.setup.MockMvcBuilders.*;
*/
public class StatusAssertionTests {
private MockMvc mockMvc;
@Before
public void setup() {
this.mockMvc = standaloneSetup(new StatusController()).build();
}
private final MockMvc mockMvc = standaloneSetup(new StatusController()).build();
@Test
public void testStatusInt() throws Exception {
@@ -86,7 +80,7 @@ public class StatusAssertionTests {
}
@RequestMapping("/badRequest")
@ResponseStatus(value=HttpStatus.BAD_REQUEST, reason="Expired token")
@ResponseStatus(code = HttpStatus.BAD_REQUEST, reason = "Expired token")
public @ResponseBody void badRequest(){
}