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>
|
<version>2.0.5-SNAPSHOT</version>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
<name>uoa-admin-tools</name>
|
<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>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>eu.dnetlib</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>uoa-spring-boot-parent</artifactId>
|
||||||
<version>1.5.8.RELEASE</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
<relativePath/> <!-- lookup parent from repository -->
|
|
||||||
</parent>
|
</parent>
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
<java.version>1.8</java.version>
|
|
||||||
<timestamp>${maven.build.timestamp}</timestamp>
|
<timestamp>${maven.build.timestamp}</timestamp>
|
||||||
<maven.build.timestamp.format>E MMM dd HH:mm:ss z yyyy</maven.build.timestamp.format>
|
<maven.build.timestamp.format>E MMM dd HH:mm:ss z yyyy</maven.build.timestamp.format>
|
||||||
</properties>
|
</properties>
|
||||||
|
@ -26,77 +23,39 @@
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-data-mongodb</artifactId>
|
<artifactId>spring-boot-starter-data-mongodb</artifactId>
|
||||||
</dependency>
|
</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>
|
<dependency>
|
||||||
<groupId>javax.mail</groupId>
|
<groupId>javax.mail</groupId>
|
||||||
<artifactId>mail</artifactId>
|
<artifactId>mail</artifactId>
|
||||||
<version>1.5.0-b01</version>
|
<version>1.5.0-b01</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>commons-io</groupId>
|
<!-- <groupId>commons-io</groupId>-->
|
||||||
<artifactId>commons-io</artifactId>
|
<!-- <artifactId>commons-io</artifactId>-->
|
||||||
<version>20030203.000550</version>
|
<!-- <version>20030203.000550</version>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
<dependency> <!-- this dependency includes dependency to uoa-authorization-library -->
|
<dependency> <!-- this dependency includes dependency to uoa-authorization-library -->
|
||||||
<groupId>eu.dnetlib</groupId>
|
<groupId>eu.dnetlib</groupId>
|
||||||
<artifactId>uoa-admin-tools-library</artifactId>
|
<artifactId>uoa-admin-tools-library</artifactId>
|
||||||
<version>1.0.5</version>
|
<version>1.0.6-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<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>
|
<plugin>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
</plugin>
|
<configuration>
|
||||||
<!--3d answer: https://stackoverflow.com/questions/23260057/the-forked-vm-terminated-without-saying-properly-goodbye-vm-crash-or-system-exi-->
|
<mainClass>eu.dnetlib.uoaadmintools.UoaAdminToolsApplication</mainClass>
|
||||||
<!--If you use openjdk there might be a problem with surfire plugin - uncomment following lines-->
|
<executable>true</executable>
|
||||||
<!--<plugin>-->
|
</configuration>
|
||||||
<!--<groupId>org.apache.maven.plugins</groupId>-->
|
<executions>
|
||||||
<!--<artifactId>maven-surefire-plugin</artifactId>-->
|
<execution>
|
||||||
<!--<version>2.19.1</version>-->
|
<goals>
|
||||||
<!--<configuration>-->
|
<goal>repackage</goal>
|
||||||
<!--<!–<testFailureIgnore>true</testFailureIgnore>–>-->
|
</goals>
|
||||||
<!--<useSystemClassLoader>false</useSystemClassLoader>-->
|
</execution>
|
||||||
<!--</configuration>-->
|
</executions>
|
||||||
<!--</plugin>-->
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-war-plugin</artifactId>
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
|
@ -107,27 +66,5 @@
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
<finalName>uoa-admin-tools</finalName>
|
<finalName>uoa-admin-tools</finalName>
|
||||||
<resources>
|
|
||||||
<resource>
|
|
||||||
<directory>src/main/resources</directory>
|
|
||||||
<filtering>true</filtering>
|
|
||||||
</resource>
|
|
||||||
</resources>
|
|
||||||
</build>
|
</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>
|
</project>
|
||||||
|
|
|
@ -7,7 +7,8 @@ import eu.dnetlib.uoaadmintools.configuration.GlobalVars;
|
||||||
import eu.dnetlib.uoaadmintools.configuration.mongo.MongoConnection;
|
import eu.dnetlib.uoaadmintools.configuration.mongo.MongoConnection;
|
||||||
import eu.dnetlib.uoaadmintools.configuration.properties.ManagersApiConfig;
|
import eu.dnetlib.uoaadmintools.configuration.properties.ManagersApiConfig;
|
||||||
import eu.dnetlib.uoaadmintools.configuration.properties.MongoConfig;
|
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.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
@ -23,7 +24,7 @@ import java.util.Map;
|
||||||
@RestController
|
@RestController
|
||||||
@CrossOrigin(origins = "*")
|
@CrossOrigin(origins = "*")
|
||||||
public class AdminToolsCheckDeployController {
|
public class AdminToolsCheckDeployController {
|
||||||
private final Logger log = Logger.getLogger(this.getClass());
|
private final Logger log = LogManager.getLogger(this.getClass());
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private MongoConnection mongoConnection;
|
private MongoConnection mongoConnection;
|
||||||
|
|
|
@ -1,19 +1,18 @@
|
||||||
package eu.dnetlib.uoaadmintools.controllers;
|
package eu.dnetlib.uoaadmintools.controllers;
|
||||||
|
|
||||||
import eu.dnetlib.uoaadmintools.configuration.properties.BrowserCacheConfig;
|
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.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.client.HttpClientErrorException;
|
|
||||||
import org.springframework.web.client.ResourceAccessException;
|
|
||||||
import org.springframework.web.client.RestTemplate;
|
import org.springframework.web.client.RestTemplate;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/cache")
|
@RequestMapping("/cache")
|
||||||
@CrossOrigin(origins = "*")
|
@CrossOrigin(origins = "*")
|
||||||
public class BrowserCacheController {
|
public class BrowserCacheController {
|
||||||
private final Logger log = Logger.getLogger(this.getClass());
|
private final Logger log = LogManager.getLogger(this.getClass());
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private RestTemplate restTemplate;
|
private RestTemplate restTemplate;
|
||||||
|
|
|
@ -8,7 +8,8 @@ import eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException;
|
||||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.MismatchingContentException;
|
import eu.dnetlib.uoaadmintoolslibrary.handlers.MismatchingContentException;
|
||||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.utils.RolesUtils;
|
import eu.dnetlib.uoaadmintoolslibrary.handlers.utils.RolesUtils;
|
||||||
import eu.dnetlib.uoaadmintoolslibrary.services.PortalService;
|
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.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
@ -19,7 +20,7 @@ import java.util.List;
|
||||||
@RequestMapping("/community")
|
@RequestMapping("/community")
|
||||||
@CrossOrigin(origins = "*")
|
@CrossOrigin(origins = "*")
|
||||||
public class CommunityController {
|
public class CommunityController {
|
||||||
private final Logger log = Logger.getLogger(this.getClass());
|
private final Logger log = LogManager.getLogger(this.getClass());
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private RolesUtils rolesUtils;
|
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.ContentNotFoundException;
|
||||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.MismatchingContentException;
|
import eu.dnetlib.uoaadmintoolslibrary.handlers.MismatchingContentException;
|
||||||
import eu.dnetlib.uoaadmintoolslibrary.services.PortalService;
|
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.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
@ -18,7 +19,7 @@ import java.util.List;
|
||||||
@RequestMapping("/connect")
|
@RequestMapping("/connect")
|
||||||
@CrossOrigin(origins = "*")
|
@CrossOrigin(origins = "*")
|
||||||
public class ConnectController {
|
public class ConnectController {
|
||||||
private final Logger log = Logger.getLogger(this.getClass());
|
private final Logger log = LogManager.getLogger(this.getClass());
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private LayoutService layoutService;
|
private LayoutService layoutService;
|
||||||
|
|
|
@ -5,7 +5,8 @@ import eu.dnetlib.uoaadmintools.entities.curator.CuratorResponse;
|
||||||
import eu.dnetlib.uoaadmintools.services.CuratorService;
|
import eu.dnetlib.uoaadmintools.services.CuratorService;
|
||||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException;
|
import eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException;
|
||||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.utils.RolesUtils;
|
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.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
@ -15,7 +16,7 @@ import java.util.List;
|
||||||
@RestController
|
@RestController
|
||||||
@CrossOrigin(origins = "*")
|
@CrossOrigin(origins = "*")
|
||||||
public class CuratorController {
|
public class CuratorController {
|
||||||
private final Logger log = Logger.getLogger(this.getClass());
|
private final Logger log = LogManager.getLogger(this.getClass());
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private CuratorService curatorService;
|
private CuratorService curatorService;
|
||||||
|
|
|
@ -12,7 +12,8 @@ import eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException;
|
||||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.InvalidReCaptchaException;
|
import eu.dnetlib.uoaadmintoolslibrary.handlers.InvalidReCaptchaException;
|
||||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.utils.RolesUtils;
|
import eu.dnetlib.uoaadmintoolslibrary.handlers.utils.RolesUtils;
|
||||||
import eu.dnetlib.uoaadmintoolslibrary.recaptcha.VerifyRecaptcha;
|
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.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
@ -21,7 +22,7 @@ import java.util.*;
|
||||||
@RestController
|
@RestController
|
||||||
@CrossOrigin(origins = "*")
|
@CrossOrigin(origins = "*")
|
||||||
public class EmailController {
|
public class EmailController {
|
||||||
private final Logger log = Logger.getLogger(this.getClass());
|
private final Logger log = LogManager.getLogger(this.getClass());
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private EmailSender emailSender;
|
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.ContentNotFoundException;
|
||||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.MismatchingContentException;
|
import eu.dnetlib.uoaadmintoolslibrary.handlers.MismatchingContentException;
|
||||||
import eu.dnetlib.uoaadmintoolslibrary.services.PortalService;
|
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.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
@ -17,7 +18,7 @@ import java.util.List;
|
||||||
@CrossOrigin(origins = "*")
|
@CrossOrigin(origins = "*")
|
||||||
@PreAuthorize("hasAnyAuthority(@AuthorizationService.PORTAL_ADMIN)")
|
@PreAuthorize("hasAnyAuthority(@AuthorizationService.PORTAL_ADMIN)")
|
||||||
public class ExploreController {
|
public class ExploreController {
|
||||||
private final Logger log = Logger.getLogger(this.getClass());
|
private final Logger log = LogManager.getLogger(this.getClass());
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private PortalService portalService;
|
private PortalService portalService;
|
||||||
|
|
|
@ -10,7 +10,8 @@ import eu.dnetlib.uoaadmintoolslibrary.entities.Portal;
|
||||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException;
|
import eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException;
|
||||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.MismatchingContentException;
|
import eu.dnetlib.uoaadmintoolslibrary.handlers.MismatchingContentException;
|
||||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.utils.RolesUtils;
|
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.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
@ -20,7 +21,7 @@ import java.util.List;
|
||||||
@RestController
|
@RestController
|
||||||
@CrossOrigin(origins = "*")
|
@CrossOrigin(origins = "*")
|
||||||
public class MenuController {
|
public class MenuController {
|
||||||
private final Logger log = Logger.getLogger(this.getClass());
|
private final Logger log = LogManager.getLogger(this.getClass());
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private MenuService menuService;
|
private MenuService menuService;
|
||||||
|
|
|
@ -7,7 +7,8 @@ import eu.dnetlib.uoaadmintoolslibrary.entities.Portal;
|
||||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException;
|
import eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException;
|
||||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.MismatchingContentException;
|
import eu.dnetlib.uoaadmintoolslibrary.handlers.MismatchingContentException;
|
||||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.utils.RolesUtils;
|
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.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
@ -20,7 +21,7 @@ import java.util.List;
|
||||||
@RestController
|
@RestController
|
||||||
@CrossOrigin(origins = "*")
|
@CrossOrigin(origins = "*")
|
||||||
public class NotificationsController {
|
public class NotificationsController {
|
||||||
private final Logger log = Logger.getLogger(this.getClass());
|
private final Logger log = LogManager.getLogger(this.getClass());
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private NotificationsDAO notificationsDAO;
|
private NotificationsDAO notificationsDAO;
|
||||||
|
|
|
@ -5,7 +5,8 @@ import eu.dnetlib.uoaadmintools.entities.subscriber.PortalSubscribers;
|
||||||
import eu.dnetlib.uoaadmintoolslibrary.dao.PortalDAO;
|
import eu.dnetlib.uoaadmintoolslibrary.dao.PortalDAO;
|
||||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException;
|
import eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException;
|
||||||
import eu.dnetlib.uoaadmintoolslibrary.responses.SingleValueWrapperResponse;
|
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.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -26,7 +27,7 @@ public class PortalSubscribersController {
|
||||||
// @Autowired
|
// @Autowired
|
||||||
// private SecurityConfig securityConfig;
|
// 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)
|
@RequestMapping(value = "/community/{pid}/subscribers/count", method = RequestMethod.GET)
|
||||||
public SingleValueWrapperResponse<Integer> getNumberOfSubscribersPerPortal(@PathVariable(value="pid", required = true) String pid) throws ContentNotFoundException {
|
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.dao.SubscriberDAO;
|
||||||
import eu.dnetlib.uoaadmintools.entities.subscriber.Subscriber;
|
import eu.dnetlib.uoaadmintools.entities.subscriber.Subscriber;
|
||||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException;
|
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.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
@ -15,7 +16,7 @@ import java.util.List;
|
||||||
@RestController
|
@RestController
|
||||||
@CrossOrigin(origins = "*")
|
@CrossOrigin(origins = "*")
|
||||||
public class SubscriberController {
|
public class SubscriberController {
|
||||||
private final Logger log = Logger.getLogger(this.getClass());
|
private final Logger log = LogManager.getLogger(this.getClass());
|
||||||
@Autowired
|
@Autowired
|
||||||
private SubscriberDAO subscriberDAO;
|
private SubscriberDAO subscriberDAO;
|
||||||
@RequestMapping(value = "/subscriber", method = RequestMethod.GET)
|
@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.Manager;
|
||||||
import eu.dnetlib.uoaadmintools.entities.curator.Curator;
|
import eu.dnetlib.uoaadmintools.entities.curator.Curator;
|
||||||
import eu.dnetlib.uoaadmintools.entities.curator.CuratorResponse;
|
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.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@ -15,7 +16,7 @@ import java.util.List;
|
||||||
@Service
|
@Service
|
||||||
public class CuratorService {
|
public class CuratorService {
|
||||||
|
|
||||||
private final Logger log = Logger.getLogger(this.getClass());
|
private final Logger log = LogManager.getLogger(this.getClass());
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private CuratorDAO curatorDAO;
|
private CuratorDAO curatorDAO;
|
||||||
|
|
|
@ -3,15 +3,16 @@ package eu.dnetlib.uoaadmintools.services;
|
||||||
import eu.dnetlib.uoaadmintools.dao.LayoutDAO;
|
import eu.dnetlib.uoaadmintools.dao.LayoutDAO;
|
||||||
import eu.dnetlib.uoaadmintools.entities.Layout;
|
import eu.dnetlib.uoaadmintools.entities.Layout;
|
||||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.MismatchingContentException;
|
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.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class LayoutService {
|
public class LayoutService {
|
||||||
private final Logger log = Logger.getLogger(this.getClass());
|
private final Logger log = LogManager.getLogger(this.getClass());
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private LayoutDAO layoutDAO;
|
private LayoutDAO layoutDAO;
|
||||||
|
|
|
@ -8,7 +8,8 @@ import eu.dnetlib.uoaadmintools.entities.menu.MenuItem;
|
||||||
import eu.dnetlib.uoaadmintools.entities.menu.MenuItemFull;
|
import eu.dnetlib.uoaadmintools.entities.menu.MenuItemFull;
|
||||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException;
|
import eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException;
|
||||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.MismatchingContentException;
|
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.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@ -17,7 +18,7 @@ import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class MenuService {
|
public class MenuService {
|
||||||
private final Logger log = Logger.getLogger(this.getClass());
|
private final Logger log = LogManager.getLogger(this.getClass());
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private MenuDAO menuDAO;
|
private MenuDAO menuDAO;
|
||||||
|
|
|
@ -2,7 +2,8 @@ package eu.dnetlib.uoaadmintools.services;
|
||||||
|
|
||||||
import eu.dnetlib.uoaadmintools.dao.NotificationsDAO;
|
import eu.dnetlib.uoaadmintools.dao.NotificationsDAO;
|
||||||
import eu.dnetlib.uoaadmintools.entities.Notifications;
|
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.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@ -10,7 +11,7 @@ import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class NotificationsService {
|
public class NotificationsService {
|
||||||
private final Logger log = Logger.getLogger(this.getClass());
|
private final Logger log = LogManager.getLogger(this.getClass());
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private NotificationsDAO notificationsDAO;
|
private NotificationsDAO notificationsDAO;
|
||||||
|
|
|
@ -2,13 +2,14 @@ package eu.dnetlib.uoaadmintools.services;
|
||||||
|
|
||||||
import eu.dnetlib.uoaadmintools.dao.StatisticsDAO;
|
import eu.dnetlib.uoaadmintools.dao.StatisticsDAO;
|
||||||
import eu.dnetlib.uoaadmintools.entities.statistics.Statistics;
|
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.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class StatisticsService {
|
public class StatisticsService {
|
||||||
private final Logger log = Logger.getLogger(this.getClass());
|
private final Logger log = LogManager.getLogger(this.getClass());
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private StatisticsDAO statisticsDAO;
|
private StatisticsDAO statisticsDAO;
|
||||||
|
|
|
@ -2,13 +2,14 @@ package eu.dnetlib.uoaadmintools.services;
|
||||||
|
|
||||||
import eu.dnetlib.uoaadmintools.dao.PortalSubscribersDAO;
|
import eu.dnetlib.uoaadmintools.dao.PortalSubscribersDAO;
|
||||||
import eu.dnetlib.uoaadmintools.entities.subscriber.PortalSubscribers;
|
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.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class SubscriberService {
|
public class SubscriberService {
|
||||||
private final Logger log = Logger.getLogger(this.getClass());
|
private final Logger log = LogManager.getLogger(this.getClass());
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private PortalSubscribersDAO portalSubscribersDAO;
|
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