使用三大框架发送邮件,初始化bean时报java.lang.NoClassDefFoundError: javax/mail/MessagingException 5
依赖注入,初始化bean时报错配置文件:<beanid="mailSender"class="org.springframework.mail.javamail.Java...
依赖注入,初始化bean时报错
配置文件: <bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
<property name="host" value="smtp.163.com" />
<property name="port" value="25" />
<property name="username" value="xxx" />
<property name="password" value="xx" />
<property name="javaMailProperties">
<props>
<prop key="mail.smtp.auth">true</prop>
</props>
</property>
</bean>
</beans> 展开
配置文件: <bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
<property name="host" value="smtp.163.com" />
<property name="port" value="25" />
<property name="username" value="xxx" />
<property name="password" value="xx" />
<property name="javaMailProperties">
<props>
<prop key="mail.smtp.auth">true</prop>
</props>
</property>
</bean>
</beans> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询