Добавлено логирование
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package ru.serega6531.packmate.service;
|
package ru.serega6531.packmate.service;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import ru.serega6531.packmate.model.Pattern;
|
import ru.serega6531.packmate.model.Pattern;
|
||||||
@@ -8,6 +9,7 @@ import ru.serega6531.packmate.repository.PatternRepository;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class PatternService {
|
public class PatternService {
|
||||||
|
|
||||||
private final PatternRepository repository;
|
private final PatternRepository repository;
|
||||||
@@ -25,8 +27,9 @@ public class PatternService {
|
|||||||
repository.deleteById(id);
|
repository.deleteById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Pattern save(Pattern service) {
|
public Pattern save(Pattern pattern) {
|
||||||
return repository.save(service);
|
log.info("Добавлен новый паттерн {} со значением {}", pattern.getName(), pattern.getValue());
|
||||||
|
return repository.save(pattern);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package ru.serega6531.packmate.service;
|
package ru.serega6531.packmate.service;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import ru.serega6531.packmate.model.CtfService;
|
import ru.serega6531.packmate.model.CtfService;
|
||||||
@@ -8,6 +9,7 @@ import ru.serega6531.packmate.repository.ServiceRepository;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class ServicesService {
|
public class ServicesService {
|
||||||
|
|
||||||
private final ServiceRepository repository;
|
private final ServiceRepository repository;
|
||||||
@@ -26,6 +28,7 @@ public class ServicesService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public CtfService save(CtfService service) {
|
public CtfService save(CtfService service) {
|
||||||
|
log.info("Добавлен новый сервис {} на порту {}", service.getName(), service.getPort());
|
||||||
return repository.save(service);
|
return repository.save(service);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user