Замена логера
This commit is contained in:
parent
898e90221a
commit
19f7e4bb71
10
pom.xml
10
pom.xml
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>org.sadtech.autoresponder</groupId>
|
<groupId>org.sadtech.autoresponder</groupId>
|
||||||
<artifactId>autoresponder</artifactId>
|
<artifactId>autoresponder</artifactId>
|
||||||
<version>1.5.0-RELEASE</version>
|
<version>1.5.1-SNAPSHOT</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
@ -23,14 +23,14 @@
|
|||||||
</build>
|
</build>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<log4j>1.2.17</log4j>
|
<slf4j.ver>1.7.26</slf4j.ver>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>log4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>log4j</artifactId>
|
<artifactId>slf4j-api</artifactId>
|
||||||
<version>${log4j}</version>
|
<version>${slf4j.ver}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
package org.sadtech.autoresponder;
|
package org.sadtech.autoresponder;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
|
||||||
import org.sadtech.autoresponder.compare.UnitPriorityComparator;
|
import org.sadtech.autoresponder.compare.UnitPriorityComparator;
|
||||||
import org.sadtech.autoresponder.entity.UnitPointer;
|
|
||||||
import org.sadtech.autoresponder.entity.Unit;
|
import org.sadtech.autoresponder.entity.Unit;
|
||||||
|
import org.sadtech.autoresponder.entity.UnitPointer;
|
||||||
import org.sadtech.autoresponder.service.UnitPointerService;
|
import org.sadtech.autoresponder.service.UnitPointerService;
|
||||||
import org.sadtech.autoresponder.util.Parser;
|
import org.sadtech.autoresponder.util.Parser;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
@ -15,7 +16,7 @@ import java.util.regex.Pattern;
|
|||||||
|
|
||||||
public class Autoresponder {
|
public class Autoresponder {
|
||||||
|
|
||||||
private static final Logger log = Logger.getLogger(Autoresponder.class);
|
private static final Logger log = LoggerFactory.getLogger(Autoresponder.class);
|
||||||
|
|
||||||
private Set<Unit> menuUnits;
|
private Set<Unit> menuUnits;
|
||||||
private UnitPointerService unitPointerService;
|
private UnitPointerService unitPointerService;
|
||||||
|
@ -9,21 +9,16 @@ public abstract class Unit {
|
|||||||
|
|
||||||
private Set<String> keyWords;
|
private Set<String> keyWords;
|
||||||
private Pattern pattern;
|
private Pattern pattern;
|
||||||
private Integer matchThreshold;
|
private Integer matchThreshold = 10;
|
||||||
private Integer priority;
|
private Integer priority = 10;
|
||||||
private Set<Unit> nextUnits;
|
private Set<Unit> nextUnits;
|
||||||
|
|
||||||
public Unit() {
|
public Unit() {
|
||||||
priority = 10;
|
|
||||||
matchThreshold = 10;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Unit(Set<String> keyWords, Pattern pattern, Integer matchThreshold, Integer priority, Set<Unit> nextUnits) {
|
public Unit(Unit... nextUnit) {
|
||||||
this.keyWords = keyWords;
|
nextUnits = new HashSet(nextUnits);
|
||||||
this.pattern = pattern;
|
|
||||||
this.matchThreshold = matchThreshold;
|
|
||||||
this.priority = priority;
|
|
||||||
this.nextUnits = nextUnits;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setKeyWord(String keyWord) {
|
public void setKeyWord(String keyWord) {
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
package org.sadtech.autoresponder.service;
|
package org.sadtech.autoresponder.service;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
|
||||||
import org.sadtech.autoresponder.entity.UnitPointer;
|
import org.sadtech.autoresponder.entity.UnitPointer;
|
||||||
import org.sadtech.autoresponder.repository.UnitPointerRepository;
|
import org.sadtech.autoresponder.repository.UnitPointerRepository;
|
||||||
import org.sadtech.autoresponder.repository.UnitPointerRepositoryMap;
|
import org.sadtech.autoresponder.repository.UnitPointerRepositoryMap;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class UnitPointerServiceImpl implements UnitPointerService {
|
public class UnitPointerServiceImpl implements UnitPointerService {
|
||||||
|
|
||||||
private static final Logger log = Logger.getLogger(UnitPointerServiceImpl.class);
|
private static final Logger log = LoggerFactory.getLogger(UnitPointerServiceImpl.class);
|
||||||
|
|
||||||
private UnitPointerRepository unitPointerRepository;
|
private UnitPointerRepository unitPointerRepository;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user