DATACMNS-388 - Improve declaration of PagedResourceAssembler in JavaConfig.
Based on the discussion in SPR-11004 [0], the declaration of the PagedResourcesAssembler in HateoasAwareSpringDataWebConfiguration will not result in it being autowired using Spring 4.0 in certain circumstances. This change loosens the declaration so that it can be autowired into declarations that have specific generics declarations. Original pull request: #51. [1]: https://jira.springsource.org/browse/SPR-11004
This commit is contained in:
@@ -31,6 +31,7 @@ import org.springframework.web.method.support.HandlerMethodArgumentResolver;
|
||||
* @since 1.6
|
||||
* @author Oliver Gierke
|
||||
* @author Nick Williams
|
||||
* @author Ben Hale
|
||||
*/
|
||||
@Configuration
|
||||
public class HateoasAwareSpringDataWebConfiguration extends SpringDataWebConfiguration {
|
||||
@@ -56,7 +57,7 @@ public class HateoasAwareSpringDataWebConfiguration extends SpringDataWebConfigu
|
||||
}
|
||||
|
||||
@Bean
|
||||
public PagedResourcesAssembler<Object> pagedResourcesAssembler() {
|
||||
public PagedResourcesAssembler<?> pagedResourcesAssembler() {
|
||||
return new PagedResourcesAssembler<Object>(pageableResolver(), null);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user