当前位置: 首页>>代码示例>>Java>>正文


Java RepositoryRestConfigurerAdapter类代码示例

本文整理汇总了Java中org.springframework.data.rest.webmvc.config.RepositoryRestConfigurerAdapter的典型用法代码示例。如果您正苦于以下问题:Java RepositoryRestConfigurerAdapter类的具体用法?Java RepositoryRestConfigurerAdapter怎么用?Java RepositoryRestConfigurerAdapter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


RepositoryRestConfigurerAdapter类属于org.springframework.data.rest.webmvc.config包,在下文中一共展示了RepositoryRestConfigurerAdapter类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: repositoryRestConfigurer

import org.springframework.data.rest.webmvc.config.RepositoryRestConfigurerAdapter; //导入依赖的package包/类
@Bean
public RepositoryRestConfigurer repositoryRestConfigurer() {

	return new RepositoryRestConfigurerAdapter() {
		@Override
		public void configureRepositoryRestConfiguration(RepositoryRestConfiguration config) {
			config.exposeIdsFor(Order.class, Item.class, Customer.class);
		}
	};
}
 
开发者ID:ewolff,项目名称:microservice-atom,代码行数:11,代码来源:SpringRestDataConfig.java

示例2: repositoryRestConfigurer

import org.springframework.data.rest.webmvc.config.RepositoryRestConfigurerAdapter; //导入依赖的package包/类
@Bean
public RepositoryRestConfigurer repositoryRestConfigurer() {

    return new RepositoryRestConfigurerAdapter() {

        @Override
        public void configureRepositoryRestConfiguration(RepositoryRestConfiguration config) {
            config.setRepositoryDetectionStrategy(
                    RepositoryDetectionStrategy.RepositoryDetectionStrategies.ANNOTATED
            );
        }

        @Override
        public void configureJacksonObjectMapper(ObjectMapper objectMapper) {
            objectMapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY);
            objectMapper.registerModule(new AfterburnerModule()); //MOAR SPEED
        }
    };
}
 
开发者ID:EMBL-EBI-SUBS-OLD,项目名称:subs,代码行数:20,代码来源:RestRepositoryConfig.java

示例3: repositoryRestConfigurer

import org.springframework.data.rest.webmvc.config.RepositoryRestConfigurerAdapter; //导入依赖的package包/类
@Bean
public RepositoryRestConfigurer repositoryRestConfigurer() {

    return new RepositoryRestConfigurerAdapter() {

        @Override
        public void configureRepositoryRestConfiguration(RepositoryRestConfiguration config) {
            config.setDefaultPageSize(150);
        }
    };
}
 
开发者ID:SpartaSystems,项目名称:holdmail,代码行数:12,代码来源:MvcConfig.java

示例4: repositoryRestConfigurer

import org.springframework.data.rest.webmvc.config.RepositoryRestConfigurerAdapter; //导入依赖的package包/类
/**
 * define classes which should retourn the id's.
 * 
 * @return RepositoryRestConfigurer
 */
@Bean
public RepositoryRestConfigurer repositoryRestConfigurer() {
  return new RepositoryRestConfigurerAdapter() {
    @Override
    public void configureRepositoryRestConfiguration(final RepositoryRestConfiguration config) {
      config.exposeIdsFor(Person.class);
    }
  };
}
 
开发者ID:ManfredTremmel,项目名称:gwt-bean-validators-example,代码行数:15,代码来源:SpringDataConfig.java

示例5: repositoryRestConfigurer

import org.springframework.data.rest.webmvc.config.RepositoryRestConfigurerAdapter; //导入依赖的package包/类
@Bean
public RepositoryRestConfigurer repositoryRestConfigurer() {

    return new RepositoryRestConfigurerAdapter() {

        @Override
        public void configureRepositoryRestConfiguration(RepositoryRestConfiguration config) {
            config.setBasePath("/api");
        }
    };
}
 
开发者ID:mslosarz,项目名称:nextrtc-videochat-with-rest,代码行数:12,代码来源:MvcConfig.java


注:本文中的org.springframework.data.rest.webmvc.config.RepositoryRestConfigurerAdapter类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。