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) 評(píng)論(0)  編輯  收藏 所屬分類: JASYPT


          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 南靖县| 平武县| 司法| 通化县| 建水县| 济南市| 福贡县| 乌拉特中旗| 凌源市| 泰和县| 安龙县| 孟津县| 温泉县| 长汀县| 呼玛县| 宿迁市| 阳曲县| 翁牛特旗| 保定市| 锦州市| 长治县| 白银市| 合水县| 惠来县| 吉安市| 镇巴县| 鄢陵县| 阜平县| 华亭县| 仙游县| 日土县| 监利县| 屏东市| 江油市| 大厂| 融水| 长阳| 河北区| 芮城县| 来宾市| 增城市|