To pass in Infisical secrets into your application, we will utilize the Infisical CLI to inject the secrets into the Maven wrapper executable, which is used to launch your application.
The Maven wrapper executable should already be present in the root directory of your project.
During the process of debugging your code, it may be necessary to have certain environment variables available. To inject these variables for the purpose of debugging, please follow the instructions provided below.
Note that these instructions are currently only available for IntelliJ.Step 1: On the main tool bar, choose Edit ConfigurationStep 2: Click the plus iconStep 3: Select Shell ScriptStep 4: Choose Script Text and then paste in the command below.
Copy
Ask AI
infisical run -- ./mvnw spring-boot:run -Dspring-boot.run.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=*:5005"
Step 5: When you need to run a block of code in debug mode, select the Infisical script