Skip to content
Advertisement

Spring boot Build issue

**Custom configuration for mail sender **

JavaScript

here I am trying to fetch the password from the database but the problem is while building the app it calls the repository which leads to failure as IP whitelisting issue it is getting error: unable to acquire JDBC connection.

How to stop these repo calls while building the app

Advertisement

Answer

You can use @Lazy annotation at the Configuration level. So that the beans will be created at runtime when requested for First-time.

JavaScript

Reference: https://www.baeldung.com/spring-lazy-annotation

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement