All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ulisesbocchio.jasyptspringboot.annotation.EncryptablePropertySource Maven / Gradle / Ivy

There is a newer version: 3.0.5
Show newest version
package com.ulisesbocchio.jasyptspringboot.annotation;

import com.ulisesbocchio.jasyptspringboot.configuration.EncryptablePropertySourceConfiguration;
import org.springframework.context.annotation.Import;

import java.lang.annotation.*;

/**
 * Encryptable version of Spring {@link org.springframework.context.annotation.PropertySource}
 *
 * @author Ulises Bocchio
 * @see org.springframework.context.annotation.PropertySource
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Repeatable(EncryptablePropertySources.class)
@Import(EncryptablePropertySourceConfiguration.class)
public @interface EncryptablePropertySource {
    /**
     * Indicate the name of this property source. If omitted, a name
     * will be generated based on the description of the underlying
     * resource.
     *
     * @see org.springframework.core.env.PropertySource#getName()
     * @see org.springframework.core.io.Resource#getDescription()
     */
    String name() default "";

    /**
     * Indicate the resource location(s) of the properties file to be loaded.
     * For example, {@code "classpath:/com/myco/app.properties"} or
     * {@code "file:/path/to/file"}.
     * 

Resource location wildcards (e.g. **/*.properties) are not permitted; each * location must evaluate to exactly one {@code .properties} resource. *

${...} placeholders will be resolved against any/all property sources already * registered with the {@code Environment}. See {@linkplain EncryptablePropertySource above} for * examples. *

Each location will be added to the enclosing {@code Environment} as its own * property source, and in the order declared. */ String[] value(); /** * Indicate if failure to find the a {@link #value() property resource} should be * ignored. *

{@code true} is appropriate if the properties file is completely optional. * Default is {@code false}. */ boolean ignoreResourceNotFound() default false; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy