Polish
Closes gh-4572
This commit is contained in:
committed by
Stephane Nicoll
parent
31d7ebc96e
commit
8ec00c35bf
@@ -48,7 +48,7 @@ public class SampleActuatorUiApplication {
|
||||
@Bean
|
||||
public SecurityProperties securityProperties() {
|
||||
SecurityProperties security = new SecurityProperties();
|
||||
security.getBasic().setPath(""); // empty so home page is unsecured
|
||||
security.getBasic().setPath(""); // empty so home page is insecured
|
||||
return security;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
/**
|
||||
* Integration tests for unsecured service endpoints (even with Spring Security on
|
||||
* Integration tests for insecured service endpoints (even with Spring Security on
|
||||
* classpath).
|
||||
*
|
||||
* @author Dave Syer
|
||||
@@ -46,7 +46,7 @@ import static org.junit.Assert.assertTrue;
|
||||
@WebIntegrationTest(value = { "management.security.enabled:false" }, randomPort = true)
|
||||
@DirtiesContext
|
||||
@ActiveProfiles("unsecure-management")
|
||||
public class UnsecureManagementSampleActuatorApplicationTests {
|
||||
public class InsecureManagementSampleActuatorApplicationTests {
|
||||
|
||||
@Value("${local.server.port}")
|
||||
private int port;
|
||||
@@ -34,7 +34,7 @@ import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
|
||||
/**
|
||||
* Integration tests for unsecured service endpoints (even with Spring Security on
|
||||
* Integration tests for insecured service endpoints (even with Spring Security on
|
||||
* classpath).
|
||||
*
|
||||
* @author Dave Syer
|
||||
@@ -43,7 +43,7 @@ import static org.junit.Assert.assertFalse;
|
||||
@SpringApplicationConfiguration(SampleActuatorApplication.class)
|
||||
@WebIntegrationTest(value = { "security.basic.enabled:false" }, randomPort = true)
|
||||
@DirtiesContext
|
||||
public class UnsecureSampleActuatorApplicationTests {
|
||||
public class InsecureSampleActuatorApplicationTests {
|
||||
|
||||
@Value("${local.server.port}")
|
||||
private int port;
|
||||
@@ -34,7 +34,7 @@ import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
|
||||
/**
|
||||
* Integration tests for unsecured service endpoints (even with Spring Security on
|
||||
* Integration tests for insecured service endpoints (even with Spring Security on
|
||||
* classpath).
|
||||
*
|
||||
* @author Dave Syer
|
||||
@@ -44,7 +44,7 @@ import static org.junit.Assert.assertFalse;
|
||||
@WebIntegrationTest(value = { "security.basic.enabled:false",
|
||||
"server.servletPath:/spring" }, randomPort = true)
|
||||
@DirtiesContext
|
||||
public class ServletPathUnsecureSampleActuatorApplicationTests {
|
||||
public class ServletPathInsecureSampleActuatorApplicationTests {
|
||||
|
||||
@Value("${local.server.port}")
|
||||
private int port;
|
||||
@@ -24,7 +24,7 @@ import org.springframework.data.repository.PagingAndSortingRepository;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
|
||||
|
||||
@RepositoryRestResource(collectionResourceRel = "citys", path = "cities")
|
||||
@RepositoryRestResource(collectionResourceRel = "cities", path = "cities")
|
||||
interface CityRepository extends PagingAndSortingRepository<City, Long> {
|
||||
|
||||
Page<City> findByNameContainingAndCountryContainingAllIgnoringCase(
|
||||
|
||||
@@ -83,6 +83,6 @@ public class SampleDataRestApplicationTests {
|
||||
this.mvc.perform(
|
||||
get("/api/cities/search/findByNameContainingAndCountryContainingAllIgnoringCase?name=&country=UK"))
|
||||
.andExpect(status().isOk())
|
||||
.andExpect(jsonPath("_embedded.citys", hasSize(3)));
|
||||
.andExpect(jsonPath("_embedded.cities", hasSize(3)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public class SampleSolrApplication implements CommandLineRunner {
|
||||
System.out.println();
|
||||
|
||||
// fetch a single product
|
||||
System.out.println("Products founds with findByNameStartingWith('So'):");
|
||||
System.out.println("Products found with findByNameStartingWith('So'):");
|
||||
System.out.println("--------------------------------");
|
||||
for (Product product : this.repository.findByNameStartingWith("So")) {
|
||||
System.out.println(product);
|
||||
|
||||
@@ -8,7 +8,7 @@ $ docker-compose up
|
||||
----
|
||||
|
||||
Run the app and ping the home page (http://localhost:8080) a few times. Go and look at
|
||||
the result in the TDB UI, e.g.
|
||||
the result in the TSD UI, e.g.
|
||||
|
||||
[source,indent=0]
|
||||
----
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
public class InMemoryMessageRespository implements MessageRepository {
|
||||
public class InMemoryMessageRepository implements MessageRepository {
|
||||
|
||||
private static AtomicLong counter = new AtomicLong();
|
||||
|
||||
@@ -26,7 +26,7 @@ public class SampleGroovyTemplateApplication {
|
||||
|
||||
@Bean
|
||||
public MessageRepository messageRepository() {
|
||||
return new InMemoryMessageRespository();
|
||||
return new InMemoryMessageRepository();
|
||||
}
|
||||
|
||||
@Bean
|
||||
|
||||
Reference in New Issue
Block a user