org.springframework.boot.context.properties.DeprecatedConfigurationProperty Java Examples
The following examples show how to use
org.springframework.boot.context.properties.DeprecatedConfigurationProperty.
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: SentinelProperties.java From spring-cloud-alibaba with Apache License 2.0 | 5 votes |
@Deprecated @DeprecatedConfigurationProperty( reason = "replaced to SentinelProperties#blockPage.", replacement = SentinelConstants.PROPERTY_PREFIX + ".block-page") public String getBlockPage() { return blockPage; }
Example #2
Source File: NacosConfigProperties.java From spring-cloud-alibaba with Apache License 2.0 | 5 votes |
/** * recommend to use {@link NacosConfigProperties#sharedConfigs} . * @return string */ @Deprecated @DeprecatedConfigurationProperty( reason = "replaced to NacosConfigProperties#sharedConfigs and not use it at the same time.", replacement = PREFIX + ".shared-configs[x]") public String getSharedDataids() { return null == getSharedConfigs() ? null : getSharedConfigs().stream() .map(Config::getDataId).collect(Collectors.joining(COMMAS)); }
Example #3
Source File: NacosConfigProperties.java From spring-cloud-alibaba with Apache License 2.0 | 5 votes |
/** * Not providing support,the need to refresh is specified by the respective refresh * configuration and not use it at the same time . * @return string */ @Deprecated @DeprecatedConfigurationProperty( reason = "replaced to NacosConfigProperties#sharedConfigs and not use it at the same time.", replacement = PREFIX + ".shared-configs[x].refresh") public String getRefreshableDataids() { return null == getSharedConfigs() ? null : getSharedConfigs().stream().filter(Config::isRefresh) .map(Config::getDataId).collect(Collectors.joining(COMMAS)); }
Example #4
Source File: NacosConfigProperties.java From spring-cloud-alibaba with Apache License 2.0 | 5 votes |
/** * recommend to use * {@link com.alibaba.cloud.nacos.NacosConfigProperties#extensionConfigs} and not use * it at the same time . * @return extensionConfigs */ @Deprecated @DeprecatedConfigurationProperty( reason = "replaced to NacosConfigProperties#extensionConfigs and not use it at the same time .", replacement = PREFIX + ".extension-configs[x]") public List<Config> getExtConfig() { return this.getExtensionConfigs(); }
Example #5
Source File: MailModuleProperties.java From code-examples with MIT License | 4 votes |
@DeprecatedConfigurationProperty(reason = "not needed anymore", replacement = "none") public String getDefaultSubject() { return defaultSubject; }
Example #6
Source File: JiuxianProperties.java From SpringBoot2.0 with Apache License 2.0 | 4 votes |
@DeprecatedConfigurationProperty(replacement = "jiuxian.name-cn", reason = "deprecated") public String getName() { return getNameCn(); }
Example #7
Source File: JaegerConfigurationProperties.java From java-spring-jaeger with Apache License 2.0 | 4 votes |
@DeprecatedConfigurationProperty(replacement = "Use host + port properties instead") public String getHostPort() { return hostPort; }
Example #8
Source File: User.java From thinking-in-spring-boot-samples with Apache License 2.0 | 4 votes |
@DeprecatedConfigurationProperty(reason = "不推荐使用 String 类型描述用户主页") @Deprecated public String getHomePage() { return homePage; }
Example #9
Source File: CustomProperties.java From Spring-Boot-Examples with MIT License | 4 votes |
@DeprecatedConfigurationProperty(replacement = "custom.connection.address") @Deprecated public String getServer() { return getAddress(); }
Example #10
Source File: RabbitProperties.java From summerframework with Apache License 2.0 | 4 votes |
@DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.auto-startup") @Deprecated public boolean isAutoStartup() { return getSimple().isAutoStartup(); }
Example #11
Source File: RateLimitProperties.java From spring-cloud-zuul-ratelimit with Apache License 2.0 | 4 votes |
/** * Tells if rate limit response headers should be added to response. * * @deprecated use {{@link #responseHeaders} */ @Deprecated @DeprecatedConfigurationProperty(replacement = "zuul.ratelimit.response-headers") public boolean isAddResponseHeaders() { return !NONE.equals(responseHeaders); }
Example #12
Source File: VaultKeyValueBackendProperties.java From spring-cloud-vault with Apache License 2.0 | 4 votes |
@Deprecated @DeprecatedConfigurationProperty( reason = "Backend version no longer required. The kv version is determined during secret retrieval") public int getBackendVersion() { return this.backendVersion; }
Example #13
Source File: FlowableProperties.java From flowable-engine with Apache License 2.0 | 4 votes |
/** * @deprecated use {@link org.flowable.spring.boot.process.FlowableProcessProperties#getServlet()#getPath()} */ @DeprecatedConfigurationProperty(replacement = "flowable.process.servlet.path") @Deprecated public String getRestApiMapping() { throw new IllegalStateException("Usage of deprecated property. Use FlowableProcessProperties"); }
Example #14
Source File: FlowableProperties.java From flowable-engine with Apache License 2.0 | 4 votes |
/** * @deprecated use {@link org.flowable.spring.boot.process.FlowableProcessProperties#getServlet()#getName()} */ @DeprecatedConfigurationProperty(replacement = "flowable.process.servlet.name") @Deprecated public String getRestApiServletName() { throw new IllegalStateException("Usage of deprecated property. Use FlowableProcessProperties"); }
Example #15
Source File: FlowableProperties.java From flowable-engine with Apache License 2.0 | 4 votes |
/** * @deprecated use {@link org.flowable.spring.boot.idm.FlowableIdmProperties#isEnabled()} */ @DeprecatedConfigurationProperty(replacement = "flowable.idm.enabled") @Deprecated public boolean isDbIdentityUsed() { return isDbIdentityUsed; }
Example #16
Source File: DeploymentProperties.java From spring-data-dev-tools with Apache License 2.0 | 4 votes |
@DeprecatedConfigurationProperty(reason = "Moved to gpg.", replacement = "gpg") public Gpg getGpg() { return gpg; }
Example #17
Source File: InstanceRegistryProperties.java From spring-cloud-netflix with Apache License 2.0 | 4 votes |
@DeprecatedConfigurationProperty( replacement = PREFIX + ".expected-number-of-clients-sending-renews") @Deprecated public int getExpectedNumberOfRenewsPerMin() { return getExpectedNumberOfClientsSendingRenews(); }
Example #18
Source File: SpringBootAutoConfigurationMojo.java From camel-spring-boot with Apache License 2.0 | 4 votes |
private void createComponentConfigurationSource(String packageName, ComponentModel model, String overrideComponentName) throws MojoFailureException { int pos = model.getJavaType().lastIndexOf("."); String name = model.getJavaType().substring(pos + 1); name = name.replace("Component", "ComponentConfiguration"); final JavaClass javaClass = new JavaClass(getProjectClassLoader()); javaClass.setPackage(packageName); javaClass.setName(name); javaClass.extendSuperType("ComponentConfigurationPropertiesCommon"); javaClass.addImport("org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon"); // add bogus field for enabled so spring boot tooling can get the // javadoc as description in its metadata Property bogus = javaClass.addProperty("java.lang.Boolean", "enabled"); String scheme = overrideComponentName != null ? overrideComponentName : model.getScheme(); bogus.getField().getJavaDoc().setText("Whether to enable auto configuration of the " + scheme + " component. This is enabled by default."); bogus.removeAccessor(); bogus.removeMutator(); String doc = "Generated by camel-package-maven-plugin - do not edit this file!"; if (!Strings.isNullOrEmpty(model.getDescription())) { doc = model.getDescription() + "\n\n" + doc; } javaClass.getJavaDoc().setText(doc); String prefix = "camel.component." + (overrideComponentName != null ? overrideComponentName : model.getScheme()); // make sure prefix is in lower case prefix = prefix.toLowerCase(Locale.US); javaClass.addAnnotation(Generated.class.getName()).setStringValue("value", SpringBootAutoConfigurationMojo.class.getName()); javaClass.addAnnotation("org.springframework.boot.context.properties.ConfigurationProperties").setStringValue("prefix", prefix); for (ComponentOptionModel option : model.getComponentOptions()) { if (skipComponentOption(model, option)) { // some component options should be skipped continue; } String type = option.getJavaType(); // generate inner class for non-primitive options type = getSimpleJavaType(type); // spring-boot auto configuration does not support complex types // (unless they are enum, nested) // and if so then we should use a String type so spring-boot and its // tooling support that // as Camel will be able to convert the string value into a lookup // of the bean in the registry anyway // and therefore there is no problem, eg // camel.component.jdbc.data-source = myDataSource // where the type would have been javax.sql.DataSource boolean complex = isComplexType(option) && isBlank(option.getEnums()); if (complex) { // force to use a string type type = "java.lang.String"; } Property prop = javaClass.addProperty(type, option.getName()); if (option.isDeprecated()) { prop.getField().addAnnotation(Deprecated.class); prop.getAccessor().addAnnotation(Deprecated.class); prop.getMutator().addAnnotation(Deprecated.class); // DeprecatedConfigurationProperty must be on getter when deprecated prop.getAccessor().addAnnotation(DeprecatedConfigurationProperty.class); } if (!Strings.isNullOrEmpty(option.getDescription())) { String desc = option.getDescription(); if (complex) { if (!desc.endsWith(".")) { desc = desc + "."; } desc = desc + " The option is a " + option.getJavaType() + " type."; } prop.getField().getJavaDoc().setFullText(desc); } if (!isBlank(option.getDefaultValue())) { if ("java.lang.String".equals(option.getJavaType()) || "duration".equals(option.getType())) { prop.getField().setStringInitializer(option.getDefaultValue().toString()); } else if ("long".equals(option.getJavaType()) || "java.lang.Long".equals(option.getJavaType())) { // the value should be a Long number String value = option.getDefaultValue() + "L"; prop.getField().setLiteralInitializer(value); } else if ("integer".equals(option.getType()) || "java.lang.Integer".equals(option.getJavaType()) || "boolean".equals(option.getType()) || "java.lang.Boolean".equals(option.getJavaType())) { prop.getField().setLiteralInitializer(option.getDefaultValue().toString()); } else if (!isBlank(option.getEnums())) { String enumShortName = type.substring(type.lastIndexOf(".") + 1); prop.getField().setLiteralInitializer(enumShortName + "." + option.getDefaultValue()); javaClass.addImport(model.getJavaType()); } } } String fileName = packageName.replaceAll("\\.", "\\/") + "/" + name + ".java"; writeSourceIfChanged(javaClass, fileName, true); }
Example #19
Source File: RabbitProperties.java From summerframework with Apache License 2.0 | 4 votes |
@DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.transaction-size") @Deprecated public Integer getTransactionSize() { return getSimple().getTransactionSize(); }
Example #20
Source File: RabbitProperties.java From summerframework with Apache License 2.0 | 4 votes |
@DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.retry") @Deprecated public ListenerRetry getRetry() { return getSimple().getRetry(); }
Example #21
Source File: RabbitProperties.java From summerframework with Apache License 2.0 | 4 votes |
@DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.prefetch") @Deprecated public Integer getPrefetch() { return getSimple().getPrefetch(); }
Example #22
Source File: RabbitProperties.java From summerframework with Apache License 2.0 | 4 votes |
@DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.max-concurrency") @Deprecated public Integer getMaxConcurrency() { return getSimple().getMaxConcurrency(); }
Example #23
Source File: RabbitProperties.java From summerframework with Apache License 2.0 | 4 votes |
@DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.idle-event-interval") @Deprecated public Long getIdleEventInterval() { return getSimple().getIdleEventInterval(); }
Example #24
Source File: RabbitProperties.java From summerframework with Apache License 2.0 | 4 votes |
@DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.default-requeue-rejected") @Deprecated public Boolean getDefaultRequeueRejected() { return getSimple().getDefaultRequeueRejected(); }
Example #25
Source File: RabbitProperties.java From summerframework with Apache License 2.0 | 4 votes |
@DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.concurrency") @Deprecated public Integer getConcurrency() { return getSimple().getConcurrency(); }
Example #26
Source File: RabbitProperties.java From summerframework with Apache License 2.0 | 4 votes |
@DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.acknowledge-mode") @Deprecated public AcknowledgeMode getAcknowledgeMode() { return getSimple().getAcknowledgeMode(); }
Example #27
Source File: RestComponentConfiguration.java From camel-spring-boot with Apache License 2.0 | 4 votes |
@Deprecated @DeprecatedConfigurationProperty public String getComponentName() { return componentName; }
Example #28
Source File: ConsulComponentConfiguration.java From camel-spring-boot with Apache License 2.0 | 4 votes |
@Deprecated @DeprecatedConfigurationProperty public String getWriteTimeoutMillis() { return writeTimeoutMillis; }
Example #29
Source File: ConsulComponentConfiguration.java From camel-spring-boot with Apache License 2.0 | 4 votes |
@Deprecated @DeprecatedConfigurationProperty public Long getReadTimeoutMillis() { return readTimeoutMillis; }
Example #30
Source File: ConsulComponentConfiguration.java From camel-spring-boot with Apache License 2.0 | 4 votes |
@Deprecated @DeprecatedConfigurationProperty public Long getConnectTimeoutMillis() { return connectTimeoutMillis; }