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 閱讀(477) 評論(0)  編輯  收藏 所屬分類: JASYPT


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


          網站導航:
           
          主站蜘蛛池模板: 光泽县| 襄汾县| 盐池县| 青冈县| 禄劝| 浪卡子县| 弥渡县| 固原市| 富宁县| 闸北区| 杭州市| 博兴县| 洮南市| 安岳县| 乾安县| 长垣县| 沁源县| 化州市| 柳河县| 宜阳县| 安国市| 吴江市| 平邑县| 辉县市| 沭阳县| 北安市| 侯马市| 道真| 库尔勒市| 彰化市| 岚皋县| 澄迈县| 乐陵市| 罗平县| 平潭县| 若尔盖县| 阜南县| 准格尔旗| 工布江达县| 砚山县| 南郑县|