I have a question how to inject values into implemented by spring class I don't want use xml to define that values like in this piece
<bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl"> <property name="host" value="your.smtphost.com"/> <property name="port" value="25"/> <property name="username" value="yourusername"/> <property name="password" value="yourpassword"/> <property name="javaMailProperties"> <props> <!-- Use SMTP-AUTH to authenticate to SMTP server --> <prop key="mail.smtp.auth">true</prop> <!-- Use TLS to encrypt communication with SMTP server --> <prop key="mail.smtp.starttls.enable">true</prop> </props> </property> I would like to do it by annotation. I know there is method to extend that class but maybe there is another?