Introduce alias for 'value' attribute in @ResponseStatus
Issue: SPR-11393
This commit is contained in:
@@ -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(){
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user