Commit Graph

215 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
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
7c328797f8 DATAREST-1219 - Removed explicit declaration of Jackson library versions. 2018-03-27 19:47:42 +02:00
Oliver Gierke
9063881f14 DATAREST-1215 - Added project.root configuration to make JavaDoc generation work again.
Related ticket: https://github.com/spring-projects/spring-data-build/issues/527.
2018-03-14 10:07:30 +01: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
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
Oliver Gierke
7aa2de04ff DATAREST-1075 - AnnotatedEventHandlerInvoker skips methods introduced by proxy. 2017-07-06 13:11:40 +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
65008f3ce1 DATAREST-1076 - Make sure tests compile on JDK 8. ¯\_(ツ)_/¯ 2017-05-18 15:15:55 +02:00
Oliver Gierke
396b32a62b DATAREST-1079 - Upgraded to EvoInflector 1.2.2. 2017-05-18 14:52:35 +02:00
Oliver Gierke
1f95a3387b DATAREST-1076 - Expose constructor that takes RelProvider of RepositoryResourceMappings.
We now expose the constructor that takes a RelProvider in RepositoryResourceMappings so that clients can tweak the default relation names. Changed the order of constructor parameters of (previously) non-public constructors for consistency.

The RelProvider to be used with the mappings can now be configured via RepositoryRestConfiguration and defaults to the EvoInflector based one.
2017-05-18 14:50:50 +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
a2d11011da DATAREST-1018 - Prevent NullPointerException in UriToEntityConverter.
In case PersistentEntities exposes a managed type whose raw type currently doesn't have a PersistentEntity registered, the constructor of UriToEntityConverter ran into a NullPointerException.

We now explicitly check for null and skip those types.

Filed DATAREST-1021 for further improvements in the 3.0 time frame.
2017-03-07 14:50:30 +01:00
Oliver Gierke
6367af2f84 DATAREST-1014 - Avoid Java 8 API usage in AnnotatedEventHandlerInvoker.
Dropped the call to Method.getParameterCount() in favor of ….getParameterTypes().length as the former method was introduced in Java 8.
2017-03-03 11:39:30 +01: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
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
5494f1f6a5 DATAREST-983 - AnnotatedEventHandlerInvoker now resolves generic handler method argument.
We now resolve the handler method argument type of an annotated repository event handler against the concrete handler type to make sure generics are resolved properly.
2017-01-24 16:57:35 +01:00
Oliver Gierke
6a3a7131ac DATAREST-970 - AnnotationEventHandlerInvoker now considers order of event handler methods.
We now make sure that an @Order annotation on annotated event handler methods are considered and the methods are invoked in the defined order.

Non-annotation-based event handlers don't suffer from the same problem as they're ApplicationListener instances directly so that the container will enforce the correct ordering in case @Order is used or Ordered is implemented.

Some cleanup in EventHandlerMethod.

Original pull request: #248.
2017-01-19 15:05:43 +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
5269a7d175 DATAREST-793 - RepositoryRestConfiguration's setters return this consistently.
Adapted the return type of setter methods in RepositoryRestConfiguration to consistently return the current instance to allow call chaining.
2016-12-12 16:50:38 +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
a254e1adae DATAREST-957 - Polish most critical Sonar warnings.
Fixed broken equals(…) in ProjectionDefinition. Switched to iterating over Map's entry set instead of the keys. Made UriAwareHttpServletRequest static.
2016-12-08 10:12:01 +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
Oliver Trosien
d6caac122e DATAREST-898 - Fix typo in EntityLookupConfiguration assertion message.
Original pull request: #228.
2016-09-19 15:40:56 +02:00