@Test public void testHandlerPackageEmpty() { String configName = "rpc-router-empty"; RpcRouterConfig config = (RpcRouterConfig) Config.getInstance().getJsonObjectConfig(configName, RpcRouterConfig.class); List<String> handlers; try (ScanResult scanResult = new ClassGraph() .whitelistPackages(config.getHandlerPackage()) .enableAllInfo() .scan()) { handlers = scanResult .getClassesWithAnnotation(ServiceHandler.class.getName()) .getNames(); } Assert.assertTrue(handlers.size() > 0); }
public String getHandlerPackage() { return handlerPackage; }
RpcRouterConfig { public String getHandlerPackage() { return handlerPackage; } }
RpcRouterConfig { public String getHandlerPackage() { return handlerPackage; } RpcRouterConfig(); }
RpcRouterConfig { public String getHandlerPackage() { return handlerPackage; } RpcRouterConfig(); String getDescription(); void setDescription(String description); String getHandlerPackage(); void setHandlerPackage(String handlerPackage); String getJsonPath(); void setJsonPath(String jsonPath); String getFormPath(); void setFormPath(String formPath); String getColferPath(); void setColferPath(String colferPath); String getResourcesBasePath(); void setResourcesBasePath(String resourcesBasePath); boolean isRegisterService(); void setRegisterService(boolean registerService); }
RpcRouterConfig { public String getHandlerPackage() { return handlerPackage; } RpcRouterConfig(); String getDescription(); void setDescription(String description); String getHandlerPackage(); void setHandlerPackage(String handlerPackage); String getJsonPath(); void setJsonPath(String jsonPath); String getFormPath(); void setFormPath(String formPath); String getColferPath(); void setColferPath(String colferPath); String getResourcesBasePath(); void setResourcesBasePath(String resourcesBasePath); boolean isRegisterService(); void setRegisterService(boolean registerService);  }