Updated parent in pom.xml and moved to log4j2
This commit is contained in:
parent
86deb80e71
commit
5af0f6a841
109
pom.xml
109
pom.xml
|
@ -7,17 +7,14 @@
|
|||
<version>2.0.5-SNAPSHOT</version>
|
||||
<packaging>war</packaging>
|
||||
<name>uoa-admin-tools</name>
|
||||
<!-- Use parent with artifact spring-boot-starter-parent and add plugin with artifact spring-boot-maven-plugin in order to run springboot run command-->
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>1.5.8.RELEASE</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
<groupId>eu.dnetlib</groupId>
|
||||
<artifactId>uoa-spring-boot-parent</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<timestamp>${maven.build.timestamp}</timestamp>
|
||||
<maven.build.timestamp.format>E MMM dd HH:mm:ss z yyyy</maven.build.timestamp.format>
|
||||
</properties>
|
||||
|
@ -26,77 +23,39 @@
|
|||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-mongodb</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId> org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-logging</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-security</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.17</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.8.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.mail</groupId>
|
||||
<artifactId>mail</artifactId>
|
||||
<version>1.5.0-b01</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>20030203.000550</version>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>commons-io</groupId>-->
|
||||
<!-- <artifactId>commons-io</artifactId>-->
|
||||
<!-- <version>20030203.000550</version>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency> <!-- this dependency includes dependency to uoa-authorization-library -->
|
||||
<groupId>eu.dnetlib</groupId>
|
||||
<artifactId>uoa-admin-tools-library</artifactId>
|
||||
<version>1.0.5</version>
|
||||
<version>1.0.6-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- Use parent with artifact spring-boot-starter-parent and add plugin with artifact spring-boot-maven-plugin in order to run springboot run command-->
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<!--3d answer: https://stackoverflow.com/questions/23260057/the-forked-vm-terminated-without-saying-properly-goodbye-vm-crash-or-system-exi-->
|
||||
<!--If you use openjdk there might be a problem with surfire plugin - uncomment following lines-->
|
||||
<!--<plugin>-->
|
||||
<!--<groupId>org.apache.maven.plugins</groupId>-->
|
||||
<!--<artifactId>maven-surefire-plugin</artifactId>-->
|
||||
<!--<version>2.19.1</version>-->
|
||||
<!--<configuration>-->
|
||||
<!--<!–<testFailureIgnore>true</testFailureIgnore>–>-->
|
||||
<!--<useSystemClassLoader>false</useSystemClassLoader>-->
|
||||
<!--</configuration>-->
|
||||
<!--</plugin>-->
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<mainClass>eu.dnetlib.uoaadmintools.UoaAdminToolsApplication</mainClass>
|
||||
<executable>true</executable>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
|
@ -107,27 +66,5 @@
|
|||
</plugin>
|
||||
</plugins>
|
||||
<finalName>uoa-admin-tools</finalName>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>dnet45-releases</id>
|
||||
<name>D-Net 45 Releases</name>
|
||||
<url>http://maven.research-infrastructures.eu/nexus/content/repositories/dnet45-releases</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
<layout>default</layout>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -7,7 +7,8 @@ import eu.dnetlib.uoaadmintools.configuration.GlobalVars;
|
|||
import eu.dnetlib.uoaadmintools.configuration.mongo.MongoConnection;
|
||||
import eu.dnetlib.uoaadmintools.configuration.properties.ManagersApiConfig;
|
||||
import eu.dnetlib.uoaadmintools.configuration.properties.MongoConfig;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
|
@ -23,7 +24,7 @@ import java.util.Map;
|
|||
@RestController
|
||||
@CrossOrigin(origins = "*")
|
||||
public class AdminToolsCheckDeployController {
|
||||
private final Logger log = Logger.getLogger(this.getClass());
|
||||
private final Logger log = LogManager.getLogger(this.getClass());
|
||||
|
||||
@Autowired
|
||||
private MongoConnection mongoConnection;
|
||||
|
|
|
@ -1,19 +1,18 @@
|
|||
package eu.dnetlib.uoaadmintools.controllers;
|
||||
|
||||
import eu.dnetlib.uoaadmintools.configuration.properties.BrowserCacheConfig;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.client.HttpClientErrorException;
|
||||
import org.springframework.web.client.ResourceAccessException;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/cache")
|
||||
@CrossOrigin(origins = "*")
|
||||
public class BrowserCacheController {
|
||||
private final Logger log = Logger.getLogger(this.getClass());
|
||||
private final Logger log = LogManager.getLogger(this.getClass());
|
||||
|
||||
@Autowired
|
||||
private RestTemplate restTemplate;
|
||||
|
|
|
@ -8,7 +8,8 @@ import eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException;
|
|||
import eu.dnetlib.uoaadmintoolslibrary.handlers.MismatchingContentException;
|
||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.utils.RolesUtils;
|
||||
import eu.dnetlib.uoaadmintoolslibrary.services.PortalService;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
@ -19,7 +20,7 @@ import java.util.List;
|
|||
@RequestMapping("/community")
|
||||
@CrossOrigin(origins = "*")
|
||||
public class CommunityController {
|
||||
private final Logger log = Logger.getLogger(this.getClass());
|
||||
private final Logger log = LogManager.getLogger(this.getClass());
|
||||
|
||||
@Autowired
|
||||
private RolesUtils rolesUtils;
|
||||
|
|
|
@ -7,7 +7,8 @@ import eu.dnetlib.uoaadmintoolslibrary.entities.fullEntities.PortalResponse;
|
|||
import eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException;
|
||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.MismatchingContentException;
|
||||
import eu.dnetlib.uoaadmintoolslibrary.services.PortalService;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
@ -18,7 +19,7 @@ import java.util.List;
|
|||
@RequestMapping("/connect")
|
||||
@CrossOrigin(origins = "*")
|
||||
public class ConnectController {
|
||||
private final Logger log = Logger.getLogger(this.getClass());
|
||||
private final Logger log = LogManager.getLogger(this.getClass());
|
||||
|
||||
@Autowired
|
||||
private LayoutService layoutService;
|
||||
|
|
|
@ -5,7 +5,8 @@ import eu.dnetlib.uoaadmintools.entities.curator.CuratorResponse;
|
|||
import eu.dnetlib.uoaadmintools.services.CuratorService;
|
||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException;
|
||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.utils.RolesUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
@ -15,7 +16,7 @@ import java.util.List;
|
|||
@RestController
|
||||
@CrossOrigin(origins = "*")
|
||||
public class CuratorController {
|
||||
private final Logger log = Logger.getLogger(this.getClass());
|
||||
private final Logger log = LogManager.getLogger(this.getClass());
|
||||
|
||||
@Autowired
|
||||
private CuratorService curatorService;
|
||||
|
|
|
@ -12,7 +12,8 @@ import eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException;
|
|||
import eu.dnetlib.uoaadmintoolslibrary.handlers.InvalidReCaptchaException;
|
||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.utils.RolesUtils;
|
||||
import eu.dnetlib.uoaadmintoolslibrary.recaptcha.VerifyRecaptcha;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
@ -21,7 +22,7 @@ import java.util.*;
|
|||
@RestController
|
||||
@CrossOrigin(origins = "*")
|
||||
public class EmailController {
|
||||
private final Logger log = Logger.getLogger(this.getClass());
|
||||
private final Logger log = LogManager.getLogger(this.getClass());
|
||||
|
||||
@Autowired
|
||||
private EmailSender emailSender;
|
||||
|
|
|
@ -5,7 +5,8 @@ import eu.dnetlib.uoaadmintoolslibrary.entities.fullEntities.PortalResponse;
|
|||
import eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException;
|
||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.MismatchingContentException;
|
||||
import eu.dnetlib.uoaadmintoolslibrary.services.PortalService;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
@ -17,7 +18,7 @@ import java.util.List;
|
|||
@CrossOrigin(origins = "*")
|
||||
@PreAuthorize("hasAnyAuthority(@AuthorizationService.PORTAL_ADMIN)")
|
||||
public class ExploreController {
|
||||
private final Logger log = Logger.getLogger(this.getClass());
|
||||
private final Logger log = LogManager.getLogger(this.getClass());
|
||||
|
||||
@Autowired
|
||||
private PortalService portalService;
|
||||
|
|
|
@ -10,7 +10,8 @@ import eu.dnetlib.uoaadmintoolslibrary.entities.Portal;
|
|||
import eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException;
|
||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.MismatchingContentException;
|
||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.utils.RolesUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
@ -20,7 +21,7 @@ import java.util.List;
|
|||
@RestController
|
||||
@CrossOrigin(origins = "*")
|
||||
public class MenuController {
|
||||
private final Logger log = Logger.getLogger(this.getClass());
|
||||
private final Logger log = LogManager.getLogger(this.getClass());
|
||||
|
||||
@Autowired
|
||||
private MenuService menuService;
|
||||
|
|
|
@ -7,7 +7,8 @@ import eu.dnetlib.uoaadmintoolslibrary.entities.Portal;
|
|||
import eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException;
|
||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.MismatchingContentException;
|
||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.utils.RolesUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
@ -20,7 +21,7 @@ import java.util.List;
|
|||
@RestController
|
||||
@CrossOrigin(origins = "*")
|
||||
public class NotificationsController {
|
||||
private final Logger log = Logger.getLogger(this.getClass());
|
||||
private final Logger log = LogManager.getLogger(this.getClass());
|
||||
|
||||
@Autowired
|
||||
private NotificationsDAO notificationsDAO;
|
||||
|
|
|
@ -5,7 +5,8 @@ import eu.dnetlib.uoaadmintools.entities.subscriber.PortalSubscribers;
|
|||
import eu.dnetlib.uoaadmintoolslibrary.dao.PortalDAO;
|
||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException;
|
||||
import eu.dnetlib.uoaadmintoolslibrary.responses.SingleValueWrapperResponse;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import java.util.List;
|
||||
|
@ -26,7 +27,7 @@ public class PortalSubscribersController {
|
|||
// @Autowired
|
||||
// private SecurityConfig securityConfig;
|
||||
|
||||
private final Logger log = Logger.getLogger(this.getClass());
|
||||
private final Logger log = LogManager.getLogger(this.getClass());
|
||||
|
||||
@RequestMapping(value = "/community/{pid}/subscribers/count", method = RequestMethod.GET)
|
||||
public SingleValueWrapperResponse<Integer> getNumberOfSubscribersPerPortal(@PathVariable(value="pid", required = true) String pid) throws ContentNotFoundException {
|
||||
|
|
|
@ -3,7 +3,8 @@ package eu.dnetlib.uoaadmintools.controllers;
|
|||
import eu.dnetlib.uoaadmintools.dao.SubscriberDAO;
|
||||
import eu.dnetlib.uoaadmintools.entities.subscriber.Subscriber;
|
||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
@ -15,7 +16,7 @@ import java.util.List;
|
|||
@RestController
|
||||
@CrossOrigin(origins = "*")
|
||||
public class SubscriberController {
|
||||
private final Logger log = Logger.getLogger(this.getClass());
|
||||
private final Logger log = LogManager.getLogger(this.getClass());
|
||||
@Autowired
|
||||
private SubscriberDAO subscriberDAO;
|
||||
@RequestMapping(value = "/subscriber", method = RequestMethod.GET)
|
||||
|
|
|
@ -5,7 +5,8 @@ import eu.dnetlib.uoaadmintools.dao.CuratorDAO;
|
|||
import eu.dnetlib.uoaadmintools.entities.Manager;
|
||||
import eu.dnetlib.uoaadmintools.entities.curator.Curator;
|
||||
import eu.dnetlib.uoaadmintools.entities.curator.CuratorResponse;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
@ -15,7 +16,7 @@ import java.util.List;
|
|||
@Service
|
||||
public class CuratorService {
|
||||
|
||||
private final Logger log = Logger.getLogger(this.getClass());
|
||||
private final Logger log = LogManager.getLogger(this.getClass());
|
||||
|
||||
@Autowired
|
||||
private CuratorDAO curatorDAO;
|
||||
|
|
|
@ -3,15 +3,16 @@ package eu.dnetlib.uoaadmintools.services;
|
|||
import eu.dnetlib.uoaadmintools.dao.LayoutDAO;
|
||||
import eu.dnetlib.uoaadmintools.entities.Layout;
|
||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.MismatchingContentException;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class LayoutService {
|
||||
private final Logger log = Logger.getLogger(this.getClass());
|
||||
private final Logger log = LogManager.getLogger(this.getClass());
|
||||
|
||||
@Autowired
|
||||
private LayoutDAO layoutDAO;
|
||||
|
|
|
@ -8,7 +8,8 @@ import eu.dnetlib.uoaadmintools.entities.menu.MenuItem;
|
|||
import eu.dnetlib.uoaadmintools.entities.menu.MenuItemFull;
|
||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException;
|
||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.MismatchingContentException;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
@ -17,7 +18,7 @@ import java.util.List;
|
|||
|
||||
@Service
|
||||
public class MenuService {
|
||||
private final Logger log = Logger.getLogger(this.getClass());
|
||||
private final Logger log = LogManager.getLogger(this.getClass());
|
||||
|
||||
@Autowired
|
||||
private MenuDAO menuDAO;
|
||||
|
|
|
@ -2,7 +2,8 @@ package eu.dnetlib.uoaadmintools.services;
|
|||
|
||||
import eu.dnetlib.uoaadmintools.dao.NotificationsDAO;
|
||||
import eu.dnetlib.uoaadmintools.entities.Notifications;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
@ -10,7 +11,7 @@ import java.util.List;
|
|||
|
||||
@Service
|
||||
public class NotificationsService {
|
||||
private final Logger log = Logger.getLogger(this.getClass());
|
||||
private final Logger log = LogManager.getLogger(this.getClass());
|
||||
|
||||
@Autowired
|
||||
private NotificationsDAO notificationsDAO;
|
||||
|
|
|
@ -2,13 +2,14 @@ package eu.dnetlib.uoaadmintools.services;
|
|||
|
||||
import eu.dnetlib.uoaadmintools.dao.StatisticsDAO;
|
||||
import eu.dnetlib.uoaadmintools.entities.statistics.Statistics;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class StatisticsService {
|
||||
private final Logger log = Logger.getLogger(this.getClass());
|
||||
private final Logger log = LogManager.getLogger(this.getClass());
|
||||
|
||||
@Autowired
|
||||
private StatisticsDAO statisticsDAO;
|
||||
|
|
|
@ -2,13 +2,14 @@ package eu.dnetlib.uoaadmintools.services;
|
|||
|
||||
import eu.dnetlib.uoaadmintools.dao.PortalSubscribersDAO;
|
||||
import eu.dnetlib.uoaadmintools.entities.subscriber.PortalSubscribers;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class SubscriberService {
|
||||
private final Logger log = Logger.getLogger(this.getClass());
|
||||
private final Logger log = LogManager.getLogger(this.getClass());
|
||||
|
||||
@Autowired
|
||||
private PortalSubscribersDAO portalSubscribersDAO;
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
log4j.rootLogger = DEBUG, R
|
||||
|
||||
log4j.logger.eu.dnetlib = DEBUG
|
||||
log4j.logger.org.springframework = DEBUG, S
|
||||
|
||||
log4j.additivity.org.springframework = false
|
||||
|
||||
log4j.appender.R=org.apache.log4j.RollingFileAppender
|
||||
log4j.appender.R.File=/var/log/dnet/uoa-admin-tools/uoa-admin-tools.log
|
||||
log4j.appender.R.MaxFileSize=10MB
|
||||
log4j.appender.R.MaxBackupIndex=10
|
||||
log4j.appender.R.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.R.layout.ConversionPattern= %d %p %t [%c] - %m%n
|
||||
|
||||
log4j.appender.S=org.apache.log4j.RollingFileAppender
|
||||
log4j.appender.S.File=/var/log/dnet/uoa-admin-tools/uoa-admin-tools-spring.log
|
||||
log4j.appender.S.MaxFileSize=10MB
|
||||
log4j.appender.S.MaxBackupIndex=10
|
||||
log4j.appender.S.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.S.layout.ConversionPattern= %d %p %t [%c] - %m%n
|
|
@ -0,0 +1,39 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Configuration status="WARN" monitorInterval="30">
|
||||
<Properties>
|
||||
<Property name="LOG_PATTERN">
|
||||
%d %p %t [%c] - %m%n
|
||||
</Property>
|
||||
</Properties>
|
||||
<Appenders>
|
||||
<!-- Rolling File Appender -->
|
||||
<RollingFile name="R" fileName="/var/log/dnet/uoa-admin-tools/uoa-admin-tools.log"
|
||||
filePattern="/var/log/dnet/uoa-admin-tools/uoa-admin-tools-%d{yyyy-MM-dd}-%i.log">
|
||||
<PatternLayout>
|
||||
<Pattern>${LOG_PATTERN}</Pattern>
|
||||
</PatternLayout>
|
||||
<Policies>
|
||||
<SizeBasedTriggeringPolicy size="10MB" />
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="10"/>
|
||||
</RollingFile>
|
||||
<RollingFile name="S" fileName="/var/log/dnet/uoa-admin-tools/uoa-admin-tools-spring.log"
|
||||
filePattern="/var/log/dnet/uoa-admin-tools/uoa-admin-tools-spring-%d{yyyy-MM-dd}-%i.log">
|
||||
<PatternLayout>
|
||||
<Pattern>${LOG_PATTERN}</Pattern>
|
||||
</PatternLayout>
|
||||
<Policies>
|
||||
<SizeBasedTriggeringPolicy size="10MB" />
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="10"/>
|
||||
</RollingFile>
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<Logger name="org.springframework" level="debug" additivity="false">
|
||||
<AppenderRef ref="S"/>
|
||||
</Logger>
|
||||
<Root level="debug">
|
||||
<AppenderRef ref="R"/>
|
||||
</Root>
|
||||
</Loggers>
|
||||
</Configuration>
|
Loading…
Reference in New Issue