Examples of packages()


Examples of org.glassfish.jersey.server.ResourceConfig.packages()

            initParams.put("com.sun.jersey.config.property.packages",
                    "com.cisco.oss.foundation.tools");

            // Create the servlet
            ResourceConfig resourceConfig = new ResourceConfig();
            resourceConfig.packages("com.cisco.oss.foundation.tools");
            ServletContainer resourceServlet = new ServletContainer(resourceConfig);
            servlets.put("/*", resourceServlet);

      XmlWebApplicationContext webConfig = new XmlWebApplicationContext();
      webConfig.setConfigLocation("classpath:META-INF/restSimulatorContext.xml");
View Full Code Here

Examples of org.glassfish.jersey.server.ResourceConfig.packages()

      logger.error("simulator on port " + port + " already exists");
      return false;
    }

        ResourceConfig resourceConfig = new ResourceConfig();
        resourceConfig.packages("com.cisco.oss.foundation.tools");
   
    ServletContainer servletContainer = new ServletContainer(resourceConfig);
   
    ListMultimap<String, Servlet> servlets = ArrayListMultimap.create();
    servlets.put("/*", servletContainer);
View Full Code Here

Examples of org.glassfish.jersey.server.ResourceConfig.packages()

    }

    @Test
    public void findsResourceClassInPackage() {
        ResourceConfig rc = DropwizardResourceConfig.forTesting(new MetricRegistry());
        rc = rc.packages(DummyResource.class.getPackage().getName());

        assertThat(rc.getClasses()).contains(DummyResource.class);
    }

    @Test
View Full Code Here

Examples of org.glassfish.jersey.server.ResourceConfig.packages()

    }

    @Test
    public void findsResourceClassesInPackageAndSubpackage() {
        ResourceConfig rc = DropwizardResourceConfig.forTesting(new MetricRegistry());
        rc = rc.packages(getClass().getPackage().getName());

        assertThat(rc.getClasses())
                .contains
                        (DummyResource.class, TestResource.class);
    }
View Full Code Here

Examples of org.glassfish.jersey.server.ResourceConfig.packages()

    }

    @Test
    public void testJdkHttpPackage() {
        final ResourceConfig rc = new ResourceConfig();
        rc.packages(this.getClass().getPackage().getName());

        startServer(rc);

        WebTarget r = ClientBuilder.newClient().target(getUri().path("/").build());
View Full Code Here

Examples of org.gwtoolbox.bean.client.annotation.BeanScan.packages()

    //================================================ Helper Methods ==================================================

    private Pattern[] resolvePackageScanPatterns(JClassType type) {
        BeanScan beanScan = type.getAnnotation(BeanScan.class);
        String[] packages = beanScan.packages();
        PackageResolver packageResolver = beanScan.resolver();
        Pattern[] patterns = new Pattern[packages.length];
        int i = 0;
        for (String packageExpression : packages) {
            patterns[i++] = PatternUtils.resolvePattern(packageExpression, packageResolver);
View Full Code Here

Examples of org.jboss.arquillian.spring.integration.test.annotation.SpringAnnotationConfiguration.packages()

     */
    private ApplicationContext getApplicationContext(TestClass testClass) {

        SpringAnnotationConfiguration springConfiguration = testClass.getAnnotation(SpringAnnotationConfiguration.class);

        String[] packages = springConfiguration.packages();
        Class<?>[] classes = springConfiguration.classes();
        Class<? extends ApplicationContext> customAnnotationContextClass;

        customAnnotationContextClass = getCustomAnnotationContextClass();
        if (springConfiguration.contextClass() != ApplicationContext.class) {
View Full Code Here

Examples of org.jboss.arquillian.spring.integration.test.annotation.SpringClientAnnotationConfiguration.packages()

    private ApplicationContext getApplicationContext(TestClass testClass) {

        SpringClientAnnotationConfiguration springConfiguration =
                testClass.getAnnotation(SpringClientAnnotationConfiguration.class);

        String[] packages = springConfiguration.packages();
        Class<?>[] classes = springConfiguration.classes();

        // creates standard spring annotated application context
        return createAnnotatedApplicationContext(testClass, packages, classes);
    }
View Full Code Here

Examples of org.jboss.arquillian.spring.test.annotation.SpringAnnotatedConfiguration.packages()

     */
    private ApplicationContext getApplicationContext(TestClass testClass) {

        SpringAnnotatedConfiguration springConfiguration = testClass.getAnnotation(SpringAnnotatedConfiguration.class);

        String[] packages = springConfiguration.packages();
        Class<?>[] classes = springConfiguration.classes();
        Class<? extends ApplicationContext> customAnnotationContextClass;

        customAnnotationContextClass = getCustomAnnotationContextClass();
        if (springConfiguration.contextClass() != ApplicationContext.class) {
View Full Code Here

Examples of org.nutz.mvc.annotation.Modules.packages()

        list.add(module);
      }
    }
    //扫描包
    Set<Class<?>> modules = new HashSet<Class<?>>();
    if(null != ann && ann.packages() != null && ann.packages().length > 0 ){
      for (String packageName : ann.packages())
        scanModuleInPackage(modules, packageName);
    }
    // 执行扫描
    for (Class<?> type : list) {
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.