From 7f1799832d4533e4482bce07b3f46b14a8fbcf9f Mon Sep 17 00:00:00 2001 From: Oliver Gierke Date: Fri, 19 Jun 2015 14:38:08 +0200 Subject: [PATCH] DATAREST-327 - Polishing. Moved Spring Security specific dependencies to a dedicated profile in pom.xml. JavaDoc polishing. Removed assertions on the response message. Original pull request: #171. --- spring-data-rest-webmvc/pom.xml | 93 +++++++--------- .../data/rest/webmvc/security/Person.java | 16 +-- .../PreAuthorizedOrderRepository.java | 4 +- .../security/SecureJpaConfiguration.java | 4 +- .../security/SecuredPersonRepository.java | 15 +++ .../security/SecurityConfiguration.java | 15 +++ .../security/SecurityIntegrationTests.java | 101 +++++++++--------- .../data/rest/webmvc/solr/SolrWebTests.java | 4 +- ...HandlingCustomizationIntegrationTests.java | 11 -- 9 files changed, 136 insertions(+), 127 deletions(-) diff --git a/spring-data-rest-webmvc/pom.xml b/spring-data-rest-webmvc/pom.xml index 7fb436d63..10bb4cd11 100644 --- a/spring-data-rest-webmvc/pom.xml +++ b/spring-data-rest-webmvc/pom.xml @@ -113,58 +113,6 @@ test - - org.apache.solr - solr-core - 4.10.1 - test - - - org.slf4j - slf4j-api - - - jdk.tools - jdk.tools - - - - - - org.springframework.security - spring-security-core - ${spring-security.version} - test - - - - org.springframework.security - spring-security-config - ${spring-security.version} - test - - - - org.springframework.security - spring-security-web - ${spring-security.version} - test - - - - org.springframework.security - spring-security-test - ${spring-security.version} - test - - - - commons-lang - commons-lang - 2.6 - test - - @@ -350,6 +298,47 @@ + + + spring-security + + + true + + + + + + org.springframework.security + spring-security-core + ${spring-security.version} + test + + + + org.springframework.security + spring-security-config + ${spring-security.version} + test + + + + org.springframework.security + spring-security-web + ${spring-security.version} + test + + + + org.springframework.security + spring-security-test + ${spring-security.version} + test + + + + + diff --git a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/security/Person.java b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/security/Person.java index 5e5d3efb5..3ba17509b 100644 --- a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/security/Person.java +++ b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/security/Person.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2014 the original author or authors. + * Copyright 2012-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. @@ -15,6 +15,12 @@ */ package org.springframework.data.rest.webmvc.security; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Collections; +import java.util.Date; +import java.util.List; + import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; @@ -22,15 +28,11 @@ import javax.persistence.ManyToMany; import javax.persistence.ManyToOne; import javax.persistence.PrePersist; import javax.validation.constraints.NotNull; -import java.util.ArrayList; -import java.util.Calendar; -import java.util.Collections; -import java.util.Date; -import java.util.List; + +import org.springframework.data.rest.core.annotation.Description; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import org.springframework.data.rest.core.annotation.Description; /** * An entity that represents a person. diff --git a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/security/PreAuthorizedOrderRepository.java b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/security/PreAuthorizedOrderRepository.java index 442e73369..cc0733336 100644 --- a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/security/PreAuthorizedOrderRepository.java +++ b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/security/PreAuthorizedOrderRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-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. @@ -42,4 +42,4 @@ public interface PreAuthorizedOrderRepository extends CrudRepository expectedRootLinkRels() { - return Collections.emptySet(); - } }