Although the afterProperties() method helps us with the initialization of properties based on some logic, the code gets strongly coupled with the Spring API. To overcome this drawback, there is a way to initialize the bean using the custom initialization method. If the developer has written a custom init method, and configured it for the bean in the bean configuration as an init-method attribute, it will get called by the container.