Issue on deployment
cooligc opened this issue · comments
Hey
Here Here is the stack trace , that I am getting while I am trying to use thymeleaf engine.
Can anybody help me on this ?
APPLICATION FAILED TO START
Description:
Field javaMailService in com.skc.core.communication.email.SampleEmailServiceImpl required a bean of type 'org.springframework.mail.javamail.JavaMailSender' that could not be found.
- Bean method 'mailSender' not loaded because AnyNestedCondition 0 matched 2 did not; NestedCondition on MailSenderAutoConfiguration.MailSenderCondition.JndiNameProperty @ConditionalOnProperty (spring.mail.jndi-name) did not find property 'jndi-name'; NestedCondition on MailSenderAutoConfiguration.MailSenderCondition.HostProperty @ConditionalOnProperty (spring.mail.host) did not find property 'host'
Action:
Consider revisiting the conditions above or defining a bean of type 'org.springframework.mail.javamail.JavaMailSender' in your configuration.
The issue is due to the properties file. Some how, the sub-module properties file was not been read by the parent module. Once , I have put the properties on the parent module, It got fixed.
Hey @cooligc, waking up and reading about a self-solved issue is the best way to start the day!
Anyway, generally speaking, one must supply the properties file in his/hers main application ignoring those that I wrote for the integration tests, which will never be loaded by the main application.