|
|
@ -10,11 +10,15 @@ import entgra.mailsender.exception.MailProcessingException;
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
|
|
|
|
import javax.sql.DataSource;
|
|
|
|
import javax.sql.DataSource;
|
|
|
|
import java.io.File;
|
|
|
|
import java.io.*;
|
|
|
|
import java.io.FileOutputStream;
|
|
|
|
import java.sql.Connection;
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.sql.DriverManager;
|
|
|
|
import java.io.InputStream;
|
|
|
|
import java.sql.PreparedStatement;
|
|
|
|
import java.sql.*;
|
|
|
|
import java.sql.SQLException;
|
|
|
|
|
|
|
|
import java.sql.Timestamp;
|
|
|
|
|
|
|
|
import java.sql.ResultSet;
|
|
|
|
|
|
|
|
import java.sql.Blob;
|
|
|
|
|
|
|
|
import java.sql.Date;
|
|
|
|
import java.time.LocalDate;
|
|
|
|
import java.time.LocalDate;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
@ -31,6 +35,10 @@ public class MailDAOImpl implements MailDAO {
|
|
|
|
this.dataSource = dataSource;
|
|
|
|
this.dataSource = dataSource;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// private Connection getConnection() throws SQLException {
|
|
|
|
|
|
|
|
// return DriverManager.getConnection("jdbc:mysql://localhost:3306/email_sending", "root", "StrongPassword123!");
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public int addMail(MailModel mailModel) throws SQLException {
|
|
|
|
public int addMail(MailModel mailModel) throws SQLException {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|