-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Massive overhaul. Translation from Milmove GO to Lambda Java. Removed…
… web server aspects. Beginning to conduct TGET flow internally.
- Loading branch information
1 parent
d90156e
commit 599f530
Showing
20 changed files
with
415 additions
and
216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# SAM CLI | ||
.aws-sam/ | ||
|
||
# Compiled class file | ||
*.class | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/main/java/com/milmove/trdmlambda/milmove/TrdmCronLambdaHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.milmove.trdmlambda.milmove; | ||
|
||
import com.amazonaws.services.lambda.runtime.Context; | ||
import com.amazonaws.services.lambda.runtime.RequestHandler; | ||
import com.milmove.trdmlambda.milmove.handler.TransportationAccountingCodesHandler; | ||
import org.slf4j.LoggerFactory; | ||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.context.ApplicationContext; | ||
import ch.qos.logback.classic.Logger; | ||
|
||
public class TrdmCronLambdaHandler implements RequestHandler<Object, String> { | ||
private static final Logger logger = (Logger) LoggerFactory.getLogger(TrdmCronLambdaHandler.class); | ||
private static final ApplicationContext context; | ||
|
||
static { | ||
logger.info("Initializing Spring Boot application..."); | ||
context = SpringApplication.run(TrdmRestApplication.class); | ||
logger.info("Spring Boot application initialized successfully."); | ||
} | ||
|
||
@Override | ||
public String handleRequest(Object input, Context lambdaContext) { | ||
try { | ||
logger.info("trdm cron job triggered, starting TAC handler and TGET flow"); | ||
TransportationAccountingCodesHandler tacHandler = context.getBean(TransportationAccountingCodesHandler.class); | ||
tacHandler.tacCron(); | ||
|
||
logger.info("starting LOA handler"); | ||
logger.info("trdm cron job finished execution"); | ||
return "trdm cron job finished execution"; | ||
} catch (Exception e) { | ||
logger.error("error executing cron job", e); | ||
return "error in executing cron job"; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 0 additions & 16 deletions
16
src/main/java/com/milmove/trdmlambda/milmove/config/OpenApiConfig.java
This file was deleted.
Oops, something went wrong.
70 changes: 0 additions & 70 deletions
70
src/main/java/com/milmove/trdmlambda/milmove/controller/GetTableController.java
This file was deleted.
Oops, something went wrong.
54 changes: 0 additions & 54 deletions
54
src/main/java/com/milmove/trdmlambda/milmove/controller/LastTableUpdateController.java
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
src/main/java/com/milmove/trdmlambda/milmove/controller/TestController.java
This file was deleted.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
src/main/java/com/milmove/trdmlambda/milmove/handler/LinesOfAccountingHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.milmove.trdmlambda.milmove.handler; | ||
|
||
public class LinesOfAccountingHandler { | ||
|
||
} |
Oops, something went wrong.