- jasypt encrypt/decrypt
- runtime.properties
Key | Required | Default Value |
---|---|---|
jasypt.encryptor.password | True | - |
jasypt.encryptor.algorithm | False | PBEWITHHMACSHA512ANDAES_256 |
jasypt.encryptor.key-obtention-iterations | False | 1000 |
jasypt.encryptor.pool-size | False | 1 |
jasypt.encryptor.provider-name | False | SunJCE |
jasypt.encryptor.provider-class-name | False | null |
jasypt.encryptor.salt-generator-classname | False | org.jasypt.salt.RandomSaltGenerator |
jasypt.encryptor.iv-generator-classname | False | org.jasypt.iv.RandomIvGenerator |
jasypt.encryptor.string-output-type | False | base64 |
jasypt.encryptor.proxy-property-sources | False | false |
jasypt.encryptor.skip-property-sources | False | empty list |
- EncryptablePropertyResolverConfiguration
- injection jasypt bean
- DefaultPropertyResolver#resolvePropertyValue
- convert encrypted property -> decrypt
- DefaultPropertyDetector#isEncrypted
- prefix, suffix
- ApplicationContextInitializer
- EnvironmentPostProcessor
## META-INF/spring.factories
# ApplicationContextInitializer
org.springframework.context.ApplicationContextInitializer=\
com.gmoon.core.config.DecryptEnvironmentInitializer
# Environment Post Processors
org.springframework.boot.env.EnvironmentPostProcessor=\
com.gmoon.core.config.CustomEnvironmentPostProcessor
- Default properties (specified by setting SpringApplication.setDefaultProperties).
@PropertySource
annotations on your@Configuration
classes. Please note that such property sources are not added to the Environment until the application context is being refreshed. This is too late to configure certain properties such aslogging.*
andspring.main.*
which are read before refresh begins.- Config data (such as
application.properties
files). - A
RandomValuePropertySource
that has properties only inrandom.*.
- OS environment variables.
- Java System properties (
System.getProperties()
). - JNDI attributes from
java:comp/env
. ServletContext
init parameters.ServletConfig
init parameters.- Properties from
SPRING_APPLICATION_JSON
(inline JSON embedded in an environment variable or system property). - Command line arguments.
properties
attribute on your tests. Available on@SpringBootTest
and thetest annotations for testing a particular slice of your application
.@TestPropertySource
annotations on your tests.Devtools global settings properties
in the $HOME/.config/spring-boot directory when devtools is active.
Application properties
packaged inside your jar (application.properties and YAML variants).Profile-specific application
properties packaged inside your jar (application-{profile}.properties and YAML variants).Application properties
outside of your packaged jar (application.properties and YAML variants).Profile-specific application properties
outside of your packaged jar (application-{profile}.properties and YAML variants).
- Spring boot - Using @Value
- Spring boot - External Config
- Spring boot - Using the @SpringBootApplication Annotation
- baeldung - Spring boot jasypt
- baeldung - Properties with Spring and Spring Boot
- baeldung - EnvironmentPostProcessor in Spring Boot
- stackoverflow - How can I change a property in spring environment?
- kingbbode - Spring Boot 와 Properties(or Yaml) Environment