я иметь ширину проблема этот код:Установить путь ресурсов класса
final Map<String, File> attachments = new HashMap<>();
\t \t final Map<String, String> inlineResources = new HashMap<String, String>();
\t \t inlineResources.put("logo", "/res/img/IN_payoff.png");
\t \t for (File certificateFile : certificates) {
\t \t \t attachments.put(certificateFile.getName(), certificateFile);
\t \t }
\t \t YadaEmailParam p = new YadaEmailParam();
\t \t
\t \t p.inlineResources = inlineResources;
\t \t yadaEmailService.sendHtmlEmail(p);
\t }
Эта ошибка:
org.springframework.mail.MailSendException: Failed messages: javax.mail.MessagingException: IOException while sending message;
nested exception is:
\t java.io.FileNotFoundException: class path resource [res/img/IN_payoff.png] cannot be opened because it does not exist
Как я могу установить путь к классу?
Нет это не проект Maven. Его проект Java от GitLab. Этот html-файл является шаблоном электронной почты в src/main/resources, img находится в src/res/img –