Skip to content

Commit

Permalink
R2.0.0
Browse files Browse the repository at this point in the history
Updated to latest packages for security vulnerability fixes.
Removed AWS S3 support.
Minimum Java 17
  • Loading branch information
RobertOttesen committed Jan 24, 2024
1 parent a42525b commit 1632ace
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 281 deletions.
10 changes: 0 additions & 10 deletions config/application-fdps.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,6 @@ service.file-output.enabled=false
service.file-output.directory=data
service.file-output.write-headers=true

# AWS Simple Storage Service (S3) Put
service.aws-s3-put.enabled=false
service.aws-s3-put.region-name=
service.aws-s3-put.access-key=
service.aws-s3-put.secret-key=
service.aws-s3-put.bucket-name=
#Folders in bucket. Can be multiple levels deep. Separate multiple levels w/ '/' character. If blank
#then objects are created at root level
service.aws-s3-put.folder-name=fdps

# Message Logging
service.message-logging.enabled=false
service.message-logging.write-headers=true
Expand Down
10 changes: 0 additions & 10 deletions config/application-itws.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,6 @@ service.file-output.enabled=false
service.file-output.directory=data
service.file-output.write-headers=true

# AWS Simple Storage Service (S3) Put
service.aws-s3-put.enabled=false
service.aws-s3-put.region-name=
service.aws-s3-put.access-key=
service.aws-s3-put.secret-key=
service.aws-s3-put.bucket-name=
#Folders in bucket. Can be multiple levels deep. Separate multiple levels w/ '/' character. If blank
#then objects are created at root level
service.aws-s3-put.folder-name=itws

# Message Logging
service.message-logging.enabled=false
service.message-logging.write-headers=true
Expand Down
10 changes: 0 additions & 10 deletions config/application-notam.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,6 @@ service.file-output.enabled=false
service.file-output.directory=data
service.file-output.write-headers=true

# AWS Simple Storage Service (S3) Put
service.aws-s3-put.enabled=false
service.aws-s3-put.region-name=
service.aws-s3-put.access-key=
service.aws-s3-put.secret-key=
service.aws-s3-put.bucket-name=
#Folders in bucket. Can be multiple levels deep. Separate multiple levels w/ '/' character. If blank
#then objects are created at root level
service.aws-s3-put.folder-name=aim_fns

# Message Logging
service.message-logging.enabled=false
service.message-logging.write-headers=true
Expand Down
10 changes: 0 additions & 10 deletions config/application-stdds.properties
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,6 @@ service.file-output.enabled=false
service.file-output.directory=data
service.file-output.write-headers=true

# AWS Simple Storage Service (S3) Put
service.aws-s3-put.enabled=false
service.aws-s3-put.region-name=
service.aws-s3-put.access-key=
service.aws-s3-put.secret-key=
service.aws-s3-put.bucket-name=
#Folders in bucket. Can be multiple levels deep. Separate multiple levels w/ '/' character. If blank
#then objects are created at root level
service.aws-s3-put.folder-name=stdds

# Message Logging
service.message-logging.enabled=false
service.message-logging.write-headers=true
Expand Down
11 changes: 0 additions & 11 deletions config/application-tbfm.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,6 @@ service.file-output.enabled=false
service.file-output.directory=data
service.file-output.write-headers=true


# AWS Simple Storage Service (S3) Put
service.aws-s3-put.enabled=false
service.aws-s3-put.region-name=
service.aws-s3-put.access-key=
service.aws-s3-put.secret-key=
service.aws-s3-put.bucket-name=
#Folders in bucket. Can be multiple levels deep. Separate multiple levels w/ '/' character. If blank
#then objects are created at root level
service.aws-s3-put.folder-name=tbfm

# Message Logging
service.message-logging.enabled=false
service.message-logging.write-headers=true
Expand Down
10 changes: 0 additions & 10 deletions config/application-tfms.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,6 @@ service.file-output.enabled=false
service.file-output.directory=data
service.file-output.write-headers=true

# AWS Simple Storage Service (S3) Put
service.aws-s3-put.enabled=false
service.aws-s3-put.region-name=
service.aws-s3-put.access-key=
service.aws-s3-put.secret-key=
service.aws-s3-put.bucket-name=
#Folders in bucket. Can be multiple levels deep. Separate multiple levels w/ '/' character. If blank
#then objects are created at root level
service.aws-s3-put.folder-name=tfms

# Message Logging
service.message-logging.enabled=false
service.message-logging.write-headers=true
Expand Down
34 changes: 19 additions & 15 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.1</version>
<version>3.0.6</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.solace.swim</groupId>
<artifactId>swim-feed-handler</artifactId>
<version>1.4.0</version>
<version>2.0.0</version>
<name>swim-feed-handler</name>
<description>SWIM Feed Handler Spring Boot Application</description>

<properties>
<java.version>1.8</java.version>
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>

<dependencies>
Expand All @@ -34,35 +36,31 @@
<dependency>
<groupId>com.solace.spring.boot</groupId>
<artifactId>solace-jms-spring-boot-starter</artifactId>
<version>4.2.2</version>
<version>5.0.0</version>
</dependency>
<dependency>
<groupId>com.solace</groupId>
<artifactId>solace-messaging-client</artifactId>
<version>1.1.0</version>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>com.solacesystems</groupId>
<artifactId>sol-jms</artifactId>
<version>10.15.0</version>
<version>10.22.0</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId>
<version>1.12.262</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
<dependency>
<groupId>com.github.ulisesbocchio</groupId>
<artifactId>jasypt-spring-boot-starter</artifactId>
<version>3.0.4</version>
<version>3.0.5</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.16.1</version>
</dependency>
<dependency>
<groupId>org.jasypt</groupId>
Expand Down Expand Up @@ -93,6 +91,12 @@
<artifactId>spring-integration-test</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
</dependency>
</dependencies>

<build>
Expand All @@ -109,7 +113,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<version>3.6.0</version>
<executions>
<execution>
<id>dist</id>
Expand Down
22 changes: 9 additions & 13 deletions src/main/java/com/solace/swim/config/ConsumerConfiguration.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/**
package com.solace.swim.config;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
Expand All @@ -16,8 +17,9 @@
* specific language governing permissions and limitations
* under the License.
*/
package com.solace.swim.config;


import jakarta.jms.ConnectionFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
Expand All @@ -30,12 +32,11 @@
import org.springframework.util.ErrorHandler;

import javax.annotation.PostConstruct;
import javax.jms.ConnectionFactory;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.util.Hashtable;

/**
Expand All @@ -52,7 +53,7 @@ public class ConsumerConfiguration {
// The values are defined in the application.properties files so there is no need to modify
// the values in application.context
@Autowired
Hashtable envConsumer;
Hashtable<Object,String> envConsumer;

@Value("${solace.jms.consumer.connection-factory}")
private String consumerConnectionFactoryName;
Expand All @@ -63,7 +64,6 @@ public class ConsumerConfiguration {

/**
* Initialize the InitialConext based on the environment properties that is autowired via Spring.
* @throws NamingException
*/
@PostConstruct
public void init() throws NamingException {
Expand All @@ -74,7 +74,6 @@ public void init() throws NamingException {
* Generate a custom JMS Listener Connection Factory.
* @param errorHandler - simple error handler
* @return DefaultJmsListenerContainerFactory
* @throws Exception
*/
@Bean
public DefaultJmsListenerContainerFactory cFactory(SwimErrorHandler errorHandler) throws Exception {
Expand All @@ -96,12 +95,9 @@ public void handleError(Throwable t) {
ByteArrayOutputStream os = new ByteArrayOutputStream();
PrintStream ps = new PrintStream(os);
t.printStackTrace(ps);
try {
String output = os.toString("UTF8");
logger.error("============= Error processing message: " + t.getMessage()+"\n"+output);
} catch (UnsupportedEncodingException e) {
logger.error("An error occurred." + t.getMessage());
}
String output = os.toString(StandardCharsets.UTF_8);
logger.error("============= Error processing message: " + t.getMessage()+"\n"+output);


}
}
Expand Down
Loading

0 comments on commit 1632ace

Please sign in to comment.