Skip to content

Commit a3bee0b

Browse files
committed
优化配置
1 parent 785e89b commit a3bee0b

File tree

5 files changed

+3
-114
lines changed

5 files changed

+3
-114
lines changed

hsweb-web-bean/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
<dependency>
1616
<groupId>org.hibernate</groupId>
1717
<artifactId>hibernate-validator</artifactId>
18-
<optional>true</optional>
1918
</dependency>
2019
<dependency>
2120
<groupId>org.hsweb</groupId>

hsweb-web-service/hsweb-web-service-simple/pom.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@
1919
<scope>test</scope>
2020
</dependency>
2121

22-
<dependency>
23-
<groupId>org.hibernate</groupId>
24-
<artifactId>hibernate-validator</artifactId>
25-
<optional>true</optional>
26-
</dependency>
27-
2822
<dependency>
2923
<groupId>org.quartz-scheduler</groupId>
3024
<artifactId>quartz</artifactId>

hsweb-web-service/hsweb-web-service-simple/src/main/java/org/hsweb/web/service/impl/HibernateValidatorAutoConfiguration.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,12 @@
88
import javax.validation.Validator;
99
import javax.validation.ValidatorFactory;
1010

11-
/**
12-
* Created by zhouhao on 16-4-25.
13-
*/
1411
@Configuration
15-
@ConditionalOnMissingBean(Validator.class)
1612
public class HibernateValidatorAutoConfiguration {
1713

18-
@Bean
19-
public Validator getHibernateValidator() {
14+
@Bean(name = "validator")
15+
@ConditionalOnMissingBean(Validator.class)
16+
public Validator validator() {
2017
ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
2118
Validator validator = factory.getValidator();
2219
return validator;

hsweb-web-service/hsweb-web-service-simple/src/test/java/org/hsweb/web/service/impl/quartz/QuartzTests.java

Lines changed: 0 additions & 68 deletions
This file was deleted.

hsweb-web-service/hsweb-web-service-simple/src/test/java/org/hsweb/web/service/impl/quartz/TestJob.java

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)