Commit Graph

69 Commits

Author SHA1 Message Date
Mark Paluch
dbb3d45bfb DATAREST-1252 - Release version 2.6.14 (Ingalls SR14). 2018-07-27 09:21:39 +02:00
Mark Paluch
347e9e5e60 DATAREST-1243 - Prepare next development iteration. 2018-06-13 14:42:33 +02:00
Mark Paluch
cd3ff4df26 DATAREST-1243 - Release version 2.6.13 (Ingalls SR13). 2018-06-13 10:48:53 +02:00
Mark Paluch
e5052ed1c8 DATAREST-1226 - Prepare next development iteration. 2018-05-08 11:56:07 +02:00
Mark Paluch
4580619d87 DATAREST-1226 - Release version 2.6.12 (Ingalls SR12). 2018-05-08 10:50:35 +02:00
Oliver Gierke
7b34b0d611 DATAREST-1225 - Upgrade to Spring Security 4.2.5 for integration tests. 2018-04-04 16:13:11 +02:00
Mark Paluch
ec157294f8 DATAREST-1185 - Prepare next development iteration. 2018-04-04 14:58:03 +02:00
Mark Paluch
70d6bb241a DATAREST-1185 - Release version 2.6.11 (Ingalls SR11). 2018-04-04 14:21:29 +02:00
Oliver Gierke
4c71f818b6 DATAREST-1219 - Removed explicit declaration of Jackson library versions. 2018-03-27 19:54:28 +02:00
Mark Paluch
a219c1a297 DATAREST-1161 - Prepare next development iteration. 2018-01-24 11:40:28 +01:00
Mark Paluch
f916233f41 DATAREST-1161 - Release version 2.6.10 (Ingalls SR10). 2018-01-24 11:19:08 +01:00
Tobias Weiß
f3a0e111e6 DATAREST-1176 - RepositoryRestConfiguration now allows to disable the default exposure.
The default exposure of repository methods is now controlled via RepositoryRestConfiguration.setExposeRepositoryMethodsByDefault(…). If set to true (the default), a repository that is detected for exposure (which in turn can be controlled via RepositoryDetectionStrategy) will have default resources exposed in case of the mere presence of CRUD methods. Setting this to false will require you to explicitly annotated those methods with @RestResource.

Added RepositoryRestConfiguration.disableDefaultExposure() to set the RepositoryDetectionStategy to ANNOTATED and disables default method exposure in one go. That can be exposed via a Spring Boot configuration property downstream.
2018-01-24 09:14:15 +01:00
Mark Paluch
c07fc27f63 DATAREST-1150 - Prepare next development iteration. 2017-11-27 15:56:38 +01:00
Mark Paluch
6f83d86552 DATAREST-1150 - Release version 2.6.9 (Ingalls SR9). 2017-11-27 15:17:06 +01:00
Oliver Gierke
9cf10c6a7f DATAREST-1128 - Prepare next development iteration. 2017-10-11 19:00:12 +02:00
Oliver Gierke
0eab5ea1a2 DATAREST-1128 - Release version 2.6.8 (Ingalls SR8). 2017-10-11 16:42:43 +02:00
Mark Paluch
bcd5ea30ca DATAREST-1114 - Prepare next development iteration. 2017-09-11 12:23:35 +02:00
Mark Paluch
d1db334163 DATAREST-1114 - Release version 2.6.7 (Ingalls SR7). 2017-09-11 11:45:05 +02:00
Oliver Gierke
c575757093 DATAREST-1121 - Skip last modified detection for query methods that project.
For an execution of a projecting query method we now skip the last modified detection as it actually doesn't make sense if applied to non-aggregates.
2017-08-24 21:50:31 +02:00
Oliver Gierke
2fcfba09cc DATAREST-1110 - Prepare next development iteration. 2017-07-27 00:15:08 +02:00
Oliver Gierke
ec174db469 DATAREST-1110 - Release version 2.6.6 (Ingalls SR6). 2017-07-26 23:47:20 +02:00
Oliver Gierke
b9531c5394 DATAREST-1090 - Prepare next development iteration. 2017-07-24 19:25:06 +02:00
Oliver Gierke
31a2a0094a DATAREST-1090 - Release version 2.6.5 (Ingalls SR5). 2017-07-24 18:44:18 +02:00
Mark Paluch
4e7d733dd3 DATAREST-1059 - Prepare next development iteration. 2017-06-08 11:26:19 +02:00
Mark Paluch
3fe658fe0d DATAREST-1059 - Release version 2.6.4 (Ingalls SR4). 2017-06-08 10:56:52 +02:00
Oliver Gierke
2c1d831c62 DATAREST-1056 - Prepare next development iteration. 2017-04-19 20:01:13 +02:00
Oliver Gierke
ea2c13ac45 DATAREST-1056 - Release version 2.6.3 (Ingalls SR3). 2017-04-19 19:32:39 +02:00
Oliver Gierke
1f8857be95 DATAREST-1016 - Prepare next development iteration. 2017-04-19 11:48:43 +02:00
Oliver Gierke
41130ec142 DATAREST-1016 - Release version 2.6.2 (Ingalls SR2). 2017-04-19 10:11:29 +02:00
Oliver Gierke
f6708109ca DATAREST-990 - Prepare next development iteration. 2017-03-02 10:21:39 +01:00
Oliver Gierke
d75254d1ac DATAREST-990 - Release version 2.6.1 (Ingalls SR1). 2017-03-02 09:41:28 +01:00
Oliver Gierke
941408daff DATAREST-1003 - Entity resources don't answer arbitrary JSON requests.
Previously, when a request was sending an Accept header of some arbitrary *+json, the request was routed through the controllers and might have ended up producing a PersistentEntityResource that was then mapped using an uncustomized Jackson ObjectMapper. That has caused a huge JSON object to be unfolded which is highly undesirable.

We now only answer JSON requests to repository resources that contain an Accept header with any of the explicit JSON media types we got registered.

Tweaked the setup of the ExceptionHandlerExceptionResolver to not expose a bean in the first place but rather use the Spring MVC provided callbacks to register custom ones. We also now make sure MVC is bootstrapped property for integration tests through the inclusion of DelegatingWebMvcConfiguration.
2017-03-01 21:30:37 +01:00
Mark Paluch
d2386dc64e DATAREST-992 - Remove references to Assert single-arg methods.
Replace references to Assert single-arg methods with references to methods accepting the test object and message.

Related ticket: SPR-15196.
2017-02-01 13:23:59 +01:00
Oliver Gierke
17d08d2830 DATAREST-967 - Prepare next development iteration. 2017-01-26 10:57:45 +01:00
Oliver Gierke
93a2c589c5 DATAREST-967 - Release version 2.6 GA (Ingalls). 2017-01-26 10:27:10 +01:00
Oliver Gierke
99f49532b6 DATAREST-976 - Polishing.
Extracted test for the newly supported sorting scenario so that we now.

Original pull request: #251.
2017-01-16 13:31:45 +01:00
Mark Paluch
ffe96e4079 DATAREST-976 - Embedded properties are now considered in sort property paths.
We now allow sorting by properties of embedded objects. An embedded object is not linkable to a root object but embedded in the resource itself. If any part of the sort property path points to a linkable association, the whole sort property path is discarded silently and not used for sorting any further.

Original pull request: #251.
2017-01-16 13:30:30 +01:00
Mark Paluch
636956944c DATAREST-978 - Migrate ticket references in test code to Spring Framework style. 2017-01-13 10:07:40 +01:00
Oliver Gierke
187b3451fc DATAREST-862 - Prepare next development iteration. 2016-12-21 16:33:11 +01:00
Oliver Gierke
d7da7e107e DATAREST-862 - Release version 2.6 RC1 (Ingalls). 2016-12-21 16:19:34 +01:00
Oliver Gierke
50c2197a37 DATAREST-835 - Search resources returning a single resource now get and consider ETag and Last-Modified headers.
We now interpret If-None-Match and If-Modified-Since headers on requests to resources backed by query methods returning a single instance only. This allows clients to optimize GET requests to those resources to save bandwidth.
2016-12-08 21:32:58 +01:00
Oliver Gierke
cea8c122d3 DATAREST-862 - Fix Querydsl APT setup after compiler plugin update. 2016-12-08 16:04:58 +01:00
Mark Paluch
357bb7a28b DATAREST-910 - Support nested Sort properties.
We now support nested Sort properties considering Jackson mapping. Sort translation is optional and skipped if the domain class is not resolvable. Translation in the scope of a domain class maps property paths to apply sorting using embedded properties.

A sort string `nested-name` resolves to a property path `anotherWrap.embedded.name`.

class Aggregate {

	@JsonUnwrapped
	public UnwrapEmbedded anotherWrap;
}

class UnwrapEmbedded {

	@JsonUnwrapped(prefix = "nested-")
	public Embedded embedded;
}

class Embedded {
	public String name;
}

Original pull request: #232.
2016-12-06 11:57:49 +01:00
Oliver Gierke
bb26b39e81 DATAREST-925 - Polishing.
Original pull request: #238.
2016-12-02 20:16:51 +01:00
Craig Andrews
b66c8272ee DATAREST-925 - Invoke ResourceProcessors for ProjectionResources.
The serializer for projection resources now also invokes ResourceProcessor instances registered for that particular projection.

Original pull request: #238.
2016-12-02 20:16:48 +01:00
Oliver Gierke
8fd259dd32 DATAREST-906 - Polishing. 2016-11-03 16:28:33 +01:00
Oliver Gierke
40bb8e8e6c DATAREST-573 - Polishing.
Removed RepositoryRestConfiguration.addCorsMapping(…) as we currently don't have any other shortcut methods for configuration like this.

Tweaked the setup of (now Repository)CorsConfigurationAccessor to be created earlier so that we avoid recreation for every lookup. Introduced a NoOpStringValueResolver to be used by default so that we don't need to deal with the case of the resolver being null at the end of the call chain. Replaced constructor of RepositoryCorsConfigurationAccessor with corresponding Lombok annotation.

Updated reference documentation accordingly.

Original pull request: #233.
2016-10-28 14:19:26 +02:00
Mark Paluch
a3870ca528 DATAREST-573 - Add support for new CORS configuration mechanisms introduced in Spring 4.2.
We now support CORS configuration mechanisms introduced in Spring 4.2. CORS can be configured on multiple levels: Repository interface, Repository REST controller and global level. Spring Data REST CORS configuration is isolated so Spring Web MVC'S CORS configuration does not apply to Spring Data REST resources.

 Multiple configuration sources are merged so different aspects of CORS can be configured in separate locations.

@CrossOrigin
interface PersonRepository extends CrudRepository<Person, Long> {}

@RepositoryRestController
@RequestMapping("/person")
public class PersonController {

	@CrossOrigin(maxAge = 3600)
	@RequestMapping(method = RequestMethod.GET, "/xml/{id}", produces = MediaType.APPLICATION_XML_VALUE)
	public Person retrieve(@PathVariable Long id) {
		// ...
	}
}

@Component
public class SpringDataRestCustomization extends RepositoryRestConfigurerAdapter {

  @Override
  public void configureRepositoryRestConfiguration(RepositoryRestConfiguration config) {

    config.addCorsMapping("/person/**")
        .allowedOrigins("http://domain2.com")
        .allowedMethods("PUT", "DELETE")
        .allowedHeaders("header1", "header2", "header3")
        .exposedHeaders("header1", "header2")
        .allowCredentials(false).maxAge(3600);
  }
}
2016-10-28 14:19:26 +02:00
Mark Paluch
b436662304 DATAREST-906 - Consider default Pageable even if Sort is empty.
We now resolve default configured Pageable without dropping them if their Sort is empty. Previously, any default Pageable was dropped if its Sort was empty which caused null being handed to controller methods of @RepositoryRestController instances.

Original pull request: #231.
2016-09-23 15:20:56 +02:00
Oliver Gierke
90f57bd1e7 DATAREST-872 - Polishing.
Simplified types used for testing. Removed unnecessary repository interface.

Related pull request: #221.
2016-09-19 10:28:12 +02:00