- 참고1: 데모에
local
Profile을 설정한 이유Jasypt 암복호화를 통한 환경변수 대체는 개발자 작업 환경에만 사용을 권하기 때문에 예시도 로컬 프로파일 적용을 전제로 구현합니다.
- 참고2: Jasypt Key를 공개하지 마십시오.
예제 외에는 Jasypt 키를 레포지터리로 공유하면 안 되며, Jasypt 키를 선택할 때는 예제에서 공개한 Jasypt 키를 제외해야 합니다.
이 프로젝트는 로컬 환경변수 사용을 대신하기 위하여 Jasypt 암복호화를 사용합니다.
This project uses Jasypt encryption to replace local environment variables.
-
Do not share your
JASYPT_KEY
.- This project should show an example of using jasypt encryption and decryption. So I provide the key in public.
- If your project doesn't have the same purpose to show an example using the key,
JASYPT_KEY
must be private.
-
Jasypt does not upgrade the security of your project over using environment variables directly.
- What JASYPT encryption provides is ease of development, productivity, and reduced communication costs, while maintaining sufficient security.
- Some sensitive information is still better provided via environment variables.
Add local
to the active profiles. Include this option in the VM options:
-Dspring.profiles.active=local
Your IDE will provide easy way to include it.
- If you are using the Intellij Ultimate edition, find the active profiles in the run/debug configurations window and enter
local
in "Active profiles". - If you are using the Intellij Community edition, find the VM options in the run/debug configurations window and enter
-Dspring.profiles.active=local
.
If running as jar
with the option, see this example:
java -Dspring.profiles.active=local -jar Example.jar