io.gravitee.common.util.Version Java Examples
The following examples show how to use
io.gravitee.common.util.Version.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: HeartbeatService.java From gravitee-gateway with Apache License 2.0 | 6 votes |
private InstanceEventPayload createInstanceInfo() { InstanceEventPayload instanceInfo = new InstanceEventPayload(); instanceInfo.setId(node.id()); instanceInfo.setVersion(Version.RUNTIME_VERSION.toString()); Optional<List<String>> shardingTags = gatewayConfiguration.shardingTags(); instanceInfo.setTags(shardingTags.orElse(null)); instanceInfo.setPlugins(plugins()); instanceInfo.setSystemProperties(getSystemProperties()); instanceInfo.setPort(port); Optional<String> tenant = gatewayConfiguration.tenant(); instanceInfo.setTenant(tenant.orElse(null)); try { instanceInfo.setHostname(InetAddress.getLocalHost().getHostName()); instanceInfo.setIp(InetAddress.getLocalHost().getHostAddress()); } catch (UnknownHostException uhe) { LOGGER.warn("Could not get hostname / IP", uhe); } return instanceInfo; }
Example #2
Source File: ManagementApplication.java From graviteeio-access-management with Apache License 2.0 | 5 votes |
public ManagementApplication() { BeanConfig beanConfig = new BeanConfig(); beanConfig.setVersion(Version.RUNTIME_VERSION.MAJOR_VERSION); beanConfig.setResourcePackage("io.gravitee.am.management.handlers.management.api.resources"); beanConfig.setTitle("Gravitee.io - Access Management API"); beanConfig.setBasePath("/management"); beanConfig.setScan(true); register(OrganizationsResource.class); register(PlatformResource.class); register(CurrentUserResource.class); register(ObjectMapperResolver.class); register(ManagementExceptionMapper.class); register(UnrecognizedPropertyExceptionMapper.class); register(ThrowableMapper.class); register(ClientErrorExceptionMapper.class); register(Oauth2ExceptionMapper.class); register(ValidationExceptionMapper.class); register(JsonMappingExceptionMapper.class); register(WebApplicationExceptionMapper.class); register(UriBuilderRequestFilter.class); register(ByteArrayOutputStreamWriter.class); register(ApiListingResource.class); register(SwaggerSerializers.class); property(ServerProperties.BV_SEND_ERROR_IN_RESPONSE, true); }
Example #3
Source File: NodeTemplateVariableProvider.java From gravitee-gateway with Apache License 2.0 | 4 votes |
public void afterPropertiesSet() { nodeProperties = new NodeProperties(); nodeProperties.setId(node.id()); nodeProperties.setVersion(Version.RUNTIME_VERSION.MAJOR_VERSION); nodeProperties.setTenant(gatewayConfiguration.tenant().orElse(null)); }