Skip to content

Commit

Permalink
Remove unwanted Spring dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ashuklafispan committed May 3, 2020
1 parent 0ec3c32 commit f5ac845
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
15 changes: 0 additions & 15 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<spring.version>5.2.6.RELEASE</spring.version>
<log4j.version>2.13.2</log4j.version>
<gson.version>2.8.6</gson.version>
</properties>
Expand Down Expand Up @@ -62,20 +61,6 @@
<scope>provided</scope>
</dependency>

<!-- https://mvnrepository.com/artifact/org.springframework/spring-core -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.springframework/spring-context -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>

<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
Expand Down
9 changes: 7 additions & 2 deletions src/main/java/com/actigence/aal/aws/SQSClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@
import static java.lang.System.getenv;
import static java.util.Optional.ofNullable;

/**
* AWS SQS client for publishing messages to SQS queues
*/
@Slf4j
public class SQSClient
{
private static final String QUEUE_NAME_ENV = "AAL_QUEUE_NAME";
private static final String QUEUE_NAME_SYS_PROP = "all.queue_name";
private static final String CLIENT_ID_ENV = "AAL_CLIENT_ID";
private static final String CLIENT_ID_SYS_PROP = "all.client_id";
private static final String DEFAULT_QUEUE_NAME = "aal_api_invocation_queue";
private static final String CLIENT_ID_SYS_PROP = "aal.client_id";
private static final String DEFAULT_QUEUE_NAME = "aal_inbound_request_logging_queue";

private final Gson gson;
private final String queueUrl;
Expand All @@ -40,6 +43,8 @@ public SQSClient()
*/
public void publish(ApiAccessLog apiAccessLog)
{
apiAccessLog.setClientId(getClientId());

SendMessageRequest send_msg_request = new SendMessageRequest()
.withQueueUrl(queueUrl)
.withMessageBody(gson.toJson(apiAccessLog));
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/actigence/aal/dto/ApiAccessLog.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Setter
@Getter
@Builder
@ToString
Expand Down

0 comments on commit f5ac845

Please sign in to comment.