Package io.dropwizard.jersey

Examples of io.dropwizard.jersey.DropwizardResourceConfig.register()


                    test = new JerseyTest() {
                        @Override
                        protected Application configure() {
                            DropwizardResourceConfig config = DropwizardResourceConfig.forTesting(new MetricRegistry());
                            for (Class<?> provider : providers) {
                                config.register(provider);
                            }
                            for (Map.Entry<String, Object> property : properties.entrySet()) {
                                config.property(property.getKey(), property.getValue());
                            }
                            config.register(new JacksonMessageBodyProvider(mapper, validator));
View Full Code Here


                                config.register(provider);
                            }
                            for (Map.Entry<String, Object> property : properties.entrySet()) {
                                config.property(property.getKey(), property.getValue());
                            }
                            config.register(new JacksonMessageBodyProvider(mapper, validator));
                            for (Object singleton : singletons)
                                config.register(singleton);
                            return config;
                        }
                    };
View Full Code Here

                            for (Map.Entry<String, Object> property : properties.entrySet()) {
                                config.property(property.getKey(), property.getValue());
                            }
                            config.register(new JacksonMessageBodyProvider(mapper, validator));
                            for (Object singleton : singletons)
                                config.register(singleton);
                            return config;
                        }
                    };
                    test.setUp();
                    base.evaluate();
View Full Code Here

        } finally {
            session.close();
        }

        final DropwizardResourceConfig config = DropwizardResourceConfig.forTesting(new MetricRegistry());
        config.register(new UnitOfWorkApplicationListener(sessionFactory));
        config.register(new PersonResource(new PersonDAO(sessionFactory)));
        config.register(new JacksonMessageBodyProvider(Jackson.newObjectMapper(),
                                                       Validation.buildDefaultValidatorFactory().getValidator()));
        return config;
    }
View Full Code Here

            session.close();
        }

        final DropwizardResourceConfig config = DropwizardResourceConfig.forTesting(new MetricRegistry());
        config.register(new UnitOfWorkApplicationListener(sessionFactory));
        config.register(new PersonResource(new PersonDAO(sessionFactory)));
        config.register(new JacksonMessageBodyProvider(Jackson.newObjectMapper(),
                                                       Validation.buildDefaultValidatorFactory().getValidator()));
        return config;
    }
View Full Code Here

        }

        final DropwizardResourceConfig config = DropwizardResourceConfig.forTesting(new MetricRegistry());
        config.register(new UnitOfWorkApplicationListener(sessionFactory));
        config.register(new PersonResource(new PersonDAO(sessionFactory)));
        config.register(new JacksonMessageBodyProvider(Jackson.newObjectMapper(),
                                                       Validation.buildDefaultValidatorFactory().getValidator()));
        return config;
    }

    @Override
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.