title: "java.lang.NoClassDefFoundError: org/springframework/core/type/AnnotatedTypeMetadata"
body: <pre><code>@Bean
      public JavaMailSender mailSender() {
          JavaMailSenderImpl mailSender = new JavaMailSenderImpl();
          mailSender.setDefaultEncoding("UTF-8");
          mailSender.setHost("smtp.googlemail.com");
          mailSender.setPort(465);
          mailSender.setUsername("XXXXXXXXX@gmail.com");
          mailSender.setPassword("XXXXXXXXXXXXXXX");
          Properties properties = new Properties();
          properties.put("mail.smtp.auth", true);
          properties.put("mail.smtp.starttls.enable", true);
          mailSender.setJavaMailProperties(properties);
          return mailSender;
      }
  </code></pre>
  
  <p>I am trying to send mail using javamailsender for that i configured the above code using annotations after that I get the "<code>java.lang.NoClassDefFoundError: org/springframework/core/type/AnnotatedTypeMetadata</code>" exception any suggestions appriciate.</p>