Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit 81f7369

Browse files
committed
代码整理
1 parent c21fa1c commit 81f7369

File tree

3 files changed

+12
-45
lines changed

3 files changed

+12
-45
lines changed

pom.xml

Lines changed: 3 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,17 @@
55
<parent>
66
<groupId>com.surenpi.autotest</groupId>
77
<artifactId>autotest.parent</artifactId>
8-
<version>1.0.0-20170504</version>
8+
<version>1.0.1-20170618</version>
99
</parent>
1010

1111
<artifactId>autotest.web.framework</artifactId>
12-
<version>1.0.3-20170610</version>
12+
<version>1.0.4-20170618</version>
1313

1414
<name>phoenix.webui.framework</name>
1515
<url>https://github.com/LinuxSuRen/phoenix.webui.framework</url>
1616
<description>WebUI自动化测试框架</description>
1717

1818
<properties>
19-
<selenium.version>3.3.1</selenium.version>
20-
<spring.version>4.3.7.RELEASE</spring.version>
21-
<aspectj.version>1.8.7</aspectj.version>
22-
<groovy.version>2.4.4</groovy.version>
2319
<testSkip>true</testSkip>
2420
</properties>
2521

@@ -125,57 +121,47 @@
125121
<dependency>
126122
<groupId>org.seleniumhq.selenium</groupId>
127123
<artifactId>selenium-java</artifactId>
128-
<version>${selenium.version}</version>
129124
</dependency>
130125
<dependency>
131126
<groupId>org.seleniumhq.selenium</groupId>
132127
<artifactId>selenium-support</artifactId>
133-
<version>${selenium.version}</version>
134128
</dependency>
135129
<dependency>
136130
<groupId>org.seleniumhq.selenium</groupId>
137131
<artifactId>selenium-remote-driver</artifactId>
138-
<version>${selenium.version}</version>
139132
</dependency>
140133

141134
<!-- xml解析 -->
142135
<dependency>
143136
<groupId>xml-apis</groupId>
144137
<artifactId>xml-apis</artifactId>
145-
<version>1.4.01</version>
146138
</dependency>
147139

148140
<dependency>
149141
<groupId>javax.annotation</groupId>
150142
<artifactId>javax.annotation-api</artifactId>
151-
<version>1.2</version>
152143
</dependency>
153144
<dependency>
154145
<groupId>dom4j</groupId>
155146
<artifactId>dom4j</artifactId>
156-
<version>1.6.1</version>
157147
</dependency>
158148
<dependency>
159149
<groupId>jaxen</groupId>
160150
<artifactId>jaxen</artifactId>
161-
<version>1.1.6</version>
162151
</dependency>
163152
<dependency>
164153
<groupId>org.apache.ws.xmlschema</groupId>
165154
<artifactId>xmlschema-core</artifactId>
166-
<version>2.1.0</version>
167155
</dependency>
168156

169157
<!-- excel -->
170158
<dependency>
171159
<groupId>org.apache.poi</groupId>
172160
<artifactId>poi</artifactId>
173-
<version>3.10.1</version>
174161
</dependency>
175162
<dependency>
176163
<groupId>org.apache.poi</groupId>
177164
<artifactId>poi-ooxml</artifactId>
178-
<version>3.10-FINAL</version>
179165
</dependency>
180166

181167
<!-- spring -->
@@ -199,17 +185,12 @@
199185
<dependency>
200186
<groupId>org.aspectj</groupId>
201187
<artifactId>aspectjrt</artifactId>
202-
<version>${aspectj.version}</version>
203188
</dependency>
204189
<dependency>
205190
<groupId>org.aspectj</groupId>
206191
<artifactId>aspectjweaver</artifactId>
207-
<version>${aspectj.version}</version>
208192
</dependency>
209193

210-
<!-- logging -->
211-
<!-- <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId>
212-
<version>1.7.21</version> </dependency> -->
213194
<dependency>
214195
<groupId>ch.qos.logback</groupId>
215196
<artifactId>logback-classic</artifactId>
@@ -227,12 +208,10 @@
227208
<dependency>
228209
<groupId>org.codehaus.groovy</groupId>
229210
<artifactId>groovy</artifactId>
230-
<version>${groovy.version}</version>
231211
</dependency>
232212
<dependency>
233213
<groupId>org.codehaus.groovy</groupId>
234214
<artifactId>groovy-jsr223</artifactId>
235-
<version>${groovy.version}</version>
236215
</dependency>
237216

238217
<!-- 源码编译 -->
@@ -260,41 +239,25 @@
260239
</exclusions>
261240
</dependency>
262241

263-
<!-- <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId>
264-
<version>19.0</version> </dependency> -->
265-
266242
<!-- 模板引擎 -->
267243
<dependency>
268244
<groupId>org.freemarker</groupId>
269245
<artifactId>freemarker</artifactId>
270-
<version>2.3.20</version>
271246
</dependency>
272247

273-
<!-- 工具类 <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId>
274-
<version>3.4</version> </dependency> -->
275-
276248
<dependency>
277249
<groupId>commons-codec</groupId>
278250
<artifactId>commons-codec</artifactId>
279-
<version>1.10</version>
280251
</dependency>
281252

282253
<dependency>
283254
<groupId>org.yaml</groupId>
284255
<artifactId>snakeyaml</artifactId>
285-
<version>1.5</version>
286-
</dependency>
287-
288-
<dependency>
289-
<groupId>org.projectlombok</groupId>
290-
<artifactId>lombok</artifactId>
291-
<version>1.16.16</version>
292-
<scope>test</scope>
293256
</dependency>
257+
294258
<dependency>
295259
<groupId>javax.mail</groupId>
296260
<artifactId>mail</artifactId>
297-
<version>1.4.7</version>
298261
</dependency>
299262
</dependencies>
300263

src/main/java/org/suren/autotest/web/framework/AutoApplicationConfig.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ public class AutoApplicationConfig
4343
private String mailUserName;
4444
@Value("${mail.password}")
4545
private String mailPassword;
46+
@Value("${mail.protocol}")
47+
private String mailProtocol;
48+
@Value("${mail.port}")
49+
private int mailPort;
4650

4751
@Bean(autowire = Autowire.BY_TYPE)
4852
public MailSender mailBean()
@@ -51,6 +55,8 @@ public MailSender mailBean()
5155
mailSender.setHost(mailHost);
5256
mailSender.setUsername(mailUserName);
5357
mailSender.setPassword(mailPassword);
58+
mailSender.setProtocol(mailProtocol);
59+
mailSender.setPort(mailPort);
5460
setUpMailPro(mailSender);
5561

5662
return mailSender;

src/test/java/org/suren/autotest/web/framework/mail/MailTest.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,26 +47,24 @@ public class MailTest
4747
private MailSender mailSender;
4848

4949
@Test
50-
@Ignore
5150
public void simpleMail()
5251
{
5352
SimpleMailMessage msg = new SimpleMailMessage();
54-
msg.setFrom("361981269@qq.com");
53+
msg.setFrom("zxjlwt@139.com");
5554
msg.setTo("[email protected]");
5655
msg.setText("context");
5756
msg.setSubject("subject");
5857
mailSender.send(msg);
5958
}
6059

6160
@Test
62-
@Ignore
6361
public void mimeMail() throws MessagingException
6462
{
6563
MimeMessage msg = ((JavaMailSenderImpl) mailSender).createMimeMessage();
6664
MimeMessageHelper mail = new MimeMessageHelper(msg, true);
67-
mail.addAttachment("attach_for_test",
65+
mail.addAttachment("attach_for_test.txt",
6866
new ByteArrayResource("attach_for_test".getBytes()));
69-
mail.setFrom("361981269@qq.com");
67+
mail.setFrom("zxjlwt@139.com");
7068
mail.setTo("[email protected]");
7169
mail.setText("context");
7270
mail.setSubject("subject");

0 commit comments

Comments
 (0)