paulwong

          SPRING 中YAML文件密碼不以明文保存

          Update: for production environment, to avoid exposing the password in the command line, since you can query the processes with ps, previous commands with history, etc etc. You could:

          • Create a script like this: touch setEnv.sh
          • Edit setEnv.sh to export the JASYPT_ENCRYPTOR_PASSWORD variable

            #!/bin/bash

            export JASYPT_ENCRYPTOR_PASSWORD=supersecretz

          • Execute the file with . setEnv.sh
          • Run the app in background with mvn spring-boot:run &
          • Delete the file setEnv.sh
          • Unset the previous environment variable with: unset JASYPT_ENCRYPTOR_PASSWORD

          https://stackoverflow.com/questions/37404703/spring-boot-how-to-hide-passwords-in-properties-file

          posted on 2020-10-20 14:59 paulwong 閱讀(471) 評論(0)  編輯  收藏 所屬分類: JASYPT


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 安阳市| 永泰县| 温宿县| 桂平市| 札达县| 河源市| 乌拉特中旗| 沭阳县| 九龙坡区| 五常市| 伊宁市| 龙门县| 吉林省| 郁南县| 民勤县| 互助| 绥棱县| 徐汇区| 和田市| 巴里| 通道| 尼玛县| 湛江市| 大洼县| 通渭县| 来宾市| 沁阳市| 侯马市| 札达县| 灵璧县| 临泽县| 信丰县| 凤翔县| 土默特左旗| 博湖县| 廊坊市| 夏津县| 宜宾市| 丰原市| 孝义市| 曲阳县|