public static HttpServer httpBuilder (String connectionUrl, String profileName) { try { URL url = new URL(connectionUrl); System.setProperty("spring.profiles.active", profileName); AnnotationConfigApplicationContext annotationConfigApplicationContext = new AnnotationConfigApplicationContext(SpringAnnotationConfig.class); ResourceConfig resourceConfig = new ResourceConfig(); resourceConfig.register(RequestContextFilter.class); resourceConfig.property("contextConfig", annotationConfigApplicationContext); resourceConfig.register(RestSupport.class); URI baseUri = URI.create(url.getProtocol() + "://" + url.getAuthority()); return GrizzlyHttpServerFactory.createHttpServer(baseUri, resourceConfig, false); } catch (Exception e) { Assert.fail("Could'n parse configfile." + e.getMessage()); } return null; }
public WechatMallApplication() { String admin = "org.jiumao.wechatMall.admin.resource"; String mall = "org.jiumao.wechatMall.mall.resource"; String api = "org.jiumao.wechatMall.api.resource"; String user = "org.jiumao.wechatMall.user.resource"; packages(admin, mall, api, user); register(RequestContextFilter.class); register(JacksonFeature.class); register(AppkeyServiceFeature.class); register(AuthServiceFeature.class); register(LoggingResponseFilter.class); register(CORSResponseFilter.class); }
public static HttpServer httpBuilder (String connectionUrl) { try { URL url = new URL(connectionUrl); AnnotationConfigApplicationContext annotationConfigApplicationContext = new AnnotationConfigApplicationContext(SpringAnnotationConfig.class); ResourceConfig resourceConfig = new ResourceConfig(); resourceConfig.register(RequestContextFilter.class); resourceConfig.property("contextConfig", annotationConfigApplicationContext); resourceConfig.register(RestSupport.class); URI baseUri = URI.create(url.getProtocol() + "://" + url.getAuthority()); return GrizzlyHttpServerFactory.createHttpServer(baseUri, resourceConfig, false); } catch (Exception e) { Assert.fail("Could'n parse configfile." + e.getMessage()); } return null; }
/** * Register JAX-RS application components. */ public RestJaxRsApplication() { // register application resources this.register(UserResource.class); this.register(OrderResource.class); // register filters register(RequestContextFilter.class); //register(LoggingResponseFilter.class); //register(CORSResponseFilter.class); // register exception mappers //register(GenericExceptionMapper.class); //register(AppExceptionMapper.class); //register(NotFoundExceptionMapper.class); // register features register(JacksonFeature.class); //register(MultiPartFeature.class); }
@Autowired public RestResourceConfig(final ApplicationContext applicationContext) { property("contextConfig", applicationContext); scanner = new ClassPathScanningCandidateComponentProvider(true); scanner.resetFilters(false); scanner.addIncludeFilter(new AnnotationTypeFilter(Path.class)); scanner.addIncludeFilter(new AnnotationTypeFilter(Provider.class)); register(RequestContextFilter.class); register(MultiPartFeature.class); register(ObjectMapperProvider.class); register(JacksonFeature.class); registerResources("com.clicktravel.cheddar.rest.exception.mapper", "com.clicktravel.cheddar.server.http.filter", "com.clicktravel.cheddar.server.rest.resource.status", "com.clicktravel.services", "com.clicktravel.cheddar.rest.body.writer"); property(ServerProperties.LOCATION_HEADER_RELATIVE_URI_RESOLUTION_DISABLED, true); }
public JerseyConfig() { scan("com.devicehive.resource.converters", "com.devicehive.resource.exceptions", "com.devicehive.resource.filter"); registerClasses(AuthApiInfoResourceImpl.class, JwtTokenResourceImpl.class); property(ServerProperties.BV_SEND_ERROR_IN_RESPONSE, true); register(RequestContextFilter.class); register(LoggingFeature.class); register(ContentTypeFilter.class); register(io.swagger.jaxrs.listing.ApiListingResource.class); register(io.swagger.jaxrs.listing.SwaggerSerializers.class); }
public JerseyConfig() { scan("com.devicehive.resource.converters", "com.devicehive.resource.exceptions", "com.devicehive.resource.filter"); registerClasses(ApiInfoResourceImpl.class, ConfigurationResourceImpl.class, DeviceCommandResourceImpl.class, DeviceNotificationResourceImpl.class, DeviceResourceImpl.class, NetworkResourceImpl.class, DeviceTypeResourceImpl.class, WelcomeResourceImpl.class, UserResourceImpl.class); property(ServerProperties.BV_SEND_ERROR_IN_RESPONSE, true); register(RequestContextFilter.class); register(LoggingFeature.class); register(ContentTypeFilter.class); register(io.swagger.jaxrs.listing.ApiListingResource.class); register(io.swagger.jaxrs.listing.SwaggerSerializers.class); }
public JerseyConfig() { scan("com.devicehive.resource.converters", "com.devicehive.resource.exceptions", "com.devicehive.resource.filter"); registerClasses(PluginApiInfoResourceImpl.class, PluginResourceImpl.class); property(ServerProperties.BV_SEND_ERROR_IN_RESPONSE, true); register(RequestContextFilter.class); register(LoggingFeature.class); register(ContentTypeFilter.class); register(io.swagger.jaxrs.listing.ApiListingResource.class); register(io.swagger.jaxrs.listing.SwaggerSerializers.class); }
@Override public ResourceConfig configure() { ResourceConfig rc = new FactCastRestApplication(); ctx = new AnnotationConfigApplicationContext(SpringConfig.class); rc.property("contextConfig", ctx); rc.register(SpringLifecycleListener.class); rc.register(RequestContextFilter.class); return rc; }
public RequestHandler() { // configure the application with the resource ResourceConfig resourceConfig = new ResourceConfig() .register(GatewayFeature.class) .register(RequestContextFilter.class) .packages("com.jrestless.aws.examples"); resourceConfig.property("contextConfig", new AnnotationConfigApplicationContext(SpringConfig.class)); init(resourceConfig); start(); }
/** * Register JAX-RS application components. */ public MyDemoApplication(){ register(RequestContextFilter.class); register(JacksonFeature.class); //register(LoggingResponseFilter.class); register(CORSResponseFilter.class); register(EventRestService.class); register(UserRestService.class); register(AuthenticationRequestFilter.class); register(AuthenticationSecurityContext.class); }
public JerseyConfig() { // Enable Spring and Jackson support register(RequestContextFilter.class); register(JacksonObjectMapperConfig.class); // Application resources register(GreetingsResource.class); }
public JerseyConfiguration() { register(RequestContextFilter.class); packages("org.obiba.agate.web", "org.obiba.jersey", "com.fasterxml.jackson"); register(LoggingFilter.class); register(AuthenticationInterceptor.class); register(AuditInterceptor.class); // validation errors will be sent to the client property(ServerProperties.BV_SEND_ERROR_IN_RESPONSE, true); }
/** * Register JAX-RS application components. */ public MyApplication () { register(RequestContextFilter.class); register(JerseyResource.class); register(SpringSingletonResource.class); register(SpringRequestResource.class); register(CustomExceptionMapper.class); register(UserResource.class); }
/** * Register JAX-RS application components. */ public ApplicationConfig() { Reflections reflections = new Reflections("org.excalibur"); RESOURCES = Collections.unmodifiableList(new ArrayList<Class<?>>(reflections.getTypesAnnotatedWith(Path.class))); register(RequestContextFilter.class); registerResources(RESOURCES); registerResources(reflections.getTypesAnnotatedWith(Provider.class)); }
/** * Register JAX-RS application components. */ public MyDemoApplication() { this.register(RequestContextFilter.class); this.register(TestResource.class); this.register(JacksonFeature.class); // Use this for registering a full set of resources. // this.packages("org.foo.rest;org.bar.rest"); }
/** * Register JAX-RS application components. */ public MyDemoApplication(){ register(RequestContextFilter.class); register(PodcastRestService.class); register(PodcastLegacyRestService.class); register(JacksonFeature.class); register(LoggingResponseFilter.class); register(CORSResponseFilter.class); }
/** * Register JAX-RS application components */ public MyDemoApplication() { register(RequestContextFilter.class); register(OrderRestService.class); register(JacksonFeature.class); register(LoggingResponseFilter.class); register(CORSResponseFilter.class); }
public JerseyConfiguration() { register(RequestContextFilter.class); packages("org.obiba.mica", "org.obiba.jersey", "com.fasterxml.jackson"); register(LoggingFilter.class); register(AuthenticationInterceptor.class); register(ConfigurationInterceptor.class); register(AuditInterceptor.class); register(MultiPartFeature.class); // validation errors will be sent to the client property(ServerProperties.BV_SEND_ERROR_IN_RESPONSE, true); }
public JerseyConfig() { // Enable Spring DI and Jackson configuration register(RequestContextFilter.class); register(JacksonObjectMapperConfig.class); // Application resources register(GameResource.class); register(PegResource.class); register(ToolResource.class); }
/** * Register JAX-RS application components. */ public MyDemoApplication(){ register(RequestContextFilter.class); register(PodcastRestService.class); register(JacksonFeature.class); register(LoggingResponseFilter.class); register(CORSResponseFilter.class); }
/** * Register JAX-RS application components. */ public JerseyApplication() { packages("org.plos.repo.rest"); register(MultiPartFeature.class); register(RequestContextFilter.class); }
public ApplicationConfig() { register(RequestContextFilter.class); register(RolesAllowedDynamicFeature.class); register(Jackson2Feature.class); register(AuthorizationRequestFilter.class); register(QuestionnairResource.class); register(LoggingFilter.class); // register(JerseyResource.class); // register(SpringSingletonResource.class); // register(SpringRequestResource.class); // register(CustomExceptionMapper.class); }
public DefaultApplicationConfig() { super(); register(RequestContextFilter.class); register(ExceptionMapperSupport.class); register(XSSFilter.class); }
public JerseyConfig() { register(RequestContextFilter.class); packages("info.getsocial.rest"); register(LoggingFilter.class); }
public JerseyBootstrap() { register(RequestContextFilter.class); packages(true, "io.github.tomacla.auth.server.api"); }
public HelloWorldRestApplication() { register(RequestContextFilter.class); register(HelloWorldResource.class); }
public RestResourceApplication() { packages("com.porterhead.resource", "com.porterhead.user.resource", "com.porterhead.sample"); register(RequestContextFilter.class); ApplicationContext rootCtx = ContextLoader.getCurrentWebApplicationContext(); ContainerResponseFilter filter = rootCtx.getBean(JerseyCrossOriginResourceSharingFilter.class); register(filter); register(GenericExceptionMapper.class); register(AccessDeniedExceptionMapper.class); register(JacksonFeature.class); }
public JerseyBootstrap() { register(RequestContextFilter.class); packages(true, "io.github.tomacla.server.app.api"); }