Package org.springframework.hateoas.core

Examples of org.springframework.hateoas.core.EvoInflectorRelProvider


  }

  @Bean
  public ObjectMapper objectMapper() {

    RelProvider relProvider = new EvoInflectorRelProvider();
    ObjectMapper mapper = new ObjectMapper();

    mapper.registerModule(new Jackson2HalModule());
    mapper.registerModule(persistentEntityModule());
    mapper.setHandlerInstantiator(new Jackson2HalModule.HalHandlerInstantiator(relProvider, null));
View Full Code Here


  @Before
  public void setUp() {

    this.mapper = new ObjectMapper();
    this.mapper.registerModule(new Jackson2HalModule());
    this.mapper.setHandlerInstantiator(new HalHandlerInstantiator(new EvoInflectorRelProvider(), null));
  }
View Full Code Here

  @Test
  public void rendersHalContentCorrectly() throws Exception {

    ObjectMapper mapper = new ObjectMapper();
    mapper.registerModule(new Jackson2HalModule());
    mapper.setHandlerInstantiator(new Jackson2HalModule.HalHandlerInstantiator(new EvoInflectorRelProvider(), null));

    Customer customer = new Customer();
    customer.firstname = "Dave";
    customer.lastname = "Matthews";
    customer.address = new Address();
View Full Code Here

   * Creates a new {@link TypeBasedCollectionResourceMapping} using the given type.
   *
   * @param type must not be {@literal null}.
   */
  public TypeBasedCollectionResourceMapping(Class<?> type) {
    this(type, new EvoInflectorRelProvider());
  }
View Full Code Here

    return objectMapper;
  }

  private RelProvider getDefaultedRelProvider() {
    return this.relProvider != null ? relProvider : new EvoInflectorRelProvider();
  }
View Full Code Here

   *
   * @param config
   * @param repositories
   */
  public RepositoryResourceMappings(RepositoryRestConfiguration config, Repositories repositories) {
    this(config, repositories, new EvoInflectorRelProvider());
  }
View Full Code Here

  private final CollectionResourceMapping domainTypeMapping;
  private final boolean repositoryIsExportCandidate;
  private final RepositoryMetadata metadata;

  public RepositoryCollectionResourceMapping(RepositoryMetadata metadata) {
    this(metadata, new EvoInflectorRelProvider());
  }
View Full Code Here

  RelProvider provider;

  @Before
  public void setUp() {
    provider = new EvoInflectorRelProvider();
  }
View Full Code Here

  private final MultiValueMap<Link, Link> baseResources = new LinkedMultiValueMap<Link, Link>();

  public Server() {

    this.relProvider = new EvoInflectorRelProvider();

    this.mapper = new ObjectMapper();
    this.mapper.registerModule(new Jackson2HalModule());
    this.mapper.setHandlerInstantiator(new Jackson2HalModule.HalHandlerInstantiator(relProvider, null));
View Full Code Here

TOP

Related Classes of org.springframework.hateoas.core.EvoInflectorRelProvider

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.