Merge branch '1.5.x'
This commit is contained in:
@@ -47,16 +47,16 @@ public class SampleHypermediaUiSecureApplicationTests {
|
||||
ResponseEntity<String> entity = this.restTemplate.getForEntity("/application/env",
|
||||
String.class);
|
||||
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
|
||||
ResponseEntity<String> user = this.restTemplate.getForEntity("/application/env/foo",
|
||||
String.class);
|
||||
ResponseEntity<String> user = this.restTemplate
|
||||
.getForEntity("/application/env/foo", String.class);
|
||||
assertThat(user.getStatusCode()).isEqualTo(HttpStatus.OK);
|
||||
assertThat(user.getBody()).contains("{\"foo\":");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSecurePath() throws Exception {
|
||||
ResponseEntity<String> entity = this.restTemplate.getForEntity("/application/metrics",
|
||||
String.class);
|
||||
ResponseEntity<String> entity = this.restTemplate
|
||||
.getForEntity("/application/metrics", String.class);
|
||||
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ import java.util.List;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.ManyToMany;
|
||||
import javax.persistence.SequenceGenerator;
|
||||
@@ -29,7 +28,7 @@ import javax.persistence.SequenceGenerator;
|
||||
public class Tag {
|
||||
|
||||
@Id
|
||||
@SequenceGenerator(name="tag_generator", sequenceName="tag_sequence", initialValue = 4)
|
||||
@SequenceGenerator(name = "tag_generator", sequenceName = "tag_sequence", initialValue = 4)
|
||||
@GeneratedValue(generator = "tag_generator")
|
||||
private long id;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.quartz.JobExecutionException;
|
||||
import org.springframework.scheduling.quartz.QuartzJobBean;
|
||||
|
||||
public class SampleJob extends QuartzJobBean {
|
||||
|
||||
|
||||
private String name;
|
||||
|
||||
// Invoked if a Job data map entry with that name
|
||||
|
||||
@@ -70,7 +70,8 @@ public class SampleSecureOAuth2ActuatorApplicationTests {
|
||||
|
||||
@Test
|
||||
public void healthAvailable() throws Exception {
|
||||
this.mvc.perform(get("/application/health")).andExpect(status().isOk()).andDo(print());
|
||||
this.mvc.perform(get("/application/health")).andExpect(status().isOk())
|
||||
.andDo(print());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user