first commit 04/09/2024
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
touch README.md
|
||||
git init
|
||||
git checkout -b main
|
||||
git add README.md
|
||||
git commit -m "first commit"
|
||||
git remote add origin https://git.theonasanyas.com/agboola/InterfaceBackup.git
|
||||
git push -u origin main
|
||||
|
||||
|
||||
git remote add origin https://git.theonasanyas.com/agboola/InterfaceBackup.git
|
||||
git push -u origin main
|
||||
Executable
+26
@@ -0,0 +1,26 @@
|
||||
14-09-2022 00:42:35.516 [main] INFO com.saslpay.SaslPayBkpTests.logStarting - Starting SaslPayBkpTests using Java 1.8.0_341 on onasanya with PID 14052 (started by agboola in Z:\ideaProjects\saslInterfaceBkp)
|
||||
14-09-2022 00:42:35.610 [main] INFO com.saslpay.SaslPayBkpTests.logStartupProfileInfo - The following 1 profile is active: "production"
|
||||
14-09-2022 00:42:37.541 [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate.registerRepositoriesIn - Bootstrapping Spring Data JPA repositories in DEFAULT mode.
|
||||
14-09-2022 00:42:37.777 [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate.registerRepositoriesIn - Finished Spring Data repository scanning in 208 ms. Found 3 JPA repository interfaces.
|
||||
14-09-2022 00:42:40.874 [main] INFO o.h.jpa.internal.util.LogHelper.logPersistenceUnitInformation - HHH000204: Processing PersistenceUnitInfo [name: default]
|
||||
14-09-2022 00:42:41.156 [main] INFO org.hibernate.Version.logVersion - HHH000412: Hibernate ORM core version 5.5.3.Final
|
||||
14-09-2022 00:42:41.674 [main] INFO o.h.annotations.common.Version.<clinit> - HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
|
||||
14-09-2022 00:42:42.161 [main] INFO com.zaxxer.hikari.HikariDataSource.getConnection - HikariPool-1 - Starting...
|
||||
14-09-2022 00:42:42.860 [main] INFO com.zaxxer.hikari.HikariDataSource.getConnection - HikariPool-1 - Start completed.
|
||||
14-09-2022 00:42:42.897 [main] INFO org.hibernate.dialect.Dialect.<init> - HHH000400: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect
|
||||
14-09-2022 00:42:44.744 [main] INFO o.h.e.t.j.p.i.JtaPlatformInitiator.initiateService - HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
|
||||
14-09-2022 00:42:44.775 [main] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean.buildNativeEntityManagerFactory - Initialized JPA EntityManagerFactory for persistence unit 'default'
|
||||
14-09-2022 00:42:48.061 [main] INFO o.s.s.web.DefaultSecurityFilterChain.<init> - Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@131c0b6f, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@7f030c72, org.springframework.security.web.context.SecurityContextPersistenceFilter@4b360972, org.springframework.security.web.header.HeaderWriterFilter@24fef542, org.springframework.security.web.authentication.logout.LogoutFilter@3c7d8a4, com.saslpay.config.JwtRequestFilter@4ffa7041, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@68821f6, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@1e6cb932, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@68d8ae27, org.springframework.security.web.session.SessionManagementFilter@49e0b123, org.springframework.security.web.access.ExceptionTranslationFilter@28f90752, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@290c266c]
|
||||
14-09-2022 00:42:54.414 [main] INFO o.a.c.s.b.CamelSpringBootApplicationListener.onCamelContextStarted - Starting CamelMainRunController to ensure the main thread keeps running
|
||||
14-09-2022 00:42:54.414 [main] INFO o.a.c.i.e.DefaultStreamCachingStrategy.doStart - StreamCaching in use with spool directory: C:\Users\agboola\AppData\Local\Temp\camel\camel-tmp-9A3F9225C2FB801-0000000000000000 and rules: [Spool > 128K body size]
|
||||
14-09-2022 00:42:54.439 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Routes startup summary (total:1 started:1)
|
||||
14-09-2022 00:42:54.439 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Started Account Update (file://./app/intxns)
|
||||
14-09-2022 00:42:54.446 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Apache Camel 3.8.0 (camel-1) started in 942ms (build:204ms init:691ms start:47ms)
|
||||
14-09-2022 00:42:54.462 [main] INFO com.saslpay.SaslPayBkpTests.logStarted - Started SaslPayBkpTests in 20.018 seconds (JVM running for 22.875)
|
||||
14-09-2022 00:42:55.042 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.doStop - Apache Camel 3.8.0 (camel-1) shutting down (timeout:45s)
|
||||
14-09-2022 00:42:55.058 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.logRouteStopSummary - Routes shutdown summary (total:1 stopped:1)
|
||||
14-09-2022 00:42:55.058 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.logRouteStopSummary - Stopped Account Update (file://./app/intxns)
|
||||
14-09-2022 00:42:55.074 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.doStop - Apache Camel 3.8.0 (camel-1) shutdown in 32ms (uptime:675ms)
|
||||
14-09-2022 00:42:55.121 [SpringApplicationShutdownHook] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean.destroy - Closing JPA EntityManagerFactory for persistence unit 'default'
|
||||
14-09-2022 00:42:55.121 [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource.close - HikariPool-1 - Shutdown initiated...
|
||||
14-09-2022 00:42:55.152 [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource.close - HikariPool-1 - Shutdown completed.
|
||||
+916
@@ -0,0 +1,916 @@
|
||||
01-09-2022 12:42:51.671 [main] INFO com.saslpay.SaslPayBkpTests.logStarting - Starting SaslPayBkpTests using Java 1.8.0_341 on onasanya with PID 5824 (started by agboola in Z:\ideaProjects\saslInterfaceBkp)
|
||||
01-09-2022 12:42:51.751 [main] INFO com.saslpay.SaslPayBkpTests.logStartupProfileInfo - The following 1 profile is active: "production"
|
||||
01-09-2022 12:42:53.776 [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate.registerRepositoriesIn - Bootstrapping Spring Data JPA repositories in DEFAULT mode.
|
||||
01-09-2022 12:42:54.007 [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate.registerRepositoriesIn - Finished Spring Data repository scanning in 205 ms. Found 3 JPA repository interfaces.
|
||||
01-09-2022 12:42:57.188 [main] INFO o.h.jpa.internal.util.LogHelper.logPersistenceUnitInformation - HHH000204: Processing PersistenceUnitInfo [name: default]
|
||||
01-09-2022 12:42:57.407 [main] INFO org.hibernate.Version.logVersion - HHH000412: Hibernate ORM core version 5.5.3.Final
|
||||
01-09-2022 12:42:57.922 [main] INFO o.h.annotations.common.Version.<clinit> - HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
|
||||
01-09-2022 12:42:58.437 [main] INFO com.zaxxer.hikari.HikariDataSource.getConnection - HikariPool-1 - Starting...
|
||||
01-09-2022 12:42:59.034 [main] INFO com.zaxxer.hikari.HikariDataSource.getConnection - HikariPool-1 - Start completed.
|
||||
01-09-2022 12:42:59.080 [main] INFO org.hibernate.dialect.Dialect.<init> - HHH000400: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect
|
||||
01-09-2022 12:43:01.126 [main] INFO o.h.e.t.j.p.i.JtaPlatformInitiator.initiateService - HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
|
||||
01-09-2022 12:43:01.152 [main] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean.buildNativeEntityManagerFactory - Initialized JPA EntityManagerFactory for persistence unit 'default'
|
||||
01-09-2022 12:43:04.780 [main] INFO o.s.s.web.DefaultSecurityFilterChain.<init> - Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@58ebee9, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@131c0b6f, org.springframework.security.web.context.SecurityContextPersistenceFilter@195498aa, org.springframework.security.web.header.HeaderWriterFilter@72a34537, org.springframework.security.web.authentication.logout.LogoutFilter@45fb2354, com.saslpay.config.JwtRequestFilter@18db3b3c, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@793d09e, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@592cb470, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@7f030c72, org.springframework.security.web.session.SessionManagementFilter@67a6a2d0, org.springframework.security.web.access.ExceptionTranslationFilter@6a278584, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@6231f77a]
|
||||
01-09-2022 12:43:11.055 [main] INFO o.a.c.s.b.CamelSpringBootApplicationListener.onCamelContextStarted - Starting CamelMainRunController to ensure the main thread keeps running
|
||||
01-09-2022 12:43:11.071 [main] INFO o.a.c.i.e.DefaultStreamCachingStrategy.doStart - StreamCaching in use with spool directory: C:\Users\agboola\AppData\Local\Temp\camel\camel-tmp-383CEC320BDA87C-0000000000000000 and rules: [Spool > 128K body size]
|
||||
01-09-2022 12:43:11.091 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Routes startup summary (total:1 started:1)
|
||||
01-09-2022 12:43:11.095 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Started Account Update (file://./app/intxns)
|
||||
01-09-2022 12:43:11.096 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Apache Camel 3.8.0 (camel-1) started in 868ms (build:170ms init:650ms start:48ms)
|
||||
01-09-2022 12:43:11.111 [main] INFO com.saslpay.SaslPayBkpTests.logStarted - Started SaslPayBkpTests in 20.481 seconds (JVM running for 23.564)
|
||||
01-09-2022 12:43:12.355 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.doStop - Apache Camel 3.8.0 (camel-1) shutting down (timeout:45s)
|
||||
01-09-2022 12:43:12.381 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.logRouteStopSummary - Routes shutdown summary (total:1 stopped:1)
|
||||
01-09-2022 12:43:12.384 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.logRouteStopSummary - Stopped Account Update (file://./app/intxns)
|
||||
01-09-2022 12:43:12.396 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.doStop - Apache Camel 3.8.0 (camel-1) shutdown in 41ms (uptime:1s348ms)
|
||||
01-09-2022 12:43:12.471 [SpringApplicationShutdownHook] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean.destroy - Closing JPA EntityManagerFactory for persistence unit 'default'
|
||||
01-09-2022 12:43:12.479 [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource.close - HikariPool-1 - Shutdown initiated...
|
||||
01-09-2022 12:43:12.582 [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource.close - HikariPool-1 - Shutdown completed.
|
||||
01-09-2022 12:52:47.071 [main] INFO com.saslpay.SaslPayBkp.logStarting - Starting SaslPayBkp using Java 1.8.0_341 on onasanya with PID 4204 (Z:\ideaProjects\saslInterfaceBkp\target\classes started by agboola in Z:\ideaProjects\saslInterfaceBkp)
|
||||
01-09-2022 12:52:47.087 [main] INFO com.saslpay.SaslPayBkp.logStartupProfileInfo - The following 1 profile is active: "production"
|
||||
01-09-2022 12:52:49.270 [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate.registerRepositoriesIn - Bootstrapping Spring Data JPA repositories in DEFAULT mode.
|
||||
01-09-2022 12:52:49.544 [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate.registerRepositoriesIn - Finished Spring Data repository scanning in 248 ms. Found 3 JPA repository interfaces.
|
||||
01-09-2022 12:52:53.070 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer.initialize - Tomcat initialized with port(s): 9097 (http)
|
||||
01-09-2022 12:52:53.105 [main] INFO o.a.catalina.core.StandardService.log - Starting service [Tomcat]
|
||||
01-09-2022 12:52:53.107 [main] INFO o.a.catalina.core.StandardEngine.log - Starting Servlet engine: [Apache Tomcat/9.0.63]
|
||||
01-09-2022 12:52:53.777 [main] INFO o.a.c.c.C.[Tomcat].[localhost].[/].log - Initializing Spring embedded WebApplicationContext
|
||||
01-09-2022 12:52:53.779 [main] INFO o.s.b.w.s.c.ServletWebServerApplicationContext.prepareWebApplicationContext - Root WebApplicationContext: initialization completed in 6502 ms
|
||||
01-09-2022 12:52:54.637 [main] INFO o.h.jpa.internal.util.LogHelper.logPersistenceUnitInformation - HHH000204: Processing PersistenceUnitInfo [name: default]
|
||||
01-09-2022 12:52:54.867 [main] INFO org.hibernate.Version.logVersion - HHH000412: Hibernate ORM core version 5.5.3.Final
|
||||
01-09-2022 12:52:55.484 [main] INFO o.h.annotations.common.Version.<clinit> - HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
|
||||
01-09-2022 12:52:56.006 [main] INFO com.zaxxer.hikari.HikariDataSource.getConnection - HikariPool-1 - Starting...
|
||||
01-09-2022 12:52:56.538 [main] INFO com.zaxxer.hikari.HikariDataSource.getConnection - HikariPool-1 - Start completed.
|
||||
01-09-2022 12:52:56.581 [main] INFO org.hibernate.dialect.Dialect.<init> - HHH000400: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect
|
||||
01-09-2022 12:52:58.735 [main] INFO o.h.e.t.j.p.i.JtaPlatformInitiator.initiateService - HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
|
||||
01-09-2022 12:52:58.768 [main] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean.buildNativeEntityManagerFactory - Initialized JPA EntityManagerFactory for persistence unit 'default'
|
||||
01-09-2022 12:53:04.149 [main] INFO o.s.s.web.DefaultSecurityFilterChain.<init> - Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@6ec77cab, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@c7a1db6, org.springframework.security.web.context.SecurityContextPersistenceFilter@5b29d699, org.springframework.security.web.header.HeaderWriterFilter@2cd877d3, org.springframework.security.web.authentication.logout.LogoutFilter@7b11ff9a, com.saslpay.config.JwtRequestFilter@41d53813, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@5a5a973c, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@3f2d2f22, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@17c72ffa, org.springframework.security.web.session.SessionManagementFilter@7f49df25, org.springframework.security.web.access.ExceptionTranslationFilter@1fdd5517, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@37816ea6]
|
||||
01-09-2022 12:53:07.750 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer.start - Tomcat started on port(s): 9097 (http) with context path ''
|
||||
01-09-2022 12:53:08.561 [main] INFO o.a.c.s.b.CamelSpringBootApplicationListener.onCamelContextStarted - Starting CamelMainRunController to ensure the main thread keeps running
|
||||
01-09-2022 12:53:08.575 [main] INFO o.a.c.i.e.DefaultStreamCachingStrategy.doStart - StreamCaching in use with spool directory: C:\Users\agboola\AppData\Local\Temp\camel\camel-tmp-48418EA9D097878-0000000000000000 and rules: [Spool > 128K body size]
|
||||
01-09-2022 12:53:08.599 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Routes startup summary (total:1 started:1)
|
||||
01-09-2022 12:53:08.601 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Started Account Update (file://./app/intxns)
|
||||
01-09-2022 12:53:08.602 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Apache Camel 3.8.0 (camel-1) started in 747ms (build:152ms init:547ms start:48ms)
|
||||
01-09-2022 12:53:08.619 [main] INFO com.saslpay.SaslPayBkp.logStarted - Started SaslPayBkp in 23.131 seconds (JVM running for 27.619)
|
||||
01-09-2022 12:53:41.787 [http-nio-9097-exec-2] INFO o.a.c.c.C.[Tomcat].[localhost].[/].log - Initializing Spring DispatcherServlet 'dispatcherServlet'
|
||||
01-09-2022 12:53:41.790 [http-nio-9097-exec-2] INFO o.s.web.servlet.DispatcherServlet.initServletBean - Initializing Servlet 'dispatcherServlet'
|
||||
01-09-2022 12:53:41.795 [http-nio-9097-exec-2] INFO o.s.web.servlet.DispatcherServlet.initServletBean - Completed initialization in 4 ms
|
||||
01-09-2022 12:53:43.671 [http-nio-9097-exec-2] INFO com.saslpay.log.SaslPayLog.log - {
|
||||
"txnCode": "",
|
||||
"ourTxnRef": "FT22244WGVEH6",
|
||||
"otherTxnRef": "TESTEXT122",
|
||||
"requestType": "",
|
||||
"api": "",
|
||||
"hold": "F",
|
||||
"bankWallet": "",
|
||||
"customerName": "",
|
||||
"customerBranch": "",
|
||||
"crAccount": "1",
|
||||
"drAccount": "2",
|
||||
"txnCurrency": "",
|
||||
"txnAmount": "0",
|
||||
"txnCharge": "0",
|
||||
"txnNarration": "",
|
||||
"elevyCharge": "0"
|
||||
}
|
||||
01-09-2022 12:56:17.077 [HikariPool-1 housekeeper] WARN com.zaxxer.hikari.pool.HikariPool.run - HikariPool-1 - Thread starvation or clock leap detected (housekeeper delta=2m20s398ms556µs750ns).
|
||||
01-09-2022 12:58:33.527 [http-nio-9097-exec-2] ERROR o.a.c.c.C.[.[.[.[dispatcherServlet].log - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause
|
||||
java.lang.NullPointerException: null
|
||||
at com.saslpay.datacapture.ExtReversalCapture.extReversal(ExtReversalCapture.java:203)
|
||||
at com.saslpay.controller.TransactionDataController.postExtRev(TransactionDataController.java:38)
|
||||
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
|
||||
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
|
||||
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
|
||||
at java.lang.reflect.Method.invoke(Method.java:498)
|
||||
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
|
||||
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)
|
||||
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
|
||||
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
|
||||
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
|
||||
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
|
||||
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)
|
||||
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)
|
||||
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
|
||||
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
|
||||
at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)
|
||||
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
|
||||
at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)
|
||||
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)
|
||||
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)
|
||||
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)
|
||||
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at com.saslpay.config.JwtRequestFilter.doFilterInternal(JwtRequestFilter.java:82)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)
|
||||
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)
|
||||
at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:112)
|
||||
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:82)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)
|
||||
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)
|
||||
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)
|
||||
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
|
||||
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
|
||||
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
|
||||
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
|
||||
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
|
||||
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
|
||||
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
|
||||
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
|
||||
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
|
||||
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:890)
|
||||
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1743)
|
||||
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
|
||||
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
|
||||
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
|
||||
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
|
||||
at java.lang.Thread.run(Thread.java:750)
|
||||
01-09-2022 12:58:33.611 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.doStop - Apache Camel 3.8.0 (camel-1) shutting down (timeout:45s)
|
||||
01-09-2022 12:58:33.636 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.logRouteStopSummary - Routes shutdown summary (total:1 stopped:1)
|
||||
01-09-2022 12:58:33.638 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.logRouteStopSummary - Stopped Account Update (file://./app/intxns)
|
||||
01-09-2022 12:58:33.653 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.doStop - Apache Camel 3.8.0 (camel-1) shutdown in 40ms (uptime:5m25s)
|
||||
01-09-2022 12:58:33.932 [SpringApplicationShutdownHook] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean.destroy - Closing JPA EntityManagerFactory for persistence unit 'default'
|
||||
01-09-2022 12:58:33.967 [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource.close - HikariPool-1 - Shutdown initiated...
|
||||
01-09-2022 12:58:34.020 [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource.close - HikariPool-1 - Shutdown completed.
|
||||
01-09-2022 12:58:49.828 [main] INFO com.saslpay.SaslPayBkp.logStarting - Starting SaslPayBkp using Java 1.8.0_341 on onasanya with PID 10400 (Z:\ideaProjects\saslInterfaceBkp\target\classes started by agboola in Z:\ideaProjects\saslInterfaceBkp)
|
||||
01-09-2022 12:58:49.845 [main] INFO com.saslpay.SaslPayBkp.logStartupProfileInfo - The following 1 profile is active: "production"
|
||||
01-09-2022 12:58:52.462 [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate.registerRepositoriesIn - Bootstrapping Spring Data JPA repositories in DEFAULT mode.
|
||||
01-09-2022 12:58:52.735 [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate.registerRepositoriesIn - Finished Spring Data repository scanning in 242 ms. Found 3 JPA repository interfaces.
|
||||
01-09-2022 12:58:57.518 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer.initialize - Tomcat initialized with port(s): 9097 (http)
|
||||
01-09-2022 12:58:57.570 [main] INFO o.a.catalina.core.StandardService.log - Starting service [Tomcat]
|
||||
01-09-2022 12:58:57.574 [main] INFO o.a.catalina.core.StandardEngine.log - Starting Servlet engine: [Apache Tomcat/9.0.63]
|
||||
01-09-2022 12:58:58.274 [main] INFO o.s.b.w.s.c.ServletWebServerApplicationContext.prepareWebApplicationContext - Root WebApplicationContext: initialization completed in 8117 ms
|
||||
01-09-2022 12:58:59.246 [main] INFO o.h.jpa.internal.util.LogHelper.logPersistenceUnitInformation - HHH000204: Processing PersistenceUnitInfo [name: default]
|
||||
01-09-2022 12:58:59.404 [main] INFO org.hibernate.Version.logVersion - HHH000412: Hibernate ORM core version 5.5.3.Final
|
||||
01-09-2022 12:59:00.066 [main] INFO o.h.annotations.common.Version.<clinit> - HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
|
||||
01-09-2022 12:59:00.629 [main] INFO com.zaxxer.hikari.HikariDataSource.getConnection - HikariPool-1 - Starting...
|
||||
01-09-2022 12:59:01.358 [main] INFO com.zaxxer.hikari.HikariDataSource.getConnection - HikariPool-1 - Start completed.
|
||||
01-09-2022 12:59:01.408 [main] INFO org.hibernate.dialect.Dialect.<init> - HHH000400: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect
|
||||
01-09-2022 12:59:03.590 [main] INFO o.h.e.t.j.p.i.JtaPlatformInitiator.initiateService - HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
|
||||
01-09-2022 12:59:03.618 [main] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean.buildNativeEntityManagerFactory - Initialized JPA EntityManagerFactory for persistence unit 'default'
|
||||
01-09-2022 12:59:07.329 [main] INFO o.s.s.web.DefaultSecurityFilterChain.<init> - Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@6785786d, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@5c261c74, org.springframework.security.web.context.SecurityContextPersistenceFilter@1bb78ae, org.springframework.security.web.header.HeaderWriterFilter@662061e3, org.springframework.security.web.authentication.logout.LogoutFilter@6bcfb561, com.saslpay.config.JwtRequestFilter@2911db81, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@3ee2d546, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@6870a76f, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@6d38a81d, org.springframework.security.web.session.SessionManagementFilter@1f6ba47b, org.springframework.security.web.access.ExceptionTranslationFilter@30221cfa, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@3183a37c]
|
||||
01-09-2022 12:59:10.846 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer.start - Tomcat started on port(s): 9097 (http) with context path ''
|
||||
01-09-2022 12:59:11.460 [main] INFO o.a.c.s.b.CamelSpringBootApplicationListener.onCamelContextStarted - Starting CamelMainRunController to ensure the main thread keeps running
|
||||
01-09-2022 12:59:11.471 [main] INFO o.a.c.i.e.DefaultStreamCachingStrategy.doStart - StreamCaching in use with spool directory: C:\Users\agboola\AppData\Local\Temp\camel\camel-tmp-407E7C54CE435EA-0000000000000000 and rules: [Spool > 128K body size]
|
||||
01-09-2022 12:59:11.492 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Routes startup summary (total:1 started:1)
|
||||
01-09-2022 12:59:11.493 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Started Account Update (file://./app/intxns)
|
||||
01-09-2022 12:59:11.496 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Apache Camel 3.8.0 (camel-1) started in 553ms (build:97ms init:414ms start:42ms)
|
||||
01-09-2022 12:59:11.512 [main] INFO com.saslpay.SaslPayBkp.logStarted - Started SaslPayBkp in 23.786 seconds (JVM running for 27.175)
|
||||
01-09-2022 12:59:11.530 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.doStop - Apache Camel 3.8.0 (camel-1) shutting down (timeout:45s)
|
||||
01-09-2022 12:59:11.545 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.logRouteStopSummary - Routes shutdown summary (total:1 stopped:1)
|
||||
01-09-2022 12:59:11.546 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.logRouteStopSummary - Stopped Account Update (file://./app/intxns)
|
||||
01-09-2022 12:59:11.554 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.doStop - Apache Camel 3.8.0 (camel-1) shutdown in 24ms (uptime:100ms)
|
||||
01-09-2022 12:59:11.639 [SpringApplicationShutdownHook] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean.destroy - Closing JPA EntityManagerFactory for persistence unit 'default'
|
||||
01-09-2022 12:59:11.646 [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource.close - HikariPool-1 - Shutdown initiated...
|
||||
01-09-2022 12:59:11.672 [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource.close - HikariPool-1 - Shutdown completed.
|
||||
01-09-2022 12:59:25.985 [main] INFO com.saslpay.SaslPayBkp.logStarting - Starting SaslPayBkp using Java 1.8.0_341 on onasanya with PID 14800 (Z:\ideaProjects\saslInterfaceBkp\target\classes started by agboola in Z:\ideaProjects\saslInterfaceBkp)
|
||||
01-09-2022 12:59:26.001 [main] INFO com.saslpay.SaslPayBkp.logStartupProfileInfo - The following 1 profile is active: "production"
|
||||
01-09-2022 12:59:28.140 [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate.registerRepositoriesIn - Bootstrapping Spring Data JPA repositories in DEFAULT mode.
|
||||
01-09-2022 12:59:28.372 [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate.registerRepositoriesIn - Finished Spring Data repository scanning in 207 ms. Found 3 JPA repository interfaces.
|
||||
01-09-2022 12:59:31.744 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer.initialize - Tomcat initialized with port(s): 9097 (http)
|
||||
01-09-2022 12:59:31.776 [main] INFO o.a.catalina.core.StandardService.log - Starting service [Tomcat]
|
||||
01-09-2022 12:59:31.778 [main] INFO o.a.catalina.core.StandardEngine.log - Starting Servlet engine: [Apache Tomcat/9.0.63]
|
||||
01-09-2022 12:59:32.373 [main] INFO o.a.c.c.C.[Tomcat].[localhost].[/].log - Initializing Spring embedded WebApplicationContext
|
||||
01-09-2022 12:59:32.375 [main] INFO o.s.b.w.s.c.ServletWebServerApplicationContext.prepareWebApplicationContext - Root WebApplicationContext: initialization completed in 6198 ms
|
||||
01-09-2022 12:59:33.203 [main] INFO o.h.jpa.internal.util.LogHelper.logPersistenceUnitInformation - HHH000204: Processing PersistenceUnitInfo [name: default]
|
||||
01-09-2022 12:59:33.332 [main] INFO org.hibernate.Version.logVersion - HHH000412: Hibernate ORM core version 5.5.3.Final
|
||||
01-09-2022 12:59:33.822 [main] INFO o.h.annotations.common.Version.<clinit> - HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
|
||||
01-09-2022 12:59:34.320 [main] INFO com.zaxxer.hikari.HikariDataSource.getConnection - HikariPool-1 - Starting...
|
||||
01-09-2022 12:59:34.838 [main] INFO com.zaxxer.hikari.HikariDataSource.getConnection - HikariPool-1 - Start completed.
|
||||
01-09-2022 12:59:34.883 [main] INFO org.hibernate.dialect.Dialect.<init> - HHH000400: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect
|
||||
01-09-2022 12:59:36.725 [main] INFO o.h.e.t.j.p.i.JtaPlatformInitiator.initiateService - HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
|
||||
01-09-2022 12:59:36.752 [main] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean.buildNativeEntityManagerFactory - Initialized JPA EntityManagerFactory for persistence unit 'default'
|
||||
01-09-2022 12:59:41.390 [main] INFO o.s.s.web.DefaultSecurityFilterChain.<init> - Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@2526d5f9, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@6b529d42, org.springframework.security.web.context.SecurityContextPersistenceFilter@514f2020, org.springframework.security.web.header.HeaderWriterFilter@60251ddb, org.springframework.security.web.authentication.logout.LogoutFilter@684430c1, com.saslpay.config.JwtRequestFilter@c6d7256, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@2e1c5d1f, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@6a7ab205, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@459df48d, org.springframework.security.web.session.SessionManagementFilter@558ed473, org.springframework.security.web.access.ExceptionTranslationFilter@799206ad, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@7b364f47]
|
||||
01-09-2022 12:59:44.664 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer.start - Tomcat started on port(s): 9097 (http) with context path ''
|
||||
01-09-2022 12:59:45.349 [main] INFO o.a.c.s.b.CamelSpringBootApplicationListener.onCamelContextStarted - Starting CamelMainRunController to ensure the main thread keeps running
|
||||
01-09-2022 12:59:45.361 [main] INFO o.a.c.i.e.DefaultStreamCachingStrategy.doStart - StreamCaching in use with spool directory: C:\Users\agboola\AppData\Local\Temp\camel\camel-tmp-995659F6B13D71F-0000000000000000 and rules: [Spool > 128K body size]
|
||||
01-09-2022 12:59:45.382 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Routes startup summary (total:1 started:1)
|
||||
01-09-2022 12:59:45.383 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Started Account Update (file://./app/intxns)
|
||||
01-09-2022 12:59:45.384 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Apache Camel 3.8.0 (camel-1) started in 614ms (build:139ms init:434ms start:41ms)
|
||||
01-09-2022 12:59:45.399 [main] INFO com.saslpay.SaslPayBkp.logStarted - Started SaslPayBkp in 21.209 seconds (JVM running for 24.312)
|
||||
01-09-2022 12:59:54.480 [http-nio-9097-exec-2] INFO o.a.c.c.C.[Tomcat].[localhost].[/].log - Initializing Spring DispatcherServlet 'dispatcherServlet'
|
||||
01-09-2022 12:59:54.486 [http-nio-9097-exec-2] INFO o.s.web.servlet.DispatcherServlet.initServletBean - Initializing Servlet 'dispatcherServlet'
|
||||
01-09-2022 12:59:54.493 [http-nio-9097-exec-2] INFO o.s.web.servlet.DispatcherServlet.initServletBean - Completed initialization in 6 ms
|
||||
01-09-2022 12:59:56.382 [http-nio-9097-exec-2] INFO com.saslpay.log.SaslPayLog.log - {
|
||||
"txnCode": "",
|
||||
"ourTxnRef": "FT22244WGVEH6",
|
||||
"otherTxnRef": "TESTEXT122",
|
||||
"requestType": "",
|
||||
"api": "",
|
||||
"hold": "F",
|
||||
"bankWallet": "",
|
||||
"customerName": "",
|
||||
"customerBranch": "",
|
||||
"crAccount": "1",
|
||||
"drAccount": "2",
|
||||
"txnCurrency": "",
|
||||
"txnAmount": "0",
|
||||
"txnCharge": "0",
|
||||
"txnNarration": "",
|
||||
"elevyCharge": "0"
|
||||
}
|
||||
01-09-2022 12:59:56.712 [http-nio-9097-exec-2] INFO com.saslpay.log.SaslPayLog.log - {"txnCode" :"","api" :"","requestType" :"","otherTxnRef" :"TESTEXT122","drAccount" :"2","crAccount" :"1","ourTxnRef" :"","errorMsg" :"Transaction Already Reversed! - TESTEXT122","status" :"99"}
|
||||
01-09-2022 13:00:39.243 [http-nio-9097-exec-1] INFO com.saslpay.log.SaslPayLog.log - {
|
||||
"txnCode": "",
|
||||
"ourTxnRef": "FT22244NFVL3M",
|
||||
"otherTxnRef": "TESTEXT1223",
|
||||
"requestType": "",
|
||||
"api": "",
|
||||
"hold": "F",
|
||||
"bankWallet": "",
|
||||
"customerName": "",
|
||||
"customerBranch": "",
|
||||
"crAccount": "1",
|
||||
"drAccount": "2",
|
||||
"txnCurrency": "",
|
||||
"txnAmount": "0",
|
||||
"txnCharge": "0",
|
||||
"txnNarration": "",
|
||||
"elevyCharge": "0"
|
||||
}
|
||||
01-09-2022 13:02:21.806 [HikariPool-1 housekeeper] WARN com.zaxxer.hikari.pool.HikariPool.run - HikariPool-1 - Thread starvation or clock leap detected (housekeeper delta=1m46s825ms149µs).
|
||||
01-09-2022 13:02:21.896 [http-nio-9097-exec-1] ERROR o.a.c.c.C.[.[.[.[dispatcherServlet].log - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause
|
||||
java.lang.NullPointerException: null
|
||||
at com.saslpay.datacapture.ExtReversalCapture.extReversal(ExtReversalCapture.java:203)
|
||||
at com.saslpay.controller.TransactionDataController.postExtRev(TransactionDataController.java:38)
|
||||
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
|
||||
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
|
||||
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
|
||||
at java.lang.reflect.Method.invoke(Method.java:498)
|
||||
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
|
||||
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)
|
||||
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
|
||||
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
|
||||
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
|
||||
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
|
||||
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)
|
||||
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)
|
||||
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
|
||||
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
|
||||
at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)
|
||||
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
|
||||
at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)
|
||||
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)
|
||||
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)
|
||||
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)
|
||||
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at com.saslpay.config.JwtRequestFilter.doFilterInternal(JwtRequestFilter.java:82)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)
|
||||
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)
|
||||
at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:112)
|
||||
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:82)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)
|
||||
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)
|
||||
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)
|
||||
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
|
||||
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
|
||||
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
|
||||
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
|
||||
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
|
||||
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
|
||||
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
|
||||
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
|
||||
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
|
||||
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:890)
|
||||
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1743)
|
||||
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
|
||||
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
|
||||
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
|
||||
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
|
||||
at java.lang.Thread.run(Thread.java:750)
|
||||
01-09-2022 13:02:21.949 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.doStop - Apache Camel 3.8.0 (camel-1) shutting down (timeout:45s)
|
||||
01-09-2022 13:02:21.984 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.logRouteStopSummary - Routes shutdown summary (total:1 stopped:1)
|
||||
01-09-2022 13:02:21.985 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.logRouteStopSummary - Stopped Account Update (file://./app/intxns)
|
||||
01-09-2022 13:02:21.997 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.doStop - Apache Camel 3.8.0 (camel-1) shutdown in 48ms (uptime:2m36s)
|
||||
01-09-2022 13:02:22.343 [SpringApplicationShutdownHook] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean.destroy - Closing JPA EntityManagerFactory for persistence unit 'default'
|
||||
01-09-2022 13:02:22.356 [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource.close - HikariPool-1 - Shutdown initiated...
|
||||
01-09-2022 13:02:22.416 [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource.close - HikariPool-1 - Shutdown completed.
|
||||
01-09-2022 13:02:43.764 [main] INFO com.saslpay.SaslPayBkp.logStarting - Starting SaslPayBkp using Java 1.8.0_341 on onasanya with PID 9844 (Z:\ideaProjects\saslInterfaceBkp\target\classes started by agboola in Z:\ideaProjects\saslInterfaceBkp)
|
||||
01-09-2022 13:02:43.778 [main] INFO com.saslpay.SaslPayBkp.logStartupProfileInfo - The following 1 profile is active: "production"
|
||||
01-09-2022 13:02:45.895 [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate.registerRepositoriesIn - Bootstrapping Spring Data JPA repositories in DEFAULT mode.
|
||||
01-09-2022 13:02:46.133 [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate.registerRepositoriesIn - Finished Spring Data repository scanning in 210 ms. Found 3 JPA repository interfaces.
|
||||
01-09-2022 13:02:49.541 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer.initialize - Tomcat initialized with port(s): 9097 (http)
|
||||
01-09-2022 13:02:49.575 [main] INFO o.a.catalina.core.StandardService.log - Starting service [Tomcat]
|
||||
01-09-2022 13:02:49.577 [main] INFO o.a.catalina.core.StandardEngine.log - Starting Servlet engine: [Apache Tomcat/9.0.63]
|
||||
01-09-2022 13:02:50.198 [main] INFO o.a.c.c.C.[Tomcat].[localhost].[/].log - Initializing Spring embedded WebApplicationContext
|
||||
01-09-2022 13:02:50.201 [main] INFO o.s.b.w.s.c.ServletWebServerApplicationContext.prepareWebApplicationContext - Root WebApplicationContext: initialization completed in 6224 ms
|
||||
01-09-2022 13:02:51.005 [main] INFO o.h.jpa.internal.util.LogHelper.logPersistenceUnitInformation - HHH000204: Processing PersistenceUnitInfo [name: default]
|
||||
01-09-2022 13:02:51.151 [main] INFO org.hibernate.Version.logVersion - HHH000412: Hibernate ORM core version 5.5.3.Final
|
||||
01-09-2022 13:02:51.667 [main] INFO o.h.annotations.common.Version.<clinit> - HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
|
||||
01-09-2022 13:02:52.160 [main] INFO com.zaxxer.hikari.HikariDataSource.getConnection - HikariPool-1 - Starting...
|
||||
01-09-2022 13:02:52.689 [main] INFO com.zaxxer.hikari.HikariDataSource.getConnection - HikariPool-1 - Start completed.
|
||||
01-09-2022 13:02:52.735 [main] INFO org.hibernate.dialect.Dialect.<init> - HHH000400: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect
|
||||
01-09-2022 13:02:54.531 [main] INFO o.h.e.t.j.p.i.JtaPlatformInitiator.initiateService - HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
|
||||
01-09-2022 13:02:54.562 [main] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean.buildNativeEntityManagerFactory - Initialized JPA EntityManagerFactory for persistence unit 'default'
|
||||
01-09-2022 13:02:59.183 [main] INFO o.s.s.web.DefaultSecurityFilterChain.<init> - Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@6785786d, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@5c261c74, org.springframework.security.web.context.SecurityContextPersistenceFilter@1bb78ae, org.springframework.security.web.header.HeaderWriterFilter@662061e3, org.springframework.security.web.authentication.logout.LogoutFilter@6bcfb561, com.saslpay.config.JwtRequestFilter@782143e8, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@3ee2d546, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@6870a76f, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@6d38a81d, org.springframework.security.web.session.SessionManagementFilter@1f6ba47b, org.springframework.security.web.access.ExceptionTranslationFilter@30221cfa, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@3183a37c]
|
||||
01-09-2022 13:03:02.539 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer.start - Tomcat started on port(s): 9097 (http) with context path ''
|
||||
01-09-2022 13:03:03.193 [main] INFO o.a.c.s.b.CamelSpringBootApplicationListener.onCamelContextStarted - Starting CamelMainRunController to ensure the main thread keeps running
|
||||
01-09-2022 13:03:03.204 [main] INFO o.a.c.i.e.DefaultStreamCachingStrategy.doStart - StreamCaching in use with spool directory: C:\Users\agboola\AppData\Local\Temp\camel\camel-tmp-7404AA6078BC8D8-0000000000000000 and rules: [Spool > 128K body size]
|
||||
01-09-2022 13:03:03.225 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Routes startup summary (total:1 started:1)
|
||||
01-09-2022 13:03:03.226 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Started Account Update (file://./app/intxns)
|
||||
01-09-2022 13:03:03.227 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Apache Camel 3.8.0 (camel-1) started in 612ms (build:143ms init:428ms start:41ms)
|
||||
01-09-2022 13:03:03.242 [main] INFO com.saslpay.SaslPayBkp.logStarted - Started SaslPayBkp in 21.386 seconds (JVM running for 24.593)
|
||||
01-09-2022 13:03:50.664 [http-nio-9097-exec-1] INFO o.a.c.c.C.[Tomcat].[localhost].[/].log - Initializing Spring DispatcherServlet 'dispatcherServlet'
|
||||
01-09-2022 13:03:50.668 [http-nio-9097-exec-1] INFO o.s.web.servlet.DispatcherServlet.initServletBean - Initializing Servlet 'dispatcherServlet'
|
||||
01-09-2022 13:03:50.675 [http-nio-9097-exec-1] INFO o.s.web.servlet.DispatcherServlet.initServletBean - Completed initialization in 6 ms
|
||||
01-09-2022 13:03:52.575 [http-nio-9097-exec-1] INFO com.saslpay.log.SaslPayLog.log - {
|
||||
"txnCode": "",
|
||||
"ourTxnRef": "FT22244K6J5GQ",
|
||||
"otherTxnRef": "TESTEXT12234",
|
||||
"requestType": "",
|
||||
"api": "",
|
||||
"hold": "F",
|
||||
"bankWallet": "",
|
||||
"customerName": "",
|
||||
"customerBranch": "",
|
||||
"crAccount": "1",
|
||||
"drAccount": "2",
|
||||
"txnCurrency": "",
|
||||
"txnAmount": "0",
|
||||
"txnCharge": "0",
|
||||
"txnNarration": "",
|
||||
"elevyCharge": "0"
|
||||
}
|
||||
01-09-2022 13:07:46.799 [HikariPool-1 housekeeper] WARN com.zaxxer.hikari.pool.HikariPool.run - HikariPool-1 - Thread starvation or clock leap detected (housekeeper delta=3m53s959ms996µs833ns).
|
||||
01-09-2022 13:07:46.850 [http-nio-9097-exec-1] ERROR o.a.c.c.C.[.[.[.[dispatcherServlet].log - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause
|
||||
java.lang.NullPointerException: null
|
||||
at com.saslpay.datacapture.ExtReversalCapture.extReversal(ExtReversalCapture.java:203)
|
||||
at com.saslpay.controller.TransactionDataController.postExtRev(TransactionDataController.java:38)
|
||||
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
|
||||
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
|
||||
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
|
||||
at java.lang.reflect.Method.invoke(Method.java:498)
|
||||
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
|
||||
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)
|
||||
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
|
||||
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
|
||||
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
|
||||
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
|
||||
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)
|
||||
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)
|
||||
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
|
||||
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
|
||||
at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)
|
||||
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
|
||||
at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)
|
||||
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)
|
||||
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)
|
||||
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)
|
||||
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at com.saslpay.config.JwtRequestFilter.doFilterInternal(JwtRequestFilter.java:82)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)
|
||||
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)
|
||||
at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:112)
|
||||
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:82)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)
|
||||
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)
|
||||
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)
|
||||
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
|
||||
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
|
||||
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
|
||||
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
|
||||
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
|
||||
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
|
||||
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
|
||||
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
|
||||
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
|
||||
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:890)
|
||||
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1743)
|
||||
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
|
||||
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
|
||||
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
|
||||
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
|
||||
at java.lang.Thread.run(Thread.java:750)
|
||||
01-09-2022 13:07:46.880 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.doStop - Apache Camel 3.8.0 (camel-1) shutting down (timeout:45s)
|
||||
01-09-2022 13:07:46.908 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.logRouteStopSummary - Routes shutdown summary (total:1 stopped:1)
|
||||
01-09-2022 13:07:46.909 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.logRouteStopSummary - Stopped Account Update (file://./app/intxns)
|
||||
01-09-2022 13:07:46.919 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.doStop - Apache Camel 3.8.0 (camel-1) shutdown in 40ms (uptime:4m43s)
|
||||
01-09-2022 13:07:47.164 [SpringApplicationShutdownHook] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean.destroy - Closing JPA EntityManagerFactory for persistence unit 'default'
|
||||
01-09-2022 13:07:47.186 [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource.close - HikariPool-1 - Shutdown initiated...
|
||||
01-09-2022 13:07:47.278 [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource.close - HikariPool-1 - Shutdown completed.
|
||||
01-09-2022 13:08:03.367 [main] INFO com.saslpay.SaslPayBkp.logStarting - Starting SaslPayBkp using Java 1.8.0_341 on onasanya with PID 8808 (Z:\ideaProjects\saslInterfaceBkp\target\classes started by agboola in Z:\ideaProjects\saslInterfaceBkp)
|
||||
01-09-2022 13:08:03.381 [main] INFO com.saslpay.SaslPayBkp.logStartupProfileInfo - The following 1 profile is active: "production"
|
||||
01-09-2022 13:08:05.595 [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate.registerRepositoriesIn - Bootstrapping Spring Data JPA repositories in DEFAULT mode.
|
||||
01-09-2022 13:08:05.953 [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate.registerRepositoriesIn - Finished Spring Data repository scanning in 312 ms. Found 3 JPA repository interfaces.
|
||||
01-09-2022 13:08:09.719 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer.initialize - Tomcat initialized with port(s): 9097 (http)
|
||||
01-09-2022 13:08:09.753 [main] INFO o.a.catalina.core.StandardService.log - Starting service [Tomcat]
|
||||
01-09-2022 13:08:09.755 [main] INFO o.a.catalina.core.StandardEngine.log - Starting Servlet engine: [Apache Tomcat/9.0.63]
|
||||
01-09-2022 13:08:10.393 [main] INFO o.a.c.c.C.[Tomcat].[localhost].[/].log - Initializing Spring embedded WebApplicationContext
|
||||
01-09-2022 13:08:10.395 [main] INFO o.s.b.w.s.c.ServletWebServerApplicationContext.prepareWebApplicationContext - Root WebApplicationContext: initialization completed in 6846 ms
|
||||
01-09-2022 13:08:11.260 [main] INFO o.h.jpa.internal.util.LogHelper.logPersistenceUnitInformation - HHH000204: Processing PersistenceUnitInfo [name: default]
|
||||
01-09-2022 13:08:11.410 [main] INFO org.hibernate.Version.logVersion - HHH000412: Hibernate ORM core version 5.5.3.Final
|
||||
01-09-2022 13:08:11.915 [main] INFO o.h.annotations.common.Version.<clinit> - HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
|
||||
01-09-2022 13:08:12.394 [main] INFO com.zaxxer.hikari.HikariDataSource.getConnection - HikariPool-1 - Starting...
|
||||
01-09-2022 13:08:12.892 [main] INFO com.zaxxer.hikari.HikariDataSource.getConnection - HikariPool-1 - Start completed.
|
||||
01-09-2022 13:08:12.936 [main] INFO org.hibernate.dialect.Dialect.<init> - HHH000400: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect
|
||||
01-09-2022 13:08:14.804 [main] INFO o.h.e.t.j.p.i.JtaPlatformInitiator.initiateService - HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
|
||||
01-09-2022 13:08:14.830 [main] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean.buildNativeEntityManagerFactory - Initialized JPA EntityManagerFactory for persistence unit 'default'
|
||||
01-09-2022 13:08:19.805 [main] INFO o.s.s.web.DefaultSecurityFilterChain.<init> - Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@5c261c74, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@6d38a81d, org.springframework.security.web.context.SecurityContextPersistenceFilter@3ee2d546, org.springframework.security.web.header.HeaderWriterFilter@1921b43c, org.springframework.security.web.authentication.logout.LogoutFilter@7254a68a, com.saslpay.config.JwtRequestFilter@279e8bc0, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@58be583e, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@42257df7, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@41f61188, org.springframework.security.web.session.SessionManagementFilter@1bb78ae, org.springframework.security.web.access.ExceptionTranslationFilter@662061e3, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@31a80c88]
|
||||
01-09-2022 13:08:23.432 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer.start - Tomcat started on port(s): 9097 (http) with context path ''
|
||||
01-09-2022 13:08:24.190 [main] INFO o.a.c.s.b.CamelSpringBootApplicationListener.onCamelContextStarted - Starting CamelMainRunController to ensure the main thread keeps running
|
||||
01-09-2022 13:08:24.202 [main] INFO o.a.c.i.e.DefaultStreamCachingStrategy.doStart - StreamCaching in use with spool directory: C:\Users\agboola\AppData\Local\Temp\camel\camel-tmp-049D46133FE8DEB-0000000000000000 and rules: [Spool > 128K body size]
|
||||
01-09-2022 13:08:24.225 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Routes startup summary (total:1 started:1)
|
||||
01-09-2022 13:08:24.227 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Started Account Update (file://./app/intxns)
|
||||
01-09-2022 13:08:24.228 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Apache Camel 3.8.0 (camel-1) started in 664ms (build:173ms init:445ms start:46ms)
|
||||
01-09-2022 13:08:24.246 [main] INFO com.saslpay.SaslPayBkp.logStarted - Started SaslPayBkp in 22.683 seconds (JVM running for 25.612)
|
||||
01-09-2022 13:08:28.383 [http-nio-9097-exec-1] INFO o.a.c.c.C.[Tomcat].[localhost].[/].log - Initializing Spring DispatcherServlet 'dispatcherServlet'
|
||||
01-09-2022 13:08:28.386 [http-nio-9097-exec-1] INFO o.s.web.servlet.DispatcherServlet.initServletBean - Initializing Servlet 'dispatcherServlet'
|
||||
01-09-2022 13:08:28.390 [http-nio-9097-exec-1] INFO o.s.web.servlet.DispatcherServlet.initServletBean - Completed initialization in 3 ms
|
||||
01-09-2022 13:08:30.082 [http-nio-9097-exec-1] INFO com.saslpay.log.SaslPayLog.log - {
|
||||
"txnCode": "",
|
||||
"ourTxnRef": "FT22244K6J5GQ",
|
||||
"otherTxnRef": "TESTEXT12234",
|
||||
"requestType": "",
|
||||
"api": "",
|
||||
"hold": "F",
|
||||
"bankWallet": "",
|
||||
"customerName": "",
|
||||
"customerBranch": "",
|
||||
"crAccount": "1",
|
||||
"drAccount": "2",
|
||||
"txnCurrency": "",
|
||||
"txnAmount": "0",
|
||||
"txnCharge": "0",
|
||||
"txnNarration": "",
|
||||
"elevyCharge": "0"
|
||||
}
|
||||
01-09-2022 13:08:30.356 [http-nio-9097-exec-1] INFO com.saslpay.log.SaslPayLog.log - {"txnCode" :"","api" :"","requestType" :"","otherTxnRef" :"TESTEXT12234","drAccount" :"2","crAccount" :"1","ourTxnRef" :"","errorMsg" :"Transaction Already Reversed! - TESTEXT12234","status" :"99"}
|
||||
01-09-2022 13:09:24.574 [http-nio-9097-exec-2] INFO com.saslpay.log.SaslPayLog.log - {
|
||||
"txnCode": "",
|
||||
"ourTxnRef": "FT22244WKGI1C",
|
||||
"otherTxnRef": "TESTEXT1235",
|
||||
"requestType": "",
|
||||
"api": "",
|
||||
"hold": "F",
|
||||
"bankWallet": "",
|
||||
"customerName": "",
|
||||
"customerBranch": "",
|
||||
"crAccount": "1",
|
||||
"drAccount": "2",
|
||||
"txnCurrency": "",
|
||||
"txnAmount": "0",
|
||||
"txnCharge": "0",
|
||||
"txnNarration": "",
|
||||
"elevyCharge": "0"
|
||||
}
|
||||
01-09-2022 13:10:09.938 [HikariPool-1 housekeeper] WARN com.zaxxer.hikari.pool.HikariPool.run - HikariPool-1 - Thread starvation or clock leap detected (housekeeper delta=56s910ms295µs417ns).
|
||||
01-09-2022 13:10:10.001 [http-nio-9097-exec-3] INFO com.saslpay.log.SaslPayLog.log - {
|
||||
"txnCode": "extDebTrf",
|
||||
"ourTxnRef": "FT22244WKGI1C",
|
||||
"otherTxnRef": "TESTEXT1235",
|
||||
"requestType": "",
|
||||
"api": "",
|
||||
"hold": "F",
|
||||
"bankWallet": "",
|
||||
"customerName": "",
|
||||
"customerBranch": "",
|
||||
"crAccount": "1",
|
||||
"drAccount": "2",
|
||||
"txnCurrency": "",
|
||||
"txnAmount": "0",
|
||||
"txnCharge": "0",
|
||||
"txnNarration": "",
|
||||
"elevyCharge": "0"
|
||||
}
|
||||
01-09-2022 13:10:09.996 [http-nio-9097-exec-2] ERROR o.a.c.c.C.[.[.[.[dispatcherServlet].log - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause
|
||||
java.lang.NullPointerException: null
|
||||
at com.saslpay.datacapture.ExtReversalCapture.extReversal(ExtReversalCapture.java:203)
|
||||
at com.saslpay.controller.TransactionDataController.postExtRev(TransactionDataController.java:38)
|
||||
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
|
||||
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
|
||||
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
|
||||
at java.lang.reflect.Method.invoke(Method.java:498)
|
||||
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
|
||||
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)
|
||||
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
|
||||
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
|
||||
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
|
||||
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
|
||||
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)
|
||||
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)
|
||||
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
|
||||
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
|
||||
at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)
|
||||
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
|
||||
at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)
|
||||
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)
|
||||
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)
|
||||
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)
|
||||
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at com.saslpay.config.JwtRequestFilter.doFilterInternal(JwtRequestFilter.java:82)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)
|
||||
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)
|
||||
at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:112)
|
||||
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:82)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
|
||||
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
|
||||
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)
|
||||
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)
|
||||
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)
|
||||
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
|
||||
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
|
||||
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
|
||||
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
|
||||
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
|
||||
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
|
||||
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
|
||||
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
|
||||
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
|
||||
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:890)
|
||||
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1743)
|
||||
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
|
||||
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
|
||||
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
|
||||
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
|
||||
at java.lang.Thread.run(Thread.java:750)
|
||||
01-09-2022 13:10:10.039 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.doStop - Apache Camel 3.8.0 (camel-1) shutting down (timeout:45s)
|
||||
01-09-2022 13:10:10.041 [http-nio-9097-exec-3] INFO com.saslpay.log.SaslPayLog.log - {"txnCode" :"extDebTrf","api" :"","requestType" :"","otherTxnRef" :"TESTEXT1235","drAccount" :"2","crAccount" :"1","ourTxnRef" :"","errorMsg" :"Debit Account Number - 2 Does Not Exist","status" :"99"}
|
||||
01-09-2022 13:10:10.069 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.logRouteStopSummary - Routes shutdown summary (total:1 stopped:1)
|
||||
01-09-2022 13:10:10.071 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.logRouteStopSummary - Stopped Account Update (file://./app/intxns)
|
||||
01-09-2022 13:10:10.083 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.doStop - Apache Camel 3.8.0 (camel-1) shutdown in 45ms (uptime:1m45s)
|
||||
01-09-2022 13:10:10.299 [SpringApplicationShutdownHook] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean.destroy - Closing JPA EntityManagerFactory for persistence unit 'default'
|
||||
01-09-2022 13:10:10.328 [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource.close - HikariPool-1 - Shutdown initiated...
|
||||
01-09-2022 13:10:10.368 [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource.close - HikariPool-1 - Shutdown completed.
|
||||
01-09-2022 13:10:24.739 [main] INFO com.saslpay.SaslPayBkp.logStarting - Starting SaslPayBkp using Java 1.8.0_341 on onasanya with PID 7828 (Z:\ideaProjects\saslInterfaceBkp\target\classes started by agboola in Z:\ideaProjects\saslInterfaceBkp)
|
||||
01-09-2022 13:10:24.753 [main] INFO com.saslpay.SaslPayBkp.logStartupProfileInfo - The following 1 profile is active: "production"
|
||||
01-09-2022 13:10:26.879 [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate.registerRepositoriesIn - Bootstrapping Spring Data JPA repositories in DEFAULT mode.
|
||||
01-09-2022 13:10:27.122 [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate.registerRepositoriesIn - Finished Spring Data repository scanning in 218 ms. Found 3 JPA repository interfaces.
|
||||
01-09-2022 13:10:30.533 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer.initialize - Tomcat initialized with port(s): 9097 (http)
|
||||
01-09-2022 13:10:30.569 [main] INFO o.a.catalina.core.StandardService.log - Starting service [Tomcat]
|
||||
01-09-2022 13:10:30.571 [main] INFO o.a.catalina.core.StandardEngine.log - Starting Servlet engine: [Apache Tomcat/9.0.63]
|
||||
01-09-2022 13:10:31.215 [main] INFO o.a.c.c.C.[Tomcat].[localhost].[/].log - Initializing Spring embedded WebApplicationContext
|
||||
01-09-2022 13:10:31.217 [main] INFO o.s.b.w.s.c.ServletWebServerApplicationContext.prepareWebApplicationContext - Root WebApplicationContext: initialization completed in 6269 ms
|
||||
01-09-2022 13:10:32.039 [main] INFO o.h.jpa.internal.util.LogHelper.logPersistenceUnitInformation - HHH000204: Processing PersistenceUnitInfo [name: default]
|
||||
01-09-2022 13:10:32.186 [main] INFO org.hibernate.Version.logVersion - HHH000412: Hibernate ORM core version 5.5.3.Final
|
||||
01-09-2022 13:10:32.689 [main] INFO o.h.annotations.common.Version.<clinit> - HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
|
||||
01-09-2022 13:10:33.176 [main] INFO com.zaxxer.hikari.HikariDataSource.getConnection - HikariPool-1 - Starting...
|
||||
01-09-2022 13:10:33.673 [main] INFO com.zaxxer.hikari.HikariDataSource.getConnection - HikariPool-1 - Start completed.
|
||||
01-09-2022 13:10:33.716 [main] INFO org.hibernate.dialect.Dialect.<init> - HHH000400: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect
|
||||
01-09-2022 13:10:35.600 [main] INFO o.h.e.t.j.p.i.JtaPlatformInitiator.initiateService - HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
|
||||
01-09-2022 13:10:35.626 [main] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean.buildNativeEntityManagerFactory - Initialized JPA EntityManagerFactory for persistence unit 'default'
|
||||
01-09-2022 13:10:40.333 [main] INFO o.s.s.web.DefaultSecurityFilterChain.<init> - Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@311453ab, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@7ef3aa21, org.springframework.security.web.context.SecurityContextPersistenceFilter@30221cfa, org.springframework.security.web.header.HeaderWriterFilter@eb1e868, org.springframework.security.web.authentication.logout.LogoutFilter@2823b7c5, com.saslpay.config.JwtRequestFilter@337fb1a5, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@662061e3, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@3c4e17ea, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@2dd4a7a9, org.springframework.security.web.session.SessionManagementFilter@4bc9389, org.springframework.security.web.access.ExceptionTranslationFilter@27107a97, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@17c72ffa]
|
||||
01-09-2022 13:10:43.705 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer.start - Tomcat started on port(s): 9097 (http) with context path ''
|
||||
01-09-2022 13:10:44.418 [main] INFO o.a.c.s.b.CamelSpringBootApplicationListener.onCamelContextStarted - Starting CamelMainRunController to ensure the main thread keeps running
|
||||
01-09-2022 13:10:44.430 [main] INFO o.a.c.i.e.DefaultStreamCachingStrategy.doStart - StreamCaching in use with spool directory: C:\Users\agboola\AppData\Local\Temp\camel\camel-tmp-6A2D42AD5D08FE9-0000000000000000 and rules: [Spool > 128K body size]
|
||||
01-09-2022 13:10:44.455 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Routes startup summary (total:1 started:1)
|
||||
01-09-2022 13:10:44.457 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Started Account Update (file://./app/intxns)
|
||||
01-09-2022 13:10:44.457 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Apache Camel 3.8.0 (camel-1) started in 635ms (build:132ms init:456ms start:47ms)
|
||||
01-09-2022 13:10:44.473 [main] INFO com.saslpay.SaslPayBkp.logStarted - Started SaslPayBkp in 21.386 seconds (JVM running for 24.507)
|
||||
01-09-2022 13:11:01.000 [http-nio-9097-exec-1] INFO o.a.c.c.C.[Tomcat].[localhost].[/].log - Initializing Spring DispatcherServlet 'dispatcherServlet'
|
||||
01-09-2022 13:11:01.004 [http-nio-9097-exec-1] INFO o.s.web.servlet.DispatcherServlet.initServletBean - Initializing Servlet 'dispatcherServlet'
|
||||
01-09-2022 13:11:01.010 [http-nio-9097-exec-1] INFO o.s.web.servlet.DispatcherServlet.initServletBean - Completed initialization in 5 ms
|
||||
01-09-2022 13:11:02.724 [http-nio-9097-exec-1] INFO com.saslpay.log.SaslPayLog.log - {
|
||||
"txnCode": "extDebTrf",
|
||||
"ourTxnRef": "FT22244XQCJGW",
|
||||
"otherTxnRef": "TESTEXT1236",
|
||||
"requestType": "",
|
||||
"api": "",
|
||||
"hold": "F",
|
||||
"bankWallet": "",
|
||||
"customerName": "",
|
||||
"customerBranch": "",
|
||||
"crAccount": "1",
|
||||
"drAccount": "2",
|
||||
"txnCurrency": "",
|
||||
"txnAmount": "0",
|
||||
"txnCharge": "0",
|
||||
"txnNarration": "",
|
||||
"elevyCharge": "0"
|
||||
}
|
||||
01-09-2022 13:11:32.235 [HikariPool-1 housekeeper] WARN com.zaxxer.hikari.pool.HikariPool.run - HikariPool-1 - Thread starvation or clock leap detected (housekeeper delta=58s459ms961µs250ns).
|
||||
01-09-2022 13:11:32.259 [http-nio-9097-exec-1] INFO com.saslpay.log.SaslPayLog.log - {"txnCode" :"extDebTrf","api" :"","requestType" :"","otherTxnRef" :"TESTEXT1236","drAccount" :"2","crAccount" :"1","ourTxnRef" :"","errorMsg" :"Debit Account Number - 2 Does Not Exist","status" :"99"}
|
||||
01-09-2022 13:11:32.306 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.doStop - Apache Camel 3.8.0 (camel-1) shutting down (timeout:45s)
|
||||
01-09-2022 13:11:32.337 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.logRouteStopSummary - Routes shutdown summary (total:1 stopped:1)
|
||||
01-09-2022 13:11:32.339 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.logRouteStopSummary - Stopped Account Update (file://./app/intxns)
|
||||
01-09-2022 13:11:32.353 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.doStop - Apache Camel 3.8.0 (camel-1) shutdown in 46ms (uptime:47s943ms)
|
||||
01-09-2022 13:11:32.448 [SpringApplicationShutdownHook] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean.destroy - Closing JPA EntityManagerFactory for persistence unit 'default'
|
||||
01-09-2022 13:11:32.458 [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource.close - HikariPool-1 - Shutdown initiated...
|
||||
01-09-2022 13:11:32.485 [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource.close - HikariPool-1 - Shutdown completed.
|
||||
01-09-2022 13:13:18.987 [main] INFO com.saslpay.SaslPayBkp.logStarting - Starting SaslPayBkp using Java 1.8.0_341 on onasanya with PID 7704 (Z:\ideaProjects\saslInterfaceBkp\target\classes started by agboola in Z:\ideaProjects\saslInterfaceBkp)
|
||||
01-09-2022 13:13:18.999 [main] INFO com.saslpay.SaslPayBkp.logStartupProfileInfo - The following 1 profile is active: "production"
|
||||
01-09-2022 13:13:21.094 [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate.registerRepositoriesIn - Bootstrapping Spring Data JPA repositories in DEFAULT mode.
|
||||
01-09-2022 13:13:21.296 [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate.registerRepositoriesIn - Finished Spring Data repository scanning in 180 ms. Found 3 JPA repository interfaces.
|
||||
01-09-2022 13:13:24.226 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer.initialize - Tomcat initialized with port(s): 9097 (http)
|
||||
01-09-2022 13:13:24.251 [main] INFO o.a.catalina.core.StandardService.log - Starting service [Tomcat]
|
||||
01-09-2022 13:13:24.253 [main] INFO o.a.catalina.core.StandardEngine.log - Starting Servlet engine: [Apache Tomcat/9.0.63]
|
||||
01-09-2022 13:13:24.751 [main] INFO o.a.c.c.C.[Tomcat].[localhost].[/].log - Initializing Spring embedded WebApplicationContext
|
||||
01-09-2022 13:13:24.752 [main] INFO o.s.b.w.s.c.ServletWebServerApplicationContext.prepareWebApplicationContext - Root WebApplicationContext: initialization completed in 5509 ms
|
||||
01-09-2022 13:13:25.495 [main] INFO o.h.jpa.internal.util.LogHelper.logPersistenceUnitInformation - HHH000204: Processing PersistenceUnitInfo [name: default]
|
||||
01-09-2022 13:13:25.655 [main] INFO org.hibernate.Version.logVersion - HHH000412: Hibernate ORM core version 5.5.3.Final
|
||||
01-09-2022 13:13:26.091 [main] INFO o.h.annotations.common.Version.<clinit> - HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
|
||||
01-09-2022 13:13:26.511 [main] INFO com.zaxxer.hikari.HikariDataSource.getConnection - HikariPool-1 - Starting...
|
||||
01-09-2022 13:13:26.955 [main] INFO com.zaxxer.hikari.HikariDataSource.getConnection - HikariPool-1 - Start completed.
|
||||
01-09-2022 13:13:26.992 [main] INFO org.hibernate.dialect.Dialect.<init> - HHH000400: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect
|
||||
01-09-2022 13:13:28.634 [main] INFO o.h.e.t.j.p.i.JtaPlatformInitiator.initiateService - HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
|
||||
01-09-2022 13:13:28.658 [main] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean.buildNativeEntityManagerFactory - Initialized JPA EntityManagerFactory for persistence unit 'default'
|
||||
01-09-2022 13:13:31.163 [main] INFO o.s.s.web.DefaultSecurityFilterChain.<init> - Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@ca2cd5e, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@a120b9, org.springframework.security.web.context.SecurityContextPersistenceFilter@29c244e, org.springframework.security.web.header.HeaderWriterFilter@24fc2c80, org.springframework.security.web.authentication.logout.LogoutFilter@126675fd, com.saslpay.config.JwtRequestFilter@1410d645, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@39a3984c, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@686b1e2d, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@333e5fb6, org.springframework.security.web.session.SessionManagementFilter@48b3b1b8, org.springframework.security.web.access.ExceptionTranslationFilter@42f9873e, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@69a90b81]
|
||||
01-09-2022 13:13:33.767 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer.start - Tomcat started on port(s): 9097 (http) with context path ''
|
||||
01-09-2022 13:13:34.263 [main] INFO o.a.c.s.b.CamelSpringBootApplicationListener.onCamelContextStarted - Starting CamelMainRunController to ensure the main thread keeps running
|
||||
01-09-2022 13:13:34.271 [main] INFO o.a.c.i.e.DefaultStreamCachingStrategy.doStart - StreamCaching in use with spool directory: C:\Users\agboola\AppData\Local\Temp\camel\camel-tmp-8313816169C3F6B-0000000000000000 and rules: [Spool > 128K body size]
|
||||
01-09-2022 13:13:34.284 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Routes startup summary (total:1 started:1)
|
||||
01-09-2022 13:13:34.285 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Started Account Update (file://./app/intxns)
|
||||
01-09-2022 13:13:34.285 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Apache Camel 3.8.0 (camel-1) started in 447ms (build:94ms init:326ms start:27ms)
|
||||
01-09-2022 13:13:34.294 [main] INFO com.saslpay.SaslPayBkp.logStarted - Started SaslPayBkp in 17.14 seconds (JVM running for 19.048)
|
||||
01-09-2022 13:19:12.108 [http-nio-9097-exec-1] INFO o.a.c.c.C.[Tomcat].[localhost].[/].log - Initializing Spring DispatcherServlet 'dispatcherServlet'
|
||||
01-09-2022 13:19:12.115 [http-nio-9097-exec-1] INFO o.s.web.servlet.DispatcherServlet.initServletBean - Initializing Servlet 'dispatcherServlet'
|
||||
01-09-2022 13:19:12.128 [http-nio-9097-exec-1] INFO o.s.web.servlet.DispatcherServlet.initServletBean - Completed initialization in 12 ms
|
||||
01-09-2022 13:19:13.491 [http-nio-9097-exec-1] INFO com.saslpay.log.SaslPayLog.log - {
|
||||
"txnCode": "extDebTrf",
|
||||
"ourTxnRef": "FT22244VQD0F3",
|
||||
"otherTxnRef": "TESTEXT1237",
|
||||
"requestType": "",
|
||||
"api": "",
|
||||
"hold": "F",
|
||||
"bankWallet": "",
|
||||
"customerName": "",
|
||||
"customerBranch": "",
|
||||
"crAccount": "1",
|
||||
"drAccount": "2",
|
||||
"txnCurrency": "",
|
||||
"txnAmount": "0",
|
||||
"txnCharge": "0",
|
||||
"txnNarration": "",
|
||||
"elevyCharge": "0"
|
||||
}
|
||||
01-09-2022 13:19:14.064 [http-nio-9097-exec-1] INFO com.saslpay.log.SaslPayLog.log - {"txnCode" :"extDebTrf","api" :"","requestType" :"","otherTxnRef" :"TESTEXT1237","drAccount" :"010700319301","crAccount" :"010700319301","ourTxnRef" :"","errorMsg" :"","status" :"00"}
|
||||
01-09-2022 13:26:26.116 [main] INFO com.saslpay.SaslPayBkp.logStarting - Starting SaslPayBkp using Java 1.8.0_341 on onasanya with PID 5152 (Z:\ideaProjects\saslInterfaceBkp\target\classes started by agboola in Z:\ideaProjects\saslInterfaceBkp)
|
||||
01-09-2022 13:26:26.130 [main] INFO com.saslpay.SaslPayBkp.logStartupProfileInfo - The following 1 profile is active: "production"
|
||||
01-09-2022 13:26:28.311 [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate.registerRepositoriesIn - Bootstrapping Spring Data JPA repositories in DEFAULT mode.
|
||||
01-09-2022 13:26:28.521 [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate.registerRepositoriesIn - Finished Spring Data repository scanning in 187 ms. Found 3 JPA repository interfaces.
|
||||
01-09-2022 13:26:31.526 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer.initialize - Tomcat initialized with port(s): 9097 (http)
|
||||
01-09-2022 13:26:31.551 [main] INFO o.a.catalina.core.StandardService.log - Starting service [Tomcat]
|
||||
01-09-2022 13:26:31.552 [main] INFO o.a.catalina.core.StandardEngine.log - Starting Servlet engine: [Apache Tomcat/9.0.63]
|
||||
01-09-2022 13:26:32.068 [main] INFO o.a.c.c.C.[Tomcat].[localhost].[/].log - Initializing Spring embedded WebApplicationContext
|
||||
01-09-2022 13:26:32.070 [main] INFO o.s.b.w.s.c.ServletWebServerApplicationContext.prepareWebApplicationContext - Root WebApplicationContext: initialization completed in 5575 ms
|
||||
01-09-2022 13:26:32.933 [main] INFO o.h.jpa.internal.util.LogHelper.logPersistenceUnitInformation - HHH000204: Processing PersistenceUnitInfo [name: default]
|
||||
01-09-2022 13:26:33.058 [main] INFO org.hibernate.Version.logVersion - HHH000412: Hibernate ORM core version 5.5.3.Final
|
||||
01-09-2022 13:26:33.497 [main] INFO o.h.annotations.common.Version.<clinit> - HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
|
||||
01-09-2022 13:26:33.931 [main] INFO com.zaxxer.hikari.HikariDataSource.getConnection - HikariPool-1 - Starting...
|
||||
01-09-2022 13:26:34.390 [main] INFO com.zaxxer.hikari.HikariDataSource.getConnection - HikariPool-1 - Start completed.
|
||||
01-09-2022 13:26:34.429 [main] INFO org.hibernate.dialect.Dialect.<init> - HHH000400: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect
|
||||
01-09-2022 13:26:36.059 [main] INFO o.h.e.t.j.p.i.JtaPlatformInitiator.initiateService - HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
|
||||
01-09-2022 13:26:36.081 [main] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean.buildNativeEntityManagerFactory - Initialized JPA EntityManagerFactory for persistence unit 'default'
|
||||
01-09-2022 13:26:38.629 [main] INFO o.s.s.web.DefaultSecurityFilterChain.<init> - Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@19647566, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@7b79ff1c, org.springframework.security.web.context.SecurityContextPersistenceFilter@16df9bde, org.springframework.security.web.header.HeaderWriterFilter@686b1e2d, org.springframework.security.web.authentication.logout.LogoutFilter@54daf8f9, com.saslpay.config.JwtRequestFilter@5c8b10b4, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@5be7b749, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@269308cc, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@527d48db, org.springframework.security.web.session.SessionManagementFilter@b32e983, org.springframework.security.web.access.ExceptionTranslationFilter@671da0f9, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@69499c6f]
|
||||
01-09-2022 13:26:41.368 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer.start - Tomcat started on port(s): 9097 (http) with context path ''
|
||||
01-09-2022 13:26:41.901 [main] INFO o.a.c.s.b.CamelSpringBootApplicationListener.onCamelContextStarted - Starting CamelMainRunController to ensure the main thread keeps running
|
||||
01-09-2022 13:26:41.913 [main] INFO o.a.c.i.e.DefaultStreamCachingStrategy.doStart - StreamCaching in use with spool directory: C:\Users\agboola\AppData\Local\Temp\camel\camel-tmp-286D0BF68F8F925-0000000000000000 and rules: [Spool > 128K body size]
|
||||
01-09-2022 13:26:41.929 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Routes startup summary (total:1 started:1)
|
||||
01-09-2022 13:26:41.930 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Started Account Update (file://./app/intxns)
|
||||
01-09-2022 13:26:41.931 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Apache Camel 3.8.0 (camel-1) started in 491ms (build:104ms init:349ms start:38ms)
|
||||
01-09-2022 13:26:41.941 [main] INFO com.saslpay.SaslPayBkp.logStarted - Started SaslPayBkp in 17.599 seconds (JVM running for 19.509)
|
||||
01-09-2022 13:26:55.569 [http-nio-9097-exec-1] INFO o.a.c.c.C.[Tomcat].[localhost].[/].log - Initializing Spring DispatcherServlet 'dispatcherServlet'
|
||||
01-09-2022 13:26:55.572 [http-nio-9097-exec-1] INFO o.s.web.servlet.DispatcherServlet.initServletBean - Initializing Servlet 'dispatcherServlet'
|
||||
01-09-2022 13:26:55.573 [http-nio-9097-exec-1] INFO o.s.web.servlet.DispatcherServlet.initServletBean - Completed initialization in 1 ms
|
||||
01-09-2022 13:26:56.735 [http-nio-9097-exec-1] INFO com.saslpay.log.SaslPayLog.log - {
|
||||
"txnCode": "extDebTrf",
|
||||
"ourTxnRef": "FT22244VQD0F3",
|
||||
"otherTxnRef": "TESTEXT1237",
|
||||
"requestType": "",
|
||||
"api": "",
|
||||
"hold": "F",
|
||||
"bankWallet": "",
|
||||
"customerName": "",
|
||||
"customerBranch": "",
|
||||
"crAccount": "1",
|
||||
"drAccount": "2",
|
||||
"txnCurrency": "",
|
||||
"txnAmount": "0",
|
||||
"txnCharge": "0",
|
||||
"txnNarration": "",
|
||||
"elevyCharge": "0"
|
||||
}
|
||||
01-09-2022 13:26:56.953 [http-nio-9097-exec-1] INFO com.saslpay.log.SaslPayLog.log - {"txnCode" :"extDebTrf","api" :"HUBTEL","requestType" :"TRF","otherTxnRef" :"TESTEXT1237","drAccount" :"010700319301","crAccount" :"0203301044","ourTxnRef" :"","errorMsg" :"Transaction Already Reversed! - TESTEXT1237","status" :"99"}
|
||||
01-09-2022 13:27:44.175 [http-nio-9097-exec-2] INFO com.saslpay.log.SaslPayLog.log - {
|
||||
"txnCode": "",
|
||||
"ourTxnRef": "FT222441WQ2BE",
|
||||
"otherTxnRef": "TESTEXT1238",
|
||||
"requestType": "",
|
||||
"api": "",
|
||||
"hold": "F",
|
||||
"bankWallet": "",
|
||||
"customerName": "",
|
||||
"customerBranch": "",
|
||||
"crAccount": "",
|
||||
"drAccount": "",
|
||||
"txnCurrency": "",
|
||||
"txnAmount": "0",
|
||||
"txnCharge": "0",
|
||||
"txnNarration": "",
|
||||
"elevyCharge": "0"
|
||||
}
|
||||
01-09-2022 13:27:44.514 [http-nio-9097-exec-2] INFO com.saslpay.log.SaslPayLog.log - {"txnCode" :"extDebTrf","api" :"HUBTEL","requestType" :"TRF","otherTxnRef" :"TESTEXT1238","drAccount" :"010700319301","crAccount" :"0203301044","ourTxnRef" :"","errorMsg" :"","status" :"00"}
|
||||
01-09-2022 13:31:30.804 [main] INFO com.saslpay.SaslPayBkpTests.logStarting - Starting SaslPayBkpTests using Java 1.8.0_341 on onasanya with PID 13460 (started by agboola in Z:\ideaProjects\saslInterfaceBkp)
|
||||
01-09-2022 13:31:30.815 [main] INFO com.saslpay.SaslPayBkpTests.logStartupProfileInfo - The following 1 profile is active: "production"
|
||||
01-09-2022 13:31:32.657 [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate.registerRepositoriesIn - Bootstrapping Spring Data JPA repositories in DEFAULT mode.
|
||||
01-09-2022 13:31:32.884 [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate.registerRepositoriesIn - Finished Spring Data repository scanning in 205 ms. Found 3 JPA repository interfaces.
|
||||
01-09-2022 13:31:35.901 [main] INFO o.h.jpa.internal.util.LogHelper.logPersistenceUnitInformation - HHH000204: Processing PersistenceUnitInfo [name: default]
|
||||
01-09-2022 13:31:36.149 [main] INFO org.hibernate.Version.logVersion - HHH000412: Hibernate ORM core version 5.5.3.Final
|
||||
01-09-2022 13:31:36.651 [main] INFO o.h.annotations.common.Version.<clinit> - HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
|
||||
01-09-2022 13:31:37.147 [main] INFO com.zaxxer.hikari.HikariDataSource.getConnection - HikariPool-1 - Starting...
|
||||
01-09-2022 13:31:37.625 [main] INFO com.zaxxer.hikari.HikariDataSource.getConnection - HikariPool-1 - Start completed.
|
||||
01-09-2022 13:31:37.670 [main] INFO org.hibernate.dialect.Dialect.<init> - HHH000400: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect
|
||||
01-09-2022 13:31:39.423 [main] INFO o.h.e.t.j.p.i.JtaPlatformInitiator.initiateService - HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
|
||||
01-09-2022 13:31:39.451 [main] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean.buildNativeEntityManagerFactory - Initialized JPA EntityManagerFactory for persistence unit 'default'
|
||||
01-09-2022 13:31:42.749 [main] INFO o.s.s.web.DefaultSecurityFilterChain.<init> - Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@25464154, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@58ebee9, org.springframework.security.web.context.SecurityContextPersistenceFilter@27e21083, org.springframework.security.web.header.HeaderWriterFilter@47ef5a33, org.springframework.security.web.authentication.logout.LogoutFilter@603f4e3e, com.saslpay.config.JwtRequestFilter@5d37aa0f, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@49e0b123, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@793d09e, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@131c0b6f, org.springframework.security.web.session.SessionManagementFilter@6654ca0d, org.springframework.security.web.access.ExceptionTranslationFilter@3a72e2e8, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@2c56eba5]
|
||||
01-09-2022 13:31:48.604 [main] INFO o.a.c.s.b.CamelSpringBootApplicationListener.onCamelContextStarted - Starting CamelMainRunController to ensure the main thread keeps running
|
||||
01-09-2022 13:31:48.619 [main] INFO o.a.c.i.e.DefaultStreamCachingStrategy.doStart - StreamCaching in use with spool directory: C:\Users\agboola\AppData\Local\Temp\camel\camel-tmp-E7AC2DADAD704D2-0000000000000000 and rules: [Spool > 128K body size]
|
||||
01-09-2022 13:31:48.642 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Routes startup summary (total:1 started:1)
|
||||
01-09-2022 13:31:48.647 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Started Account Update (file://./app/intxns)
|
||||
01-09-2022 13:31:48.650 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Apache Camel 3.8.0 (camel-1) started in 771ms (build:171ms init:545ms start:55ms)
|
||||
01-09-2022 13:31:48.666 [main] INFO com.saslpay.SaslPayBkpTests.logStarted - Started SaslPayBkpTests in 18.905 seconds (JVM running for 21.644)
|
||||
01-09-2022 13:31:49.199 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.doStop - Apache Camel 3.8.0 (camel-1) shutting down (timeout:45s)
|
||||
01-09-2022 13:31:49.215 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.logRouteStopSummary - Routes shutdown summary (total:1 stopped:1)
|
||||
01-09-2022 13:31:49.225 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.logRouteStopSummary - Stopped Account Update (file://./app/intxns)
|
||||
01-09-2022 13:31:49.235 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.doStop - Apache Camel 3.8.0 (camel-1) shutdown in 36ms (uptime:640ms)
|
||||
01-09-2022 13:31:49.273 [SpringApplicationShutdownHook] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean.destroy - Closing JPA EntityManagerFactory for persistence unit 'default'
|
||||
01-09-2022 13:31:49.280 [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource.close - HikariPool-1 - Shutdown initiated...
|
||||
01-09-2022 13:31:49.312 [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource.close - HikariPool-1 - Shutdown completed.
|
||||
Executable
BIN
Binary file not shown.
Executable
+280
@@ -0,0 +1,280 @@
|
||||
21-06-2022 21:36:38.491 [main] INFO c.s.Interface.InterfaceApplication.logStarting - Starting InterfaceApplication using Java 1.8.0_241 on onasanya with PID 577962 (/home/agboola/ideaProjects/saslInterfaceBkp/target/classes started by agboola in /home/agboola/ideaProjects/saslInterfaceBkp)
|
||||
21-06-2022 21:36:38.515 [main] INFO c.s.Interface.InterfaceApplication.logStartupProfileInfo - The following 1 profile is active: "production"
|
||||
21-06-2022 21:36:39.973 [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate.registerRepositoriesIn - Bootstrapping Spring Data JPA repositories in DEFAULT mode.
|
||||
21-06-2022 21:36:40.114 [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate.registerRepositoriesIn - Finished Spring Data repository scanning in 123 ms. Found 2 JPA repository interfaces.
|
||||
21-06-2022 21:36:41.370 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer.initialize - Tomcat initialized with port(s): 9098 (http)
|
||||
21-06-2022 21:36:41.402 [main] INFO o.a.catalina.core.StandardService.log - Starting service [Tomcat]
|
||||
21-06-2022 21:36:41.404 [main] INFO o.a.catalina.core.StandardEngine.log - Starting Servlet engine: [Apache Tomcat/9.0.63]
|
||||
21-06-2022 21:36:41.779 [main] INFO o.a.c.c.C.[Tomcat].[localhost].[/].log - Initializing Spring embedded WebApplicationContext
|
||||
21-06-2022 21:36:41.781 [main] INFO o.s.b.w.s.c.ServletWebServerApplicationContext.prepareWebApplicationContext - Root WebApplicationContext: initialization completed in 3137 ms
|
||||
21-06-2022 21:36:42.237 [main] INFO o.h.jpa.internal.util.LogHelper.logPersistenceUnitInformation - HHH000204: Processing PersistenceUnitInfo [name: default]
|
||||
21-06-2022 21:36:42.415 [main] INFO org.hibernate.Version.logVersion - HHH000412: Hibernate ORM core version 5.5.3.Final
|
||||
21-06-2022 21:36:42.921 [main] INFO o.h.annotations.common.Version.<clinit> - HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
|
||||
21-06-2022 21:36:43.578 [main] INFO com.zaxxer.hikari.HikariDataSource.getConnection - HikariPool-1 - Starting...
|
||||
21-06-2022 21:36:46.480 [main] ERROR com.zaxxer.hikari.pool.HikariPool.throwPoolInitializationException - HikariPool-1 - Exception during pool initialization.
|
||||
com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
|
||||
|
||||
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
|
||||
at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)
|
||||
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)
|
||||
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:828)
|
||||
at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:448)
|
||||
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:241)
|
||||
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:198)
|
||||
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138)
|
||||
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364)
|
||||
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206)
|
||||
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476)
|
||||
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561)
|
||||
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115)
|
||||
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112)
|
||||
at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122)
|
||||
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:181)
|
||||
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:68)
|
||||
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35)
|
||||
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:101)
|
||||
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263)
|
||||
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237)
|
||||
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
|
||||
at org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory.injectServices(DefaultIdentifierGeneratorFactory.java:152)
|
||||
at org.hibernate.service.internal.AbstractServiceRegistryImpl.injectDependencies(AbstractServiceRegistryImpl.java:286)
|
||||
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:243)
|
||||
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
|
||||
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.<init>(InFlightMetadataCollectorImpl.java:176)
|
||||
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:127)
|
||||
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1372)
|
||||
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1406)
|
||||
at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:141)
|
||||
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365)
|
||||
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409)
|
||||
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396)
|
||||
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341)
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863)
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800)
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620)
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
|
||||
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
|
||||
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1154)
|
||||
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:908)
|
||||
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
|
||||
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147)
|
||||
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734)
|
||||
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408)
|
||||
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
|
||||
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306)
|
||||
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295)
|
||||
at InterfaceApplication.main(InterfaceApplication.java:10)
|
||||
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure
|
||||
|
||||
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
|
||||
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
|
||||
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
|
||||
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
|
||||
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
|
||||
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
|
||||
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105)
|
||||
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151)
|
||||
at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167)
|
||||
at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:89)
|
||||
at com.mysql.cj.NativeSession.connect(NativeSession.java:120)
|
||||
at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:948)
|
||||
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:818)
|
||||
... 49 common frames omitted
|
||||
Caused by: java.net.NoRouteToHostException: No route to host (Host unreachable)
|
||||
at java.net.PlainSocketImpl.socketConnect(Native Method)
|
||||
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
|
||||
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
|
||||
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
|
||||
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
|
||||
at java.net.Socket.connect(Socket.java:606)
|
||||
at com.mysql.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:153)
|
||||
at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:63)
|
||||
... 52 common frames omitted
|
||||
21-06-2022 21:36:46.488 [main] WARN o.h.e.j.e.i.JdbcEnvironmentInitiator.initiateService - HHH000342: Could not obtain connection to query metadata
|
||||
com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
|
||||
|
||||
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
|
||||
at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)
|
||||
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)
|
||||
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:828)
|
||||
at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:448)
|
||||
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:241)
|
||||
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:198)
|
||||
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138)
|
||||
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364)
|
||||
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206)
|
||||
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476)
|
||||
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561)
|
||||
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115)
|
||||
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112)
|
||||
at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122)
|
||||
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:181)
|
||||
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:68)
|
||||
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35)
|
||||
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:101)
|
||||
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263)
|
||||
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237)
|
||||
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
|
||||
at org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory.injectServices(DefaultIdentifierGeneratorFactory.java:152)
|
||||
at org.hibernate.service.internal.AbstractServiceRegistryImpl.injectDependencies(AbstractServiceRegistryImpl.java:286)
|
||||
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:243)
|
||||
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
|
||||
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.<init>(InFlightMetadataCollectorImpl.java:176)
|
||||
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:127)
|
||||
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1372)
|
||||
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1406)
|
||||
at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:141)
|
||||
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365)
|
||||
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409)
|
||||
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396)
|
||||
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341)
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863)
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800)
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620)
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
|
||||
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
|
||||
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1154)
|
||||
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:908)
|
||||
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
|
||||
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147)
|
||||
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734)
|
||||
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408)
|
||||
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
|
||||
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306)
|
||||
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295)
|
||||
at InterfaceApplication.main(InterfaceApplication.java:10)
|
||||
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure
|
||||
|
||||
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
|
||||
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
|
||||
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
|
||||
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
|
||||
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
|
||||
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
|
||||
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105)
|
||||
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151)
|
||||
at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167)
|
||||
at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:89)
|
||||
at com.mysql.cj.NativeSession.connect(NativeSession.java:120)
|
||||
at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:948)
|
||||
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:818)
|
||||
... 49 common frames omitted
|
||||
Caused by: java.net.NoRouteToHostException: No route to host (Host unreachable)
|
||||
at java.net.PlainSocketImpl.socketConnect(Native Method)
|
||||
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
|
||||
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
|
||||
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
|
||||
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
|
||||
at java.net.Socket.connect(Socket.java:606)
|
||||
at com.mysql.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:153)
|
||||
at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:63)
|
||||
... 52 common frames omitted
|
||||
21-06-2022 21:36:46.512 [main] INFO org.hibernate.dialect.Dialect.<init> - HHH000400: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect
|
||||
21-06-2022 21:36:48.120 [main] INFO o.h.e.t.j.p.i.JtaPlatformInitiator.initiateService - HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
|
||||
21-06-2022 21:36:48.150 [main] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean.buildNativeEntityManagerFactory - Initialized JPA EntityManagerFactory for persistence unit 'default'
|
||||
21-06-2022 21:36:51.365 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer.start - Tomcat started on port(s): 9098 (http) with context path ''
|
||||
21-06-2022 21:36:51.737 [main] INFO o.a.c.s.b.CamelSpringBootApplicationListener.onCamelContextStarted - Starting CamelMainRunController to ensure the main thread keeps running
|
||||
21-06-2022 21:36:51.741 [main] INFO o.a.c.i.e.DefaultStreamCachingStrategy.doStart - StreamCaching in use with spool directory: /tmp/camel/camel-tmp-4E4A2CEF6EF682A-0000000000000000 and rules: [Spool > 128K body size]
|
||||
21-06-2022 21:36:51.755 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Routes startup summary (total:1 started:1)
|
||||
21-06-2022 21:36:51.756 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Started route1 (file://./app/inTxns)
|
||||
21-06-2022 21:36:51.758 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Apache Camel 3.8.0 (camel-1) started in 372ms (build:111ms init:235ms start:26ms)
|
||||
21-06-2022 21:36:51.771 [main] INFO c.s.Interface.InterfaceApplication.logStarted - Started InterfaceApplication in 15.438 seconds (JVM running for 17.042)
|
||||
21-06-2022 21:37:07.380 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.doStop - Apache Camel 3.8.0 (camel-1) shutting down (timeout:45s)
|
||||
21-06-2022 21:37:07.393 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.logRouteStopSummary - Routes shutdown summary (total:1 stopped:1)
|
||||
21-06-2022 21:37:07.393 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.logRouteStopSummary - Stopped route1 (file://./app/inTxns)
|
||||
21-06-2022 21:37:07.399 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.doStop - Apache Camel 3.8.0 (camel-1) shutdown in 20ms (uptime:15s668ms)
|
||||
21-06-2022 21:37:07.424 [SpringApplicationShutdownHook] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean.destroy - Closing JPA EntityManagerFactory for persistence unit 'default'
|
||||
21-06-2022 21:37:12.423 [main] INFO c.s.Interface.InterfaceApplication.logStarting - Starting InterfaceApplication using Java 1.8.0_241 on onasanya with PID 578405 (/home/agboola/ideaProjects/saslInterfaceBkp/target/classes started by agboola in /home/agboola/ideaProjects/saslInterfaceBkp)
|
||||
21-06-2022 21:37:12.437 [main] INFO c.s.Interface.InterfaceApplication.logStartupProfileInfo - The following 1 profile is active: "production"
|
||||
21-06-2022 21:37:13.910 [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate.registerRepositoriesIn - Bootstrapping Spring Data JPA repositories in DEFAULT mode.
|
||||
21-06-2022 21:37:14.057 [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate.registerRepositoriesIn - Finished Spring Data repository scanning in 125 ms. Found 2 JPA repository interfaces.
|
||||
21-06-2022 21:37:15.720 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer.initialize - Tomcat initialized with port(s): 9098 (http)
|
||||
21-06-2022 21:37:15.731 [main] INFO o.a.catalina.core.StandardService.log - Starting service [Tomcat]
|
||||
21-06-2022 21:37:15.731 [main] INFO o.a.catalina.core.StandardEngine.log - Starting Servlet engine: [Apache Tomcat/9.0.63]
|
||||
21-06-2022 21:37:15.863 [main] INFO o.a.c.c.C.[Tomcat].[localhost].[/].log - Initializing Spring embedded WebApplicationContext
|
||||
21-06-2022 21:37:15.864 [main] INFO o.s.b.w.s.c.ServletWebServerApplicationContext.prepareWebApplicationContext - Root WebApplicationContext: initialization completed in 3309 ms
|
||||
21-06-2022 21:37:16.046 [main] INFO o.h.jpa.internal.util.LogHelper.logPersistenceUnitInformation - HHH000204: Processing PersistenceUnitInfo [name: default]
|
||||
21-06-2022 21:37:16.076 [main] INFO org.hibernate.Version.logVersion - HHH000412: Hibernate ORM core version 5.5.3.Final
|
||||
21-06-2022 21:37:16.236 [main] INFO o.h.annotations.common.Version.<clinit> - HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
|
||||
21-06-2022 21:37:16.343 [main] INFO com.zaxxer.hikari.HikariDataSource.getConnection - HikariPool-1 - Starting...
|
||||
21-06-2022 21:37:17.049 [main] INFO com.zaxxer.hikari.HikariDataSource.getConnection - HikariPool-1 - Start completed.
|
||||
21-06-2022 21:37:17.061 [main] INFO org.hibernate.dialect.Dialect.<init> - HHH000400: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect
|
||||
21-06-2022 21:37:17.466 [main] INFO o.h.e.t.j.p.i.JtaPlatformInitiator.initiateService - HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
|
||||
21-06-2022 21:37:17.474 [main] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean.buildNativeEntityManagerFactory - Initialized JPA EntityManagerFactory for persistence unit 'default'
|
||||
21-06-2022 21:37:18.258 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer.start - Tomcat started on port(s): 9098 (http) with context path ''
|
||||
21-06-2022 21:37:18.346 [main] INFO o.a.c.s.b.CamelSpringBootApplicationListener.onCamelContextStarted - Starting CamelMainRunController to ensure the main thread keeps running
|
||||
21-06-2022 21:37:18.348 [main] INFO o.a.c.i.e.DefaultStreamCachingStrategy.doStart - StreamCaching in use with spool directory: /tmp/camel/camel-tmp-1690578543BA79A-0000000000000000 and rules: [Spool > 128K body size]
|
||||
21-06-2022 21:37:18.352 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Routes startup summary (total:1 started:1)
|
||||
21-06-2022 21:37:18.353 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Started route1 (file://./app/inTxns)
|
||||
21-06-2022 21:37:18.353 [main] INFO o.a.c.i.engine.AbstractCamelContext.logStartSummary - Apache Camel 3.8.0 (camel-1) started in 92ms (build:22ms init:62ms start:8ms)
|
||||
21-06-2022 21:37:18.356 [main] INFO c.s.Interface.InterfaceApplication.logStarted - Started InterfaceApplication in 7.411 seconds (JVM running for 9.412)
|
||||
21-06-2022 21:40:22.101 [http-nio-9098-exec-2] INFO o.a.c.c.C.[Tomcat].[localhost].[/].log - Initializing Spring DispatcherServlet 'dispatcherServlet'
|
||||
21-06-2022 21:40:22.102 [http-nio-9098-exec-2] INFO o.s.web.servlet.DispatcherServlet.initServletBean - Initializing Servlet 'dispatcherServlet'
|
||||
21-06-2022 21:40:22.109 [http-nio-9098-exec-2] INFO o.s.web.servlet.DispatcherServlet.initServletBean - Completed initialization in 5 ms
|
||||
21-06-2022 21:40:22.298 [http-nio-9098-exec-2] ERROR o.a.c.c.C.[.[.[.[dispatcherServlet].log - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause
|
||||
java.lang.NullPointerException: null
|
||||
at IntTransferCapture.intTransfer(IntTransferCapture.java:82)
|
||||
at TransactionDataController.postIntTxn(TransactionDataController.java:24)
|
||||
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
|
||||
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
|
||||
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
|
||||
at java.lang.reflect.Method.invoke(Method.java:498)
|
||||
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
|
||||
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)
|
||||
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
|
||||
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
|
||||
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
|
||||
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
|
||||
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)
|
||||
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)
|
||||
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
|
||||
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
|
||||
at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)
|
||||
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
|
||||
at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
|
||||
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
|
||||
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
|
||||
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
|
||||
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
|
||||
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
|
||||
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
|
||||
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
|
||||
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
|
||||
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
|
||||
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
|
||||
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
|
||||
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:890)
|
||||
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1743)
|
||||
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
|
||||
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
|
||||
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
|
||||
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
|
||||
at java.lang.Thread.run(Thread.java:748)
|
||||
21-06-2022 21:40:47.748 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.doStop - Apache Camel 3.8.0 (camel-1) shutting down (timeout:45s)
|
||||
21-06-2022 21:40:47.755 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.logRouteStopSummary - Routes shutdown summary (total:1 stopped:1)
|
||||
21-06-2022 21:40:47.755 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.logRouteStopSummary - Stopped route1 (file://./app/inTxns)
|
||||
21-06-2022 21:40:47.759 [SpringApplicationShutdownHook] INFO o.a.c.i.engine.AbstractCamelContext.doStop - Apache Camel 3.8.0 (camel-1) shutdown in 11ms (uptime:3m29s)
|
||||
21-06-2022 21:40:47.776 [SpringApplicationShutdownHook] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean.destroy - Closing JPA EntityManagerFactory for persistence unit 'default'
|
||||
21-06-2022 21:40:47.777 [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource.close - HikariPool-1 - Shutdown initiated...
|
||||
21-06-2022 21:40:47.783 [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource.close - HikariPool-1 - Shutdown completed.
|
||||
Executable
BIN
Binary file not shown.
@@ -0,0 +1,331 @@
|
||||
#!/bin/sh
|
||||
# ----------------------------------------------------------------------------
|
||||
# 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
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Maven Start Up Batch script
|
||||
#
|
||||
# Required ENV vars:
|
||||
# ------------------
|
||||
# JAVA_HOME - location of a JDK home dir
|
||||
#
|
||||
# Optional ENV vars
|
||||
# -----------------
|
||||
# M2_HOME - location of maven2's installed home dir
|
||||
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||
# e.g. to debug Maven itself, use
|
||||
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
if [ -z "$MAVEN_SKIP_RC" ]; then
|
||||
|
||||
if [ -f /usr/local/etc/mavenrc ]; then
|
||||
. /usr/local/etc/mavenrc
|
||||
fi
|
||||
|
||||
if [ -f /etc/mavenrc ]; then
|
||||
. /etc/mavenrc
|
||||
fi
|
||||
|
||||
if [ -f "$HOME/.mavenrc" ]; then
|
||||
. "$HOME/.mavenrc"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
# OS specific support. $var _must_ be set to either true or false.
|
||||
cygwin=false
|
||||
darwin=false
|
||||
mingw=false
|
||||
case "$(uname)" in
|
||||
CYGWIN*) cygwin=true ;;
|
||||
MINGW*) mingw=true ;;
|
||||
Darwin*)
|
||||
darwin=true
|
||||
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
|
||||
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html
|
||||
if [ -z "$JAVA_HOME" ]; then
|
||||
if [ -x "/usr/libexec/java_home" ]; then
|
||||
export JAVA_HOME="$(/usr/libexec/java_home)"
|
||||
else
|
||||
export JAVA_HOME="/Library/Java/Home"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "$JAVA_HOME" ]; then
|
||||
if [ -r /etc/gentoo-release ]; then
|
||||
JAVA_HOME=$(java-config --jre-home)
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$M2_HOME" ]; then
|
||||
## resolve links - $0 may be a link to maven's home
|
||||
PRG="$0"
|
||||
|
||||
# need this for relative symlinks
|
||||
while [ -h "$PRG" ]; do
|
||||
ls=$(ls -ld "$PRG")
|
||||
link=$(expr "$ls" : '.*-> \(.*\)$')
|
||||
if expr "$link" : '/.*' >/dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG="$(dirname "$PRG")/$link"
|
||||
fi
|
||||
done
|
||||
|
||||
saveddir=$(pwd)
|
||||
|
||||
M2_HOME=$(dirname "$PRG")/..
|
||||
|
||||
# make it fully qualified
|
||||
M2_HOME=$(cd "$M2_HOME" && pwd)
|
||||
|
||||
cd "$saveddir"
|
||||
# echo Using m2 at $M2_HOME
|
||||
fi
|
||||
|
||||
# For Cygwin, ensure paths are in UNIX format before anything is touched
|
||||
if $cygwin; then
|
||||
[ -n "$M2_HOME" ] &&
|
||||
M2_HOME=$(cygpath --unix "$M2_HOME")
|
||||
[ -n "$JAVA_HOME" ] &&
|
||||
JAVA_HOME=$(cygpath --unix "$JAVA_HOME")
|
||||
[ -n "$CLASSPATH" ] &&
|
||||
CLASSPATH=$(cygpath --path --unix "$CLASSPATH")
|
||||
fi
|
||||
|
||||
# For Mingw, ensure paths are in UNIX format before anything is touched
|
||||
if $mingw; then
|
||||
[ -n "$M2_HOME" ] &&
|
||||
M2_HOME="$( (
|
||||
cd "$M2_HOME"
|
||||
pwd
|
||||
))"
|
||||
[ -n "$JAVA_HOME" ] &&
|
||||
JAVA_HOME="$( (
|
||||
cd "$JAVA_HOME"
|
||||
pwd
|
||||
))"
|
||||
fi
|
||||
|
||||
if [ -z "$JAVA_HOME" ]; then
|
||||
javaExecutable="$(which javac)"
|
||||
if [ -n "$javaExecutable" ] && ! [ "$(expr \"$javaExecutable\" : '\([^ ]*\)')" = "no" ]; then
|
||||
# readlink(1) is not available as standard on Solaris 10.
|
||||
readLink=$(which readlink)
|
||||
if [ ! $(expr "$readLink" : '\([^ ]*\)') = "no" ]; then
|
||||
if $darwin; then
|
||||
javaHome="$(dirname \"$javaExecutable\")"
|
||||
javaExecutable="$(cd \"$javaHome\" && pwd -P)/javac"
|
||||
else
|
||||
javaExecutable="$(readlink -f \"$javaExecutable\")"
|
||||
fi
|
||||
javaHome="$(dirname \"$javaExecutable\")"
|
||||
javaHome=$(expr "$javaHome" : '\(.*\)/bin')
|
||||
JAVA_HOME="$javaHome"
|
||||
export JAVA_HOME
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$JAVACMD" ]; then
|
||||
if [ -n "$JAVA_HOME" ]; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ]; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
else
|
||||
JAVACMD="$(
|
||||
\unset -f command
|
||||
\command -v java
|
||||
)"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -x "$JAVACMD" ]; then
|
||||
echo "Error: JAVA_HOME is not defined correctly." >&2
|
||||
echo " We cannot execute $JAVACMD" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$JAVA_HOME" ]; then
|
||||
echo "Warning: JAVA_HOME environment variable is not set."
|
||||
fi
|
||||
|
||||
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
|
||||
|
||||
# traverses directory structure from process work directory to filesystem root
|
||||
# first directory with .mvn subdirectory is considered project base directory
|
||||
find_maven_basedir() {
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "Path not specified to find_maven_basedir"
|
||||
return 1
|
||||
fi
|
||||
|
||||
basedir="$1"
|
||||
wdir="$1"
|
||||
while [ "$wdir" != '/' ]; do
|
||||
if [ -d "$wdir"/.mvn ]; then
|
||||
basedir=$wdir
|
||||
break
|
||||
fi
|
||||
# workaround for JBEAP-8937 (on Solaris 10/Sparc)
|
||||
if [ -d "${wdir}" ]; then
|
||||
wdir=$(
|
||||
cd "$wdir/.."
|
||||
pwd
|
||||
)
|
||||
fi
|
||||
# end of workaround
|
||||
done
|
||||
echo "${basedir}"
|
||||
}
|
||||
|
||||
# concatenates all lines of a file
|
||||
concat_lines() {
|
||||
if [ -f "$1" ]; then
|
||||
echo "$(tr -s '\n' ' ' <"$1")"
|
||||
fi
|
||||
}
|
||||
|
||||
BASE_DIR=$(find_maven_basedir "$(pwd)")
|
||||
if [ -z "$BASE_DIR" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
##########################################################################################
|
||||
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
|
||||
# This allows using the maven wrapper in projects that prohibit checking in binary data.
|
||||
##########################################################################################
|
||||
if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo "Found .mvn/wrapper/maven-wrapper.jar"
|
||||
fi
|
||||
else
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
|
||||
fi
|
||||
if [ -n "$MVNW_REPOURL" ]; then
|
||||
jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
|
||||
else
|
||||
jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
|
||||
fi
|
||||
while IFS="=" read key value; do
|
||||
case "$key" in wrapperUrl)
|
||||
jarUrl="$value"
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done <"$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo "Downloading from: $jarUrl"
|
||||
fi
|
||||
wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
|
||||
if $cygwin; then
|
||||
wrapperJarPath=$(cygpath --path --windows "$wrapperJarPath")
|
||||
fi
|
||||
|
||||
if command -v wget >/dev/null; then
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo "Found wget ... using wget"
|
||||
fi
|
||||
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
|
||||
wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
|
||||
else
|
||||
wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
|
||||
fi
|
||||
elif command -v curl >/dev/null; then
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo "Found curl ... using curl"
|
||||
fi
|
||||
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
|
||||
curl -o "$wrapperJarPath" "$jarUrl" -f
|
||||
else
|
||||
curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
|
||||
fi
|
||||
|
||||
else
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo "Falling back to using Java to download"
|
||||
fi
|
||||
javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
|
||||
# For Cygwin, switch paths to Windows format before running javac
|
||||
if $cygwin; then
|
||||
javaClass=$(cygpath --path --windows "$javaClass")
|
||||
fi
|
||||
if [ -e "$javaClass" ]; then
|
||||
if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo " - Compiling MavenWrapperDownloader.java ..."
|
||||
fi
|
||||
# Compiling the Java class
|
||||
("$JAVA_HOME/bin/javac" "$javaClass")
|
||||
fi
|
||||
if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
|
||||
# Running the downloader
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo " - Running MavenWrapperDownloader.java ..."
|
||||
fi
|
||||
("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
##########################################################################################
|
||||
# End of extension
|
||||
##########################################################################################
|
||||
|
||||
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo $MAVEN_PROJECTBASEDIR
|
||||
fi
|
||||
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin; then
|
||||
[ -n "$M2_HOME" ] &&
|
||||
M2_HOME=$(cygpath --path --windows "$M2_HOME")
|
||||
[ -n "$JAVA_HOME" ] &&
|
||||
JAVA_HOME=$(cygpath --path --windows "$JAVA_HOME")
|
||||
[ -n "$CLASSPATH" ] &&
|
||||
CLASSPATH=$(cygpath --path --windows "$CLASSPATH")
|
||||
[ -n "$MAVEN_PROJECTBASEDIR" ] &&
|
||||
MAVEN_PROJECTBASEDIR=$(cygpath --path --windows "$MAVEN_PROJECTBASEDIR")
|
||||
fi
|
||||
|
||||
# Provide a "standardized" way to retrieve the CLI args that will
|
||||
# work with both Windows and non-Windows executions.
|
||||
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
|
||||
export MAVEN_CMD_LINE_ARGS
|
||||
|
||||
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||
|
||||
exec "$JAVACMD" \
|
||||
$MAVEN_OPTS \
|
||||
$MAVEN_DEBUG_OPTS \
|
||||
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
|
||||
"-Dmaven.home=${M2_HOME}" \
|
||||
"-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
|
||||
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
|
||||
@@ -0,0 +1,188 @@
|
||||
@REM ----------------------------------------------------------------------------
|
||||
@REM Licensed to the Apache Software Foundation (ASF) under one
|
||||
@REM or more contributor license agreements. See the NOTICE file
|
||||
@REM distributed with this work for additional information
|
||||
@REM regarding copyright ownership. The ASF licenses this file
|
||||
@REM to you under the Apache License, Version 2.0 (the
|
||||
@REM "License"); you may not use this file except in compliance
|
||||
@REM with the License. You may obtain a copy of the License at
|
||||
@REM
|
||||
@REM https://www.apache.org/licenses/LICENSE-2.0
|
||||
@REM
|
||||
@REM Unless required by applicable law or agreed to in writing,
|
||||
@REM software distributed under the License is distributed on an
|
||||
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
@REM KIND, either express or implied. See the License for the
|
||||
@REM specific language governing permissions and limitations
|
||||
@REM under the License.
|
||||
@REM ----------------------------------------------------------------------------
|
||||
|
||||
@REM ----------------------------------------------------------------------------
|
||||
@REM Maven Start Up Batch script
|
||||
@REM
|
||||
@REM Required ENV vars:
|
||||
@REM JAVA_HOME - location of a JDK home dir
|
||||
@REM
|
||||
@REM Optional ENV vars
|
||||
@REM M2_HOME - location of maven2's installed home dir
|
||||
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
|
||||
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
|
||||
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||
@REM e.g. to debug Maven itself, use
|
||||
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||
@REM ----------------------------------------------------------------------------
|
||||
|
||||
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
|
||||
@echo off
|
||||
@REM set title of command window
|
||||
title %0
|
||||
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
|
||||
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
|
||||
|
||||
@REM set %HOME% to equivalent of $HOME
|
||||
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
|
||||
|
||||
@REM Execute a user defined script before this one
|
||||
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
|
||||
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
|
||||
if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
|
||||
if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
|
||||
:skipRcPre
|
||||
|
||||
@setlocal
|
||||
|
||||
set ERROR_CODE=0
|
||||
|
||||
@REM To isolate internal variables from possible post scripts, we use another setlocal
|
||||
@setlocal
|
||||
|
||||
@REM ==== START VALIDATION ====
|
||||
if not "%JAVA_HOME%" == "" goto OkJHome
|
||||
|
||||
echo.
|
||||
echo Error: JAVA_HOME not found in your environment. >&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||
echo location of your Java installation. >&2
|
||||
echo.
|
||||
goto error
|
||||
|
||||
:OkJHome
|
||||
if exist "%JAVA_HOME%\bin\java.exe" goto init
|
||||
|
||||
echo.
|
||||
echo Error: JAVA_HOME is set to an invalid directory. >&2
|
||||
echo JAVA_HOME = "%JAVA_HOME%" >&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||
echo location of your Java installation. >&2
|
||||
echo.
|
||||
goto error
|
||||
|
||||
@REM ==== END VALIDATION ====
|
||||
|
||||
:init
|
||||
|
||||
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
|
||||
@REM Fallback to current working directory if not found.
|
||||
|
||||
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
|
||||
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
|
||||
|
||||
set EXEC_DIR=%CD%
|
||||
set WDIR=%EXEC_DIR%
|
||||
:findBaseDir
|
||||
IF EXIST "%WDIR%"\.mvn goto baseDirFound
|
||||
cd ..
|
||||
IF "%WDIR%"=="%CD%" goto baseDirNotFound
|
||||
set WDIR=%CD%
|
||||
goto findBaseDir
|
||||
|
||||
:baseDirFound
|
||||
set MAVEN_PROJECTBASEDIR=%WDIR%
|
||||
cd "%EXEC_DIR%"
|
||||
goto endDetectBaseDir
|
||||
|
||||
:baseDirNotFound
|
||||
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
|
||||
cd "%EXEC_DIR%"
|
||||
|
||||
:endDetectBaseDir
|
||||
|
||||
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
|
||||
|
||||
@setlocal EnableExtensions EnableDelayedExpansion
|
||||
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
|
||||
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
|
||||
|
||||
:endReadAdditionalConfig
|
||||
|
||||
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
|
||||
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
|
||||
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||
|
||||
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
|
||||
|
||||
FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
|
||||
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
|
||||
)
|
||||
|
||||
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
|
||||
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
|
||||
if exist %WRAPPER_JAR% (
|
||||
if "%MVNW_VERBOSE%" == "true" (
|
||||
echo Found %WRAPPER_JAR%
|
||||
)
|
||||
) else (
|
||||
if not "%MVNW_REPOURL%" == "" (
|
||||
SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
|
||||
)
|
||||
if "%MVNW_VERBOSE%" == "true" (
|
||||
echo Couldn't find %WRAPPER_JAR%, downloading it ...
|
||||
echo Downloading from: %DOWNLOAD_URL%
|
||||
)
|
||||
|
||||
powershell -Command "&{"^
|
||||
"$webclient = new-object System.Net.WebClient;"^
|
||||
"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
|
||||
"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
|
||||
"}"^
|
||||
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
|
||||
"}"
|
||||
if "%MVNW_VERBOSE%" == "true" (
|
||||
echo Finished downloading %WRAPPER_JAR%
|
||||
)
|
||||
)
|
||||
@REM End of extension
|
||||
|
||||
@REM Provide a "standardized" way to retrieve the CLI args that will
|
||||
@REM work with both Windows and non-Windows executions.
|
||||
set MAVEN_CMD_LINE_ARGS=%*
|
||||
|
||||
%MAVEN_JAVA_EXE% ^
|
||||
%JVM_CONFIG_MAVEN_PROPS% ^
|
||||
%MAVEN_OPTS% ^
|
||||
%MAVEN_DEBUG_OPTS% ^
|
||||
-classpath %WRAPPER_JAR% ^
|
||||
"-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
|
||||
%WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
|
||||
if ERRORLEVEL 1 goto error
|
||||
goto end
|
||||
|
||||
:error
|
||||
set ERROR_CODE=1
|
||||
|
||||
:end
|
||||
@endlocal & set ERROR_CODE=%ERROR_CODE%
|
||||
|
||||
if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
|
||||
@REM check for post script, once with legacy .bat ending and once with .cmd ending
|
||||
if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
|
||||
if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
|
||||
:skipRcPost
|
||||
|
||||
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
|
||||
if "%MAVEN_BATCH_PAUSE%"=="on" pause
|
||||
|
||||
if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
|
||||
|
||||
cmd /C exit /B %ERROR_CODE%
|
||||
@@ -0,0 +1,107 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.7.0</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.sasl</groupId>
|
||||
<artifactId>saslPayBkp</artifactId>
|
||||
<version>1.0.2</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>saslPayBkp</name>
|
||||
<description>Sasl Interface Backup</description>
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
|
||||
<!-- For Spring Security -->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-security</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.jsonwebtoken</groupId>
|
||||
<artifactId>jjwt</artifactId>
|
||||
<version>0.9.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- For Spring Security -->
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.12.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<!--<scope>5.1.38</scope>-->
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<artifactId>hibernate-core</artifactId>
|
||||
<version>5.5.3.Final</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<artifactId>hibernate-entitymanager</artifactId>
|
||||
<version>5.5.3.Final</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.8.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</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-data-jpa</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.camel.springboot</groupId>
|
||||
<artifactId>camel-spring-boot-starter</artifactId>
|
||||
<version>3.8.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.googlecode.json-simple</groupId>
|
||||
<artifactId>json-simple</artifactId>
|
||||
<version>1.1</version>
|
||||
</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>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
package com.saslpay;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class SaslPayBkp {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(SaslPayBkp.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.saslpay.config;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
|
||||
@Configuration
|
||||
public class AppPropertiesConfig {
|
||||
|
||||
@Value("${interface.out.folder}")
|
||||
public String outFolder;
|
||||
|
||||
@Value("${transactionDataTable}")
|
||||
public String transactionDataTable;
|
||||
|
||||
@Value("${t24DataTable}")
|
||||
public String t24DataTable;
|
||||
|
||||
@Bean
|
||||
public String getTransactionDataTable() {
|
||||
return transactionDataTable;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public String getT24DataTable() {
|
||||
return t24DataTable;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public String getOutFolder(){
|
||||
return outFolder;
|
||||
}
|
||||
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.saslpay.config;
|
||||
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class BeanUtil implements ApplicationContextAware {
|
||||
|
||||
private static ApplicationContext context;
|
||||
|
||||
@Override
|
||||
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
|
||||
context = applicationContext;
|
||||
}
|
||||
|
||||
public static <T> T getBean(Class<T> beanClass) {
|
||||
return context.getBean(beanClass);
|
||||
}
|
||||
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package com.saslpay.config;
|
||||
|
||||
import com.saslpay.datacapture.AccountDataCapture;
|
||||
import org.apache.camel.builder.RouteBuilder;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class BuildRoute extends RouteBuilder {
|
||||
|
||||
@Value("${interface.in.folder}") String inFolder;
|
||||
|
||||
public void configure() {
|
||||
|
||||
inFolder = "file:" + "./app/intxns" + "?delete=true&readLock=changed&readLockMinAge=5s";
|
||||
from(inFolder).routeId("Account Update").log("Updating Account").streamCaching().process(exchange -> {
|
||||
String body = exchange.getIn().getBody(String.class);
|
||||
// inFileName = exchange.getIn().getHeader(Exchange.FILE_NAME, String.class);
|
||||
AccountDataCapture accountDataCapture = new AccountDataCapture();
|
||||
accountDataCapture.importer(body);
|
||||
}).log("Account Update Completed");
|
||||
|
||||
// outFolder = "file:" + outFolder + "?delete=true&readLock=changed&readLockMinAge=5s";
|
||||
// from(outFolder).log("out...").streamCaching().process(exchange -> {
|
||||
// String body = exchange.getIn().getBody(String.class);
|
||||
// outFileName = exchange.getIn().getHeader(Exchange.FILE_NAME, String.class);
|
||||
// }).log("processing... " + outFileName + " done...");
|
||||
}
|
||||
}
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
package com.saslpay.config;
|
||||
|
||||
import org.hibernate.jpa.HibernatePersistenceProvider;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.jdbc.DataSourceBuilder;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
|
||||
import org.springframework.orm.jpa.JpaTransactionManager;
|
||||
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
|
||||
import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
import java.util.Properties;
|
||||
|
||||
@Configuration
|
||||
@EnableJpaRepositories(basePackages = "com.saslpay.*", transactionManagerRef = "jpaTransactionManager")
|
||||
@PropertySource(value = {"classpath:application.properties"})
|
||||
@EnableTransactionManagement
|
||||
public class JpaConfig {
|
||||
|
||||
private static final String[] ENTITYMANAGER_PACKAGES_TO_SCAN = {"com.saslpay.*"};
|
||||
|
||||
@Autowired
|
||||
private Environment env;
|
||||
|
||||
String dialect;
|
||||
|
||||
@Bean
|
||||
public DataSource dataSource() {
|
||||
|
||||
String username = env.getProperty("spring.datasource.username");
|
||||
String password = env.getProperty("spring.datasource.password");
|
||||
// String driverClass = env.getProperty("spring.datasource.driver");
|
||||
String url = env.getProperty("spring.datasource.url");
|
||||
dialect = env.getProperty("spring.jpa.database-platform");
|
||||
return DataSourceBuilder.create().username(username).password(password).url(url).build();
|
||||
//driverClassName(driverClass).build();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public JpaTransactionManager jpaTransactionManager() {
|
||||
JpaTransactionManager transactionManager = new JpaTransactionManager();
|
||||
transactionManager.setEntityManagerFactory(entityManagerFactory().getObject());
|
||||
return transactionManager;
|
||||
}
|
||||
|
||||
//adding for future use
|
||||
private HibernateJpaVendorAdapter vendorAdaptor() {
|
||||
HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
|
||||
return vendorAdapter;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
|
||||
LocalContainerEntityManagerFactoryBean entityManagerFactoryBean = new LocalContainerEntityManagerFactoryBean();
|
||||
entityManagerFactoryBean.setJpaVendorAdapter(vendorAdaptor());
|
||||
entityManagerFactoryBean.setDataSource(dataSource());
|
||||
entityManagerFactoryBean.setPersistenceProviderClass(HibernatePersistenceProvider.class);
|
||||
entityManagerFactoryBean.setPackagesToScan(ENTITYMANAGER_PACKAGES_TO_SCAN);
|
||||
entityManagerFactoryBean.setJpaProperties(addProperties());
|
||||
return entityManagerFactoryBean;
|
||||
}
|
||||
|
||||
private Properties addProperties() {
|
||||
Properties properties = new Properties();
|
||||
properties.setProperty("hibernate.hbm2ddl.auto", "none");
|
||||
properties.setProperty("hibernate.dialect", dialect);
|
||||
properties.setProperty("hibernate.show_sql", "false");
|
||||
// we can add
|
||||
return properties;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.saslpay.config;
|
||||
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
import org.springframework.security.web.AuthenticationEntryPoint;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Component
|
||||
public class JwtAuthenticationEntryPoint implements AuthenticationEntryPoint, Serializable {
|
||||
|
||||
private static final long serialVersionUID = -7858869558953243875L;
|
||||
|
||||
@Override
|
||||
public void commence(HttpServletRequest request, HttpServletResponse response,
|
||||
AuthenticationException authException) {
|
||||
|
||||
try {
|
||||
response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Unauthorized Access");
|
||||
} catch (IOException e) {
|
||||
e.getLocalizedMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
package com.saslpay.config;
|
||||
|
||||
import com.saslpay.impl.JwtUserDetailsService;
|
||||
import io.jsonwebtoken.ExpiredJwtException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.security.web.authentication.WebAuthenticationDetailsSource;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.filter.OncePerRequestFilter;
|
||||
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
@Component
|
||||
public class JwtRequestFilter extends OncePerRequestFilter {
|
||||
|
||||
@Autowired
|
||||
private JwtUserDetailsService jwtUserDetailsService;
|
||||
|
||||
@Autowired
|
||||
private JwtTokenUtil jwtTokenUtil;
|
||||
|
||||
@Override
|
||||
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain)
|
||||
throws ServletException, IOException {
|
||||
|
||||
final String requestTokenHeader = request.getHeader("Authorization");
|
||||
|
||||
String username = null;
|
||||
String jwtToken = null;
|
||||
// JWT Token is in the form "Bearer token". Remove Bearer word and get
|
||||
// only the Token
|
||||
//if (requestTokenHeader != null && requestTokenHeader.startsWith("Bearer ")) {
|
||||
if (requestTokenHeader != null) {
|
||||
// jwtToken = requestTokenHeader.substring(7);
|
||||
jwtToken = requestTokenHeader;
|
||||
try {
|
||||
username = jwtTokenUtil.getUsernameFromToken(jwtToken);
|
||||
} catch (IllegalArgumentException e) {
|
||||
//System.out.println("Unable to get JWT Token");
|
||||
response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Unable To Get Token");
|
||||
} catch (ExpiredJwtException e) {
|
||||
response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Token Expired");
|
||||
//System.out.println("JWT Token has expired");
|
||||
}
|
||||
} else {
|
||||
//response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Invalid Token");
|
||||
logger.warn("JWT Token does not begin with Bearer String");
|
||||
}
|
||||
|
||||
// Once we get the token validate it.
|
||||
if (username != null && SecurityContextHolder.getContext().getAuthentication() == null) {
|
||||
|
||||
UserDetails userDetails = this.jwtUserDetailsService.loadUserByUsername(username);
|
||||
|
||||
// if token is valid configure Spring Security to manually set
|
||||
// authentication
|
||||
if (jwtTokenUtil.validateToken(jwtToken, userDetails)) {
|
||||
|
||||
UsernamePasswordAuthenticationToken usernamePasswordAuthenticationToken = new UsernamePasswordAuthenticationToken(
|
||||
userDetails, null, userDetails.getAuthorities());
|
||||
usernamePasswordAuthenticationToken
|
||||
.setDetails(new WebAuthenticationDetailsSource().buildDetails(request));
|
||||
// After setting the Authentication in the context, we specify
|
||||
// that the current user is authenticated. So it passes the
|
||||
// Spring Security Configurations successfully.
|
||||
SecurityContextHolder.getContext().setAuthentication(usernamePasswordAuthenticationToken);
|
||||
}
|
||||
}
|
||||
chain.doFilter(request, response);
|
||||
}
|
||||
|
||||
}
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
package com.saslpay.config;
|
||||
|
||||
import io.jsonwebtoken.Claims;
|
||||
import io.jsonwebtoken.Jwts;
|
||||
import io.jsonwebtoken.SignatureAlgorithm;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
|
||||
@Component
|
||||
public class JwtTokenUtil implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -2550185165626007488L;
|
||||
|
||||
public static final long JWT_TOKEN_VALIDITY = 24 * 60 * 60;
|
||||
|
||||
@Value("${jwt.secret}")
|
||||
private String secret;
|
||||
|
||||
//retrieve username from jwt token
|
||||
public String getUsernameFromToken(String token) {
|
||||
return getClaimFromToken(token, Claims::getSubject);
|
||||
}
|
||||
|
||||
//retrieve expiration date from jwt token
|
||||
public Date getExpirationDateFromToken(String token) {
|
||||
return getClaimFromToken(token, Claims::getExpiration);
|
||||
}
|
||||
|
||||
public <T> T getClaimFromToken(String token, Function<Claims, T> claimsResolver) {
|
||||
final Claims claims = getAllClaimsFromToken(token);
|
||||
return claimsResolver.apply(claims);
|
||||
}
|
||||
//for retrieveing any information from token we will need the secret key
|
||||
private Claims getAllClaimsFromToken(String token) {
|
||||
return Jwts.parser().setSigningKey(secret).parseClaimsJws(token).getBody();
|
||||
}
|
||||
|
||||
//check if the token has expired
|
||||
private Boolean isTokenExpired(String token) {
|
||||
final Date expiration = getExpirationDateFromToken(token);
|
||||
return expiration.before(new Date());
|
||||
}
|
||||
|
||||
//generate token for user
|
||||
public String generateToken(UserDetails userDetails) {
|
||||
Map<String, Object> claims = new HashMap<>();
|
||||
return doGenerateToken(claims, userDetails.getUsername());
|
||||
}
|
||||
|
||||
//while creating the token -
|
||||
//1. Define claims of the token, like Issuer, Expiration, Subject, and the ID
|
||||
//2. Sign the JWT using the HS512 algorithm and secret key.
|
||||
//3. According to JWS Compact Serialization(https://tools.ietf.org/html/draft-ietf-jose-json-web-signature-41#section-3.1)
|
||||
// compaction of the JWT to a URL-safe string
|
||||
private String doGenerateToken(Map<String, Object> claims, String subject) {
|
||||
|
||||
return Jwts.builder().setClaims(claims).setSubject(subject).setIssuedAt(new Date(System.currentTimeMillis()))
|
||||
.setExpiration(new Date(System.currentTimeMillis() + JWT_TOKEN_VALIDITY * 1000))
|
||||
.signWith(SignatureAlgorithm.HS512, secret).compact();
|
||||
}
|
||||
|
||||
//validate token
|
||||
public Boolean validateToken(String token, UserDetails userDetails) {
|
||||
final String username = getUsernameFromToken(token);
|
||||
return (username.equals(userDetails.getUsername()) && !isTokenExpired(token));
|
||||
}
|
||||
}
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
package com.saslpay.config;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.security.authentication.AuthenticationManager;
|
||||
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
|
||||
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
|
||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
||||
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
|
||||
import org.springframework.security.config.http.SessionCreationPolicy;
|
||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
|
||||
|
||||
@Configuration
|
||||
@EnableWebSecurity
|
||||
@EnableGlobalMethodSecurity(prePostEnabled = true)
|
||||
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
|
||||
@Autowired
|
||||
private JwtAuthenticationEntryPoint jwtAuthenticationEntryPoint;
|
||||
|
||||
@Autowired
|
||||
private UserDetailsService jwtUserDetailsService;
|
||||
|
||||
@Autowired
|
||||
private JwtRequestFilter jwtRequestFilter;
|
||||
|
||||
@Autowired
|
||||
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
// configure AuthenticationManager so that it knows from where to load
|
||||
// user for matching credentials
|
||||
// Use BCryptPasswordEncoder
|
||||
auth.userDetailsService(jwtUserDetailsService).passwordEncoder(passwordEncoder());
|
||||
}
|
||||
|
||||
@Bean
|
||||
public PasswordEncoder passwordEncoder() {
|
||||
return new BCryptPasswordEncoder();
|
||||
}
|
||||
|
||||
@Bean
|
||||
@Override
|
||||
public AuthenticationManager authenticationManagerBean() throws Exception {
|
||||
return super.authenticationManagerBean();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configure(HttpSecurity httpSecurity) throws Exception {
|
||||
// We don't need CSRF for this example
|
||||
httpSecurity.csrf().disable()
|
||||
// dont authenticate this particular request
|
||||
.authorizeRequests().antMatchers("/cbs/security/getToken", "/cbs/register").permitAll().
|
||||
// all other requests need to be authenticated
|
||||
anyRequest().authenticated().and().
|
||||
// make sure we use stateless session; session won't be used to
|
||||
// store user's state.
|
||||
exceptionHandling().authenticationEntryPoint(jwtAuthenticationEntryPoint).and().sessionManagement()
|
||||
.sessionCreationPolicy(SessionCreationPolicy.STATELESS);
|
||||
|
||||
// Add a filter to validate the tokens with every request
|
||||
httpSecurity.addFilterBefore(jwtRequestFilter, UsernamePasswordAuthenticationFilter.class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.saslpay.controller;
|
||||
|
||||
import com.saslpay.config.JwtTokenUtil;
|
||||
import com.saslpay.datacapture.JwtRequest;
|
||||
import com.saslpay.datacapture.JwtResponse;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import com.saslpay.entities.UserEntity;
|
||||
import com.saslpay.impl.JwtUserDetailsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.authentication.AuthenticationManager;
|
||||
import org.springframework.security.authentication.BadCredentialsException;
|
||||
import org.springframework.security.authentication.DisabledException;
|
||||
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.sql.Date;
|
||||
import java.sql.Time;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/cbs")
|
||||
@CrossOrigin
|
||||
public class JwtAuthenticationController {
|
||||
|
||||
LocalDate localDate;
|
||||
LocalDateTime tokenInitTime;
|
||||
|
||||
@Autowired
|
||||
private AuthenticationManager authenticationManager;
|
||||
|
||||
@Autowired
|
||||
private JwtTokenUtil jwtTokenUtil;
|
||||
|
||||
@Autowired
|
||||
private JwtUserDetailsService userDetailsService;
|
||||
|
||||
// @RequestMapping(value = "security/getToken", method = RequestMethod.GET)
|
||||
@GetMapping(produces = MediaType.APPLICATION_JSON_VALUE, value = "security/getToken")
|
||||
public String createAuthenticationToken(@RequestHeader(value="username") String username, @RequestHeader(value = "password") String password) throws Exception {
|
||||
// public String createAuthenticationToken(@RequestBody JwtRequest authenticationRequest) throws Exception {
|
||||
|
||||
authenticate(username, password);
|
||||
//authenticate(authenticationRequest.getUsername(), authenticationRequest.getPassword());
|
||||
|
||||
final UserDetails userDetails = userDetailsService
|
||||
// .loadUserByUsername(authenticationRequest.getUsername());
|
||||
.loadUserByUsername(username);
|
||||
|
||||
localDate = LocalDate.parse(new Date(System.currentTimeMillis()).toString(), DateTimeFormatter.ISO_LOCAL_DATE);
|
||||
tokenInitTime = localDate.atTime(new Time((System.currentTimeMillis())).toLocalTime());
|
||||
tokenInitTime = tokenInitTime.plusHours(24);
|
||||
|
||||
final String token = jwtTokenUtil.generateToken(userDetails);
|
||||
|
||||
JSONObject object = new JSONObject();
|
||||
object.put("authToken", token);
|
||||
object.put("Status", "00");
|
||||
object.put("validUntil", tokenInitTime.toString());
|
||||
return "" + object + "";
|
||||
// return ResponseEntity.ok(new JwtResponse(token));
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/register", method = RequestMethod.POST)
|
||||
public ResponseEntity<?> saveUser(@RequestBody UserEntity user) throws Exception {
|
||||
|
||||
// if (userDetails.equals("root")){
|
||||
return ResponseEntity.ok(userDetailsService.save(user));
|
||||
// }else{
|
||||
// return ResponseEntity.ok(userDetailsService.failed(user));
|
||||
// }
|
||||
}
|
||||
|
||||
private void authenticate(String username, String password) throws Exception {
|
||||
try {
|
||||
authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(username, password));
|
||||
} catch (DisabledException e) {
|
||||
throw new Exception("USER_DISABLED", e);
|
||||
} catch (BadCredentialsException e) {
|
||||
throw new Exception("INVALID_CREDENTIALS", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
+260
@@ -0,0 +1,260 @@
|
||||
package com.saslpay.controller;
|
||||
|
||||
import com.saslpay.config.AppPropertiesConfig;
|
||||
import com.saslpay.config.BeanUtil;
|
||||
import com.saslpay.entities.T24DataEntity;
|
||||
import com.saslpay.impl.T24DataServiceImpl;
|
||||
import com.saslpay.log.SaslPayLog;
|
||||
import jdk.nashorn.internal.parser.JSONParser;
|
||||
import org.json.simple.JSONArray;
|
||||
import org.json.simple.JSONObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.PersistenceContext;
|
||||
import java.util.*;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/cbs/get")
|
||||
public class T24DataController {
|
||||
|
||||
List<T24DataEntity> t24DataEntity;
|
||||
|
||||
@PersistenceContext
|
||||
EntityManager entityManager = BeanUtil.getBean(EntityManager.class);
|
||||
|
||||
AppPropertiesConfig configClass = BeanUtil.getBean(AppPropertiesConfig.class);
|
||||
String t24DataTable = configClass.getT24DataTable();
|
||||
|
||||
@Autowired
|
||||
T24DataServiceImpl t24DataServiceImpl = BeanUtil.getBean(T24DataServiceImpl.class);
|
||||
|
||||
String sqlStatement;
|
||||
String customerName;
|
||||
String gender;
|
||||
String dob;
|
||||
String emailAddress;
|
||||
String phoneNumber;
|
||||
String branch;
|
||||
String branchName;
|
||||
String identification;
|
||||
String custType;
|
||||
String accountId;
|
||||
String ussdSubscribed;
|
||||
String acStatus = "";
|
||||
String errorMsg = "";
|
||||
String status = "";
|
||||
Float acBalance = 0.00F;
|
||||
|
||||
SaslPayLog saslPayLog = new SaslPayLog();
|
||||
|
||||
@GetMapping(value ="/levycheck/{account}" ,produces = MediaType.APPLICATION_JSON_VALUE )
|
||||
public String getLevy(@PathVariable String account) {
|
||||
return account;
|
||||
|
||||
}
|
||||
|
||||
@GetMapping(value="/accountCustomerDetails/{account}" , produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public String getAccountCustomer(@PathVariable String account) {
|
||||
saslPayLog.log(account);
|
||||
sqlStatement = "SELECT * FROM " + t24DataTable +" WHERE accountId='" + account + "'";
|
||||
t24DataEntity = entityManager.createNativeQuery(sqlStatement,T24DataEntity.class).getResultList();
|
||||
if (t24DataEntity.isEmpty()){
|
||||
JSONObject object = new JSONObject();
|
||||
object.put("account", "\"" + account + "\"");
|
||||
object.put("errorMsg" ,"99");
|
||||
object.put("status" , "Customer Does Not Exist");
|
||||
return object + "";
|
||||
}
|
||||
customerName = t24DataEntity.get(0).getCustomerName();
|
||||
dob = t24DataEntity.get(0).getDob();
|
||||
gender = t24DataEntity.get(0).getGender();
|
||||
emailAddress = t24DataEntity.get(0).getEmailAddress();
|
||||
phoneNumber = t24DataEntity.get(0).getPhoneNumber();
|
||||
branch = t24DataEntity.get(0).getBranch();
|
||||
branchName = t24DataEntity.get(0).getBranchName();
|
||||
identification = t24DataEntity.get(0).getCustomerId();
|
||||
custType = t24DataEntity.get(0).getCustomerType();
|
||||
errorMsg = "";
|
||||
status = "00";
|
||||
|
||||
saslPayLog.log("{\"customerDetails\" :[{\"" +
|
||||
"customerName\" :\"" + customerName + "\",\"" +
|
||||
"gender\" :\"" + gender + "\",\"" +
|
||||
"dob\" :\"" + dob + "\",\"" +
|
||||
"phoneNumber\" :\"" + phoneNumber + "\",\"" +
|
||||
"emailAddress\" :\"" + emailAddress + "\",\"" +
|
||||
"branch\" :\"" + branch + "\",\"" +
|
||||
"branchName\" :\"" + branchName + "\",\"" +
|
||||
"identification\" :\"" + identification + "\",\"" +
|
||||
"custType\" :\"" + custType + "\"}],\"" +
|
||||
"status\" :\"" + status + "\",\"" + "errorMsg\" :\"" + errorMsg + "\"" +
|
||||
"}");
|
||||
|
||||
return "{\"customerDetails\" :[{\"" +
|
||||
"customerName\" :\"" + customerName + "\",\"" +
|
||||
"gender\" :\"" + gender + "\",\"" +
|
||||
"dob\" :\"" + dob + "\",\"" +
|
||||
"phoneNumber\" :\"" + phoneNumber + "\",\"" +
|
||||
"emailAddress\" :\"" + emailAddress + "\",\"" +
|
||||
"branch\" :\"" + branch + "\",\"" +
|
||||
"branchName\" :\"" + branchName + "\",\"" +
|
||||
"identification\" :\"" + identification + "\",\"" +
|
||||
"custType\" :\"" + custType + "\"}],\"" +
|
||||
"status\" :\"" + status + "\",\"" + "errorMsg\" :\"" + errorMsg + "\"" +
|
||||
"}";
|
||||
}
|
||||
|
||||
@GetMapping(value="/accountList/{account}" , produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public String getAccountList(@PathVariable String account) {
|
||||
saslPayLog.log(account);
|
||||
sqlStatement = "SELECT * FROM " + t24DataTable +" WHERE accountId='" + account + "'";
|
||||
t24DataEntity = entityManager.createNativeQuery(sqlStatement,T24DataEntity.class).getResultList();
|
||||
if (t24DataEntity.isEmpty()){
|
||||
JSONObject object = new JSONObject();
|
||||
object.put("account", "\"" + account + "\"");
|
||||
object.put("errorMsg" ,"99");
|
||||
object.put("status" , "Customer Does Not Exist");
|
||||
return object + "";
|
||||
}{
|
||||
sqlStatement = "SELECT * FROM " + t24DataTable +" WHERE customerNo='" + t24DataEntity.get(0).getCustomerNo() + "'";
|
||||
t24DataEntity = entityManager.createNativeQuery(sqlStatement,T24DataEntity.class).getResultList();
|
||||
}
|
||||
|
||||
// JSONObject object = new JSONObject();
|
||||
JSONArray array = new JSONArray();
|
||||
int arraySize = t24DataEntity.size();
|
||||
int j = 0;
|
||||
for (int i = 0; i < arraySize; i++){
|
||||
ussdSubscribed = t24DataEntity.get(i).getUssdSubscribed();
|
||||
if (ussdSubscribed.equals("Y")){
|
||||
j++;
|
||||
accountId = t24DataEntity.get(i).getAccountId();
|
||||
//object.put( , accountId);
|
||||
//String shit = object.toString();
|
||||
Map m = new LinkedHashMap(1);
|
||||
m.put("account" + j , accountId );
|
||||
array.add(m);
|
||||
//System.out.println(shit);
|
||||
//String shit = object.toString();
|
||||
// object.remove("account" + j);
|
||||
}
|
||||
}
|
||||
|
||||
saslPayLog.log("{\"accountList\": " + array + ", \"status\" : \"00\" , \"errorMsg\" : \"\"}");
|
||||
return "{\"accountList\": " + array + ", \"status\" : \"00\" , \"errorMsg\" : \"\"}";
|
||||
}
|
||||
|
||||
@GetMapping(value="/balance/{account}" , produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public String getBalance(@PathVariable String account) {
|
||||
saslPayLog.log(account);
|
||||
sqlStatement = "SELECT * FROM " + t24DataTable +" WHERE accountId='" + account + "'";
|
||||
t24DataEntity = entityManager.createNativeQuery(sqlStatement,T24DataEntity.class).getResultList();
|
||||
if (t24DataEntity.isEmpty()){
|
||||
JSONObject object = new JSONObject();
|
||||
object.put("account", "\"" + account + "\"");
|
||||
object.put("errorMsg" ,"99");
|
||||
object.put("status" , "Account Does Not Exist");
|
||||
return object + "";
|
||||
}
|
||||
customerName = t24DataEntity.get(0).getCustomerName();
|
||||
acBalance = t24DataEntity.get(0).getAccountBalance();
|
||||
acStatus = t24DataEntity.get(0).getAcStatus();
|
||||
if (acStatus.equals("Y")){
|
||||
acStatus = "Inactive Account";
|
||||
} else {
|
||||
acStatus = "";
|
||||
}
|
||||
|
||||
errorMsg = "";
|
||||
status = "00";
|
||||
|
||||
saslPayLog.log("{\"Account\" :\"" + account + "\",\"" +
|
||||
"AcBalance\" :\"" + acBalance + "\",\"" +
|
||||
"AcName\" :\"" + customerName + "\",\"" +
|
||||
"AcStatus\" :\"" + acStatus + "\",\"" +
|
||||
"ErrorMsg\" :\"" + errorMsg + "\",\"" +
|
||||
"Status\" :\"" + status + "\"" +
|
||||
"}");
|
||||
|
||||
return "{\"Account\" :\"" + account + "\",\"" +
|
||||
"AcBalance\" :\"" + acBalance + "\",\"" +
|
||||
"AcName\" :\"" + customerName + "\",\"" +
|
||||
"AcStatus\" :\"" + acStatus + "\",\"" +
|
||||
"ErrorMsg\" :\"" + errorMsg + "\",\"" +
|
||||
"Status\" :\"" + status + "\"" +
|
||||
"}";
|
||||
}
|
||||
|
||||
@GetMapping(value="/customerDetails/{customerNo}" , produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public String getCustomerDetails(@PathVariable String customerNo) {
|
||||
saslPayLog.log(customerNo);
|
||||
sqlStatement = "SELECT * FROM " + t24DataTable +" WHERE customerNo='" + customerNo + "'";
|
||||
t24DataEntity = entityManager.createNativeQuery(sqlStatement,T24DataEntity.class).getResultList();
|
||||
if (t24DataEntity.isEmpty()){
|
||||
JSONObject object = new JSONObject();
|
||||
object.put("account", "\"" + customerNo + "\"");
|
||||
object.put("errorMsg" ,"99");
|
||||
object.put("status" , "Customer Does Not Exist");
|
||||
return object + "";
|
||||
}
|
||||
customerName = t24DataEntity.get(0).getCustomerName();
|
||||
dob = t24DataEntity.get(0).getDob();
|
||||
gender = t24DataEntity.get(0).getGender();
|
||||
emailAddress = t24DataEntity.get(0).getEmailAddress();
|
||||
phoneNumber = t24DataEntity.get(0).getPhoneNumber();
|
||||
branch = t24DataEntity.get(0).getBranch();
|
||||
branchName = t24DataEntity.get(0).getBranchName();
|
||||
identification = t24DataEntity.get(0).getCustomerId();
|
||||
custType = t24DataEntity.get(0).getCustomerType();
|
||||
errorMsg = "";
|
||||
status = "00";
|
||||
|
||||
saslPayLog.log("{\"customerDetails\" :[{\"" +
|
||||
"customerName\" :\"" + customerName + "\",\"" +
|
||||
"gender\" :\"" + gender + "\",\"" +
|
||||
"dob\" :\"" + dob + "\",\"" +
|
||||
"phoneNumber\" :\"" + phoneNumber + "\",\"" +
|
||||
"emailAddress\" :\"" + emailAddress + "\",\"" +
|
||||
"branch\" :\"" + branch + "\",\"" +
|
||||
"branchName\" :\"" + branchName + "\",\"" +
|
||||
"identification\" :\"" + identification + "\",\"" +
|
||||
"custType\" :\"" + custType + "\"}],\"" +
|
||||
"status\" :\"" + status + "\",\"" + "errorMsg\" :\"" + errorMsg + "\"" +
|
||||
"}");
|
||||
|
||||
return "{\"customerDetails\" :[{\"" +
|
||||
"customerName\" :\"" + customerName + "\",\"" +
|
||||
"gender\" :\"" + gender + "\",\"" +
|
||||
"dob\" :\"" + dob + "\",\"" +
|
||||
"phoneNumber\" :\"" + phoneNumber + "\",\"" +
|
||||
"emailAddress\" :\"" + emailAddress + "\",\"" +
|
||||
"branch\" :\"" + branch + "\",\"" +
|
||||
"branchName\" :\"" + branchName + "\",\"" +
|
||||
"identification\" :\"" + identification + "\",\"" +
|
||||
"custType\" :\"" + custType + "\"}],\"" +
|
||||
"status\" :\"" + status + "\",\"" + "errorMsg\" :\"" + errorMsg + "\"" +
|
||||
"}";
|
||||
}
|
||||
|
||||
@GetMapping(value = "/allAccounts", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public List<T24DataEntity> getAll() {
|
||||
// saslPayLog.log("Requst All Accounts");
|
||||
// t24DataEntity = t24DataServiceImpl.findAll();
|
||||
// saslPayLog.log(t24DataEntity.toString());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
//"{\"txnCode\" :\"" + txnCode + "\",\"" +
|
||||
// "api\" :\"" + api + "\",\"" +
|
||||
// "requestType\" :\"" + requestType + "\",\"" +
|
||||
// "otherTxnRef\" :\"" + txnRef + "\",\"" +
|
||||
// "drAccount\" :\"" + drAccount + "\",\"" +
|
||||
// "crAccount\" :\"" + crAccount + "\",\"" +
|
||||
// "ourTxnRef\" :\"" + "" + "\",\"" +
|
||||
// "errorMsg\" :\"" + error + "\",\"" +
|
||||
// "status\" :\"" + status + "\"" +
|
||||
// "}";
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.saslpay.controller;
|
||||
|
||||
import com.saslpay.datacapture.*;
|
||||
import com.saslpay.log.SaslPayLog;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/cbs/post")
|
||||
public class TransactionDataController {
|
||||
|
||||
SaslPayLog saslPayLog = new SaslPayLog();
|
||||
|
||||
@PostMapping(value = "/exttransfer", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public String postExtTxn(@RequestBody String request) throws IOException {
|
||||
saslPayLog.log(request);
|
||||
ExtTransferCapture extTransferCapture = new ExtTransferCapture();
|
||||
String response = extTransferCapture.extTransfer(request);
|
||||
saslPayLog.log(response);
|
||||
return response;
|
||||
}
|
||||
|
||||
@PostMapping(value = "/inttransfer", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public String postIntTxn(@RequestBody String request) throws IOException {
|
||||
saslPayLog.log(request);
|
||||
IntTransferCapture intTransferCapture = new IntTransferCapture();
|
||||
String response = intTransferCapture.intTransfer(request);
|
||||
saslPayLog.log(response);
|
||||
return response;
|
||||
}
|
||||
|
||||
@PostMapping(value = "/extreversal", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public String postExtRev(@RequestBody String request) throws IOException {
|
||||
saslPayLog.log(request);
|
||||
ExtReversalCapture extReversalrCapture = new ExtReversalCapture();
|
||||
String response = extReversalrCapture.extReversal(request);
|
||||
saslPayLog.log(response);
|
||||
return response;
|
||||
}
|
||||
|
||||
@PostMapping(value = "/intreversal", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public String postIntRev(@RequestBody String request) throws IOException {
|
||||
saslPayLog.log(request);
|
||||
IntReversalCapture intReversalCapture = new IntReversalCapture();
|
||||
String response = intReversalCapture.intReversal(request);
|
||||
saslPayLog.log(response);
|
||||
return response;
|
||||
}
|
||||
|
||||
@PostMapping(value = "/levyCharge", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public String postLevyCharge(@RequestBody String request) throws IOException {
|
||||
saslPayLog.log(request);
|
||||
LevyPay levyPay = new LevyPay();
|
||||
String response = levyPay.levyPay(request);
|
||||
saslPayLog.log(response);
|
||||
return response;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.saslpay.datacapture;
|
||||
|
||||
import com.saslpay.entities.T24DataEntity;
|
||||
import com.saslpay.impl.T24DataServiceImpl;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import com.saslpay.config.BeanUtil;
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.PersistenceContext;
|
||||
import java.sql.Date;
|
||||
|
||||
//@Component
|
||||
public class AccountDataCapture {
|
||||
|
||||
@PersistenceContext
|
||||
EntityManager entityManager;
|
||||
|
||||
@Autowired
|
||||
T24DataServiceImpl t24DataServiceImpl;
|
||||
|
||||
T24DataEntity t24DataEntity = new T24DataEntity();
|
||||
|
||||
public void importer(String body){
|
||||
|
||||
t24DataServiceImpl = BeanUtil.getBean(T24DataServiceImpl.class);
|
||||
entityManager = BeanUtil.getBean(EntityManager.class);
|
||||
|
||||
String accountId = StringUtils.substringBetween(body,"<accountId>","</accountId>");
|
||||
String category = StringUtils.substringBetween(body,"<category>","</category>");
|
||||
String customerNo = StringUtils.substringBetween(body,"<customerNo>","</customerNo>");
|
||||
String customerName = StringUtils.substringBetween(body,"<customerName>","</customerName>");
|
||||
String customerType = StringUtils.substringBetween(body,"<customerType>","</customerType>");
|
||||
String customerId = StringUtils.substringBetween(body,"<customerId>","</customerId>");
|
||||
String phoneNumber = StringUtils.substringBetween(body,"<phoneNumber>","</phoneNumber>");
|
||||
String branch = StringUtils.substringBetween(body,"<branch>","</branch>");
|
||||
String branchName = StringUtils.substringBetween(body,"<branchName>","</branchName>");
|
||||
String dob = StringUtils.substringBetween(body,"<dob>","</dob>");
|
||||
String emailAddress = StringUtils.substringBetween(body,"<emailAddress>","</emailAddress>");
|
||||
String gender = StringUtils.substringBetween(body,"<gender>","</gender>");
|
||||
String acStatus = StringUtils.substringBetween(body,"<acStatus>","</acStatus>");
|
||||
String accountBalance = StringUtils.substringBetween(body,"<accountBalance>","</accountBalance>");
|
||||
String maxCreditBalance = StringUtils.substringBetween(body,"<maxCreditBalance>","</maxCreditBalance>");
|
||||
String maxDebitBalance = StringUtils.substringBetween(body,"<maxDebitBalance>","</maxDebitBalance>");
|
||||
String debitAllowed = StringUtils.substringBetween(body,"<debitAllowed>","</debitAllowed>");
|
||||
String creditAllowed = StringUtils.substringBetween(body,"<creditAllowed>","</creditAllowed>");
|
||||
String ussdSubscribed = StringUtils.substringBetween(body,"<ussdSubscribed>","</ussdSubscribed>");
|
||||
|
||||
t24DataEntity.setAccountId(accountId);
|
||||
t24DataEntity.setCategory(category);
|
||||
t24DataEntity.setCustomerNo(customerNo);
|
||||
t24DataEntity.setCustomerName(customerName);
|
||||
t24DataEntity.setCustomerType(customerType);
|
||||
t24DataEntity.setCustomerId(customerId);
|
||||
t24DataEntity.setPhoneNumber(phoneNumber);
|
||||
t24DataEntity.setBranch(branch);
|
||||
t24DataEntity.setBranchName(branchName);
|
||||
t24DataEntity.setDob(dob);
|
||||
t24DataEntity.setEmailAddress(emailAddress);
|
||||
t24DataEntity.setGender(gender);
|
||||
t24DataEntity.setAcStatus(acStatus);
|
||||
t24DataEntity.setAccountBalance(Float.valueOf(accountBalance));
|
||||
t24DataEntity.setMaxCreditBalance(Float.valueOf(maxCreditBalance));
|
||||
t24DataEntity.setMaxDebitBalance(Float.valueOf(maxDebitBalance));
|
||||
t24DataEntity.setDebitAllowed(debitAllowed);
|
||||
t24DataEntity.setCreditAllowed(creditAllowed);
|
||||
t24DataEntity.setUssdSubscribed(ussdSubscribed);
|
||||
t24DataServiceImpl.save(t24DataEntity);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,399 @@
|
||||
package com.saslpay.datacapture;
|
||||
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParser;
|
||||
import com.saslpay.config.AppPropertiesConfig;
|
||||
import com.saslpay.config.BeanUtil;
|
||||
import com.saslpay.entities.T24DataEntity;
|
||||
import com.saslpay.entities.TransactionDataEntity;
|
||||
import com.saslpay.impl.T24DataServiceImpl;
|
||||
import com.saslpay.impl.TransactionDataServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.PersistenceContext;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static org.aspectj.util.LangUtil.isEmpty;
|
||||
|
||||
public class ExtReversalCapture {
|
||||
|
||||
@PersistenceContext
|
||||
EntityManager entityManager;
|
||||
|
||||
@Autowired
|
||||
TransactionDataServiceImpl transactionDataServiceImpl;
|
||||
|
||||
@Autowired
|
||||
T24DataServiceImpl t24DataServiceImpl;
|
||||
|
||||
TransactionDataEntity transactionDataEntitySave = new TransactionDataEntity();
|
||||
T24DataEntity t24DataEntitySave = new T24DataEntity();
|
||||
List<TransactionDataEntity> transactionDataEntity;
|
||||
List<T24DataEntity> t24DataEntity;
|
||||
|
||||
AppPropertiesConfig configClass = BeanUtil.getBean(AppPropertiesConfig.class);
|
||||
String t24DataTable = configClass.getT24DataTable();
|
||||
String transactionDataTable = configClass.getTransactionDataTable();
|
||||
String outFolder = configClass.getOutFolder();
|
||||
|
||||
String sqlStatement;
|
||||
String errorMessage;
|
||||
String txnCode;
|
||||
String hold;
|
||||
String bankWallet;
|
||||
String customerName;
|
||||
String customerBranch;
|
||||
String drAccount;
|
||||
String crAccount;
|
||||
String txnCurrency;
|
||||
String txnAmount;
|
||||
String txnCharge;
|
||||
String txnNarration;
|
||||
String api;
|
||||
String requestType;
|
||||
String txnRef;
|
||||
String ftRef;
|
||||
String errorMsg;
|
||||
String statusMsg;
|
||||
String txnStatus = "";
|
||||
String account;
|
||||
Float sumBalance = 0.0F;
|
||||
Float newBalance = 0.0F;
|
||||
Float acBalance = 0.0F;
|
||||
Float fullAmt;
|
||||
|
||||
// @PostMapping(value ="/extreversal" ,produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public String extReversal(String request) throws IOException {
|
||||
|
||||
JsonElement jsonElementAuth = JsonParser.parseString(request);
|
||||
JsonObject jsonObjectAuth = jsonElementAuth.getAsJsonObject();
|
||||
transactionDataServiceImpl = BeanUtil.getBean(TransactionDataServiceImpl.class);
|
||||
t24DataServiceImpl = BeanUtil.getBean(T24DataServiceImpl.class);
|
||||
entityManager = BeanUtil.getBean(EntityManager.class);
|
||||
|
||||
|
||||
try {
|
||||
txnCode = jsonObjectAuth.get("txnCode").getAsString();
|
||||
api = jsonObjectAuth.get("api").getAsString();
|
||||
requestType = jsonObjectAuth.get("requestType").getAsString();
|
||||
ftRef = jsonObjectAuth.get("ourTxnRef").getAsString();
|
||||
txnRef = jsonObjectAuth.get("otherTxnRef").getAsString();
|
||||
hold = jsonObjectAuth.get("hold").getAsString();
|
||||
bankWallet = jsonObjectAuth.get("bankWallet").getAsString();
|
||||
customerName = jsonObjectAuth.get("customerName").getAsString();
|
||||
customerBranch = jsonObjectAuth.get("customerBranch").getAsString();
|
||||
drAccount = jsonObjectAuth.get("drAccount").getAsString();
|
||||
crAccount = jsonObjectAuth.get("crAccount").getAsString();
|
||||
txnCurrency = jsonObjectAuth.get("txnCurrency").getAsString();
|
||||
txnAmount = jsonObjectAuth.get("txnAmount").getAsString();
|
||||
txnCharge = jsonObjectAuth.get("txnCharge").getAsString();
|
||||
txnNarration = jsonObjectAuth.get("txnNarration").getAsString();
|
||||
|
||||
} catch (NullPointerException e) {
|
||||
errorMessage = e.getLocalizedMessage();
|
||||
}
|
||||
|
||||
if (txnRef.isEmpty()){
|
||||
errorMsg = "Payment Reference Empty";
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
String transactionDataQuery = "SELECT * FROM " + transactionDataTable + " WHERE txnRef='" + txnRef + "'";
|
||||
transactionDataEntity = entityManager.createNativeQuery(transactionDataQuery, TransactionDataEntity.class).getResultList();
|
||||
boolean isTxnEmpty = isEmpty(transactionDataEntity);
|
||||
if (isTxnEmpty){
|
||||
errorMsg = "Payment Reference Invalid - " + txnRef;
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
crAccount = transactionDataEntity.get(0).getCrAccount();
|
||||
drAccount = transactionDataEntity.get(0).getDrAccount();
|
||||
txnCode = transactionDataEntity.get(0).getTxnCode();
|
||||
api = transactionDataEntity.get(0).getApi();
|
||||
requestType = transactionDataEntity.get(0).getRequestType();
|
||||
|
||||
switch (txnCode){
|
||||
case "extDebTrf":
|
||||
account = drAccount;
|
||||
sqlStatement = "SELECT * FROM " + t24DataTable +" WHERE accountId='" + account + "'";
|
||||
t24DataEntity = entityManager.createNativeQuery(sqlStatement,T24DataEntity.class).getResultList();
|
||||
boolean isDebEmpty = isEmpty(t24DataEntity);
|
||||
if (isDebEmpty){
|
||||
errorMsg = "Debit Account Number - " + drAccount + " Does Not Exist";
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
fullAmt = transactionDataEntity.get(0).getTxnAmount() + transactionDataEntity.get(0).getTxnCharge();
|
||||
acBalance = t24DataEntity.get(0).getAccountBalance();
|
||||
newBalance = fullAmt + acBalance ;
|
||||
break;
|
||||
case "extCredTrf":
|
||||
account = crAccount;
|
||||
sqlStatement = "SELECT * FROM " + t24DataTable +" WHERE accountId='" + account + "'";
|
||||
t24DataEntity = entityManager.createNativeQuery(sqlStatement,T24DataEntity.class).getResultList();
|
||||
boolean isCreEmpty = isEmpty(t24DataEntity);
|
||||
if (isCreEmpty){
|
||||
errorMsg = "Credit Account Number - " + crAccount + " Does Not Exist";
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
fullAmt = transactionDataEntity.get(0).getTxnAmount() + transactionDataEntity.get(0).getTxnCharge();
|
||||
acBalance = t24DataEntity.get(0).getAccountBalance();
|
||||
newBalance = acBalance - fullAmt;
|
||||
break;
|
||||
}
|
||||
|
||||
txnStatus = transactionDataEntity.get(0).getTxnStatus();
|
||||
switch (hold){
|
||||
case "F":
|
||||
|
||||
if(txnStatus.equals("hold")){
|
||||
errorMsg = "Cannot Reverse Transaction in hold - " + txnRef;
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
if(txnStatus.equals("del")){
|
||||
errorMsg = "Transaction Deleted - " + txnRef;
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
if(txnStatus.equals("rev")){
|
||||
errorMsg = "Transaction Already Reversed! - " + txnRef;
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
if(txnStatus.equals("revch")){
|
||||
errorMsg = "Charge Already Reversed, Can Only reverse Amount- " + txnRef;
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
if(txnStatus.equals("revamt")){
|
||||
errorMsg = "Amount Already Reversed, Can Only reverse Charge - " + txnRef;
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
transactionDataEntitySave.setTxnRef(txnRef);
|
||||
transactionDataEntitySave.setApi(transactionDataEntity.get(0).getApi());
|
||||
transactionDataEntitySave.setHold(hold);
|
||||
transactionDataEntitySave.setRequestType(transactionDataEntity.get(0).getRequestType());
|
||||
transactionDataEntitySave.setFtId(transactionDataEntity.get(0).getFtId());
|
||||
transactionDataEntitySave.setTxnCode(transactionDataEntity.get(0).getTxnCode());
|
||||
transactionDataEntitySave.setBankWallet(transactionDataEntity.get(0).getBankWallet());
|
||||
transactionDataEntitySave.setCustomerBranch(transactionDataEntity.get(0).getCustomerBranch());
|
||||
transactionDataEntitySave.setDrAccount(transactionDataEntity.get(0).getDrAccount());
|
||||
transactionDataEntitySave.setCrAccount(transactionDataEntity.get(0).getCrAccount());
|
||||
transactionDataEntitySave.setTxnAmount(transactionDataEntity.get(0).getTxnAmount());
|
||||
transactionDataEntitySave.setTxnCharge(transactionDataEntity.get(0).getTxnCharge());
|
||||
transactionDataEntitySave.setTxnCurrency(transactionDataEntity.get(0).getTxnCurrency());
|
||||
transactionDataEntitySave.setTxnNarration(transactionDataEntity.get(0).getTxnNarration());
|
||||
transactionDataEntitySave.setTxnStatus("rev");
|
||||
transactionDataEntitySave.setProcessFlag("Y");
|
||||
transactionDataEntitySave.setElevyCharge(transactionDataEntity.get(0).getElevyCharge());
|
||||
transactionDataServiceImpl.save(transactionDataEntitySave);
|
||||
|
||||
t24DataEntitySave.setAccountId(account);
|
||||
t24DataEntitySave.setAccountBalance(newBalance);
|
||||
t24DataEntitySave.setCategory(t24DataEntity.get(0).getCategory());
|
||||
t24DataEntitySave.setCustomerNo(t24DataEntity.get(0).getCustomerNo());
|
||||
t24DataEntitySave.setCustomerName(t24DataEntity.get(0).getCustomerName());
|
||||
t24DataEntitySave.setCustomerType(t24DataEntity.get(0).getCustomerType());
|
||||
t24DataEntitySave.setCustomerId(t24DataEntity.get(0).getCustomerId());
|
||||
t24DataEntitySave.setPhoneNumber(t24DataEntity.get(0).getPhoneNumber());
|
||||
t24DataEntitySave.setBranch(t24DataEntity.get(0).getBranch());
|
||||
t24DataEntitySave.setBranchName(t24DataEntity.get(0).getBranchName());
|
||||
t24DataEntitySave.setDob(t24DataEntity.get(0).getDob());
|
||||
t24DataEntitySave.setEmailAddress(t24DataEntity.get(0).getEmailAddress());
|
||||
t24DataEntitySave.setGender(t24DataEntity.get(0).getGender());
|
||||
t24DataEntitySave.setAcStatus(t24DataEntity.get(0).getAcStatus());
|
||||
t24DataEntitySave.setMaxDebitBalance(t24DataEntity.get(0).getMaxDebitBalance());
|
||||
t24DataEntitySave.setMaxCreditBalance(t24DataEntity.get(0).getMaxCreditBalance());
|
||||
t24DataEntitySave.setDebitAllowed(t24DataEntity.get(0).getDebitAllowed());
|
||||
t24DataEntitySave.setCreditAllowed(t24DataEntity.get(0).getCreditAllowed());
|
||||
t24DataEntitySave.setUssdSubscribed(t24DataEntity.get(0).getUssdSubscribed());
|
||||
t24DataServiceImpl.save(t24DataEntitySave);
|
||||
|
||||
break;
|
||||
|
||||
case "A":
|
||||
|
||||
if(txnStatus.equals("hold")){
|
||||
errorMsg = "Cannot Reverse Transaction in hold - " + txnRef;
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
if(txnStatus.equals("del")){
|
||||
errorMsg = "Transaction Deleted - " + txnRef;
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
if(txnStatus.equals("rev")){
|
||||
errorMsg = "Transaction Already Reversed! - " + txnRef;
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
if(txnStatus.equals("revamt")){
|
||||
errorMsg = "Amount Already Reversed, Can Only reverse Charge - " + txnRef;
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
transactionDataEntitySave.setTxnRef(txnRef);
|
||||
transactionDataEntitySave.setApi(transactionDataEntity.get(0).getApi());
|
||||
transactionDataEntitySave.setHold(hold);
|
||||
transactionDataEntitySave.setRequestType(transactionDataEntity.get(0).getRequestType());
|
||||
transactionDataEntitySave.setFtId(transactionDataEntity.get(0).getFtId());
|
||||
transactionDataEntitySave.setTxnCode(transactionDataEntity.get(0).getTxnCode());
|
||||
transactionDataEntitySave.setBankWallet(transactionDataEntity.get(0).getBankWallet());
|
||||
transactionDataEntitySave.setCustomerName(transactionDataEntity.get(0).getCustomerName());
|
||||
transactionDataEntitySave.setCustomerBranch(transactionDataEntity.get(0).getCustomerBranch());
|
||||
transactionDataEntitySave.setDrAccount(transactionDataEntity.get(0).getDrAccount());
|
||||
transactionDataEntitySave.setCrAccount(transactionDataEntity.get(0).getCrAccount());
|
||||
transactionDataEntitySave.setTxnAmount(transactionDataEntity.get(0).getTxnAmount());
|
||||
transactionDataEntitySave.setTxnCharge(transactionDataEntity.get(0).getTxnCharge());
|
||||
transactionDataEntitySave.setTxnCurrency(transactionDataEntity.get(0).getTxnCurrency());
|
||||
transactionDataEntitySave.setTxnNarration(transactionDataEntity.get(0).getTxnNarration());
|
||||
transactionDataEntitySave.setTxnStatus("revamt");
|
||||
transactionDataEntitySave.setProcessFlag("Y");
|
||||
transactionDataEntitySave.setElevyCharge(transactionDataEntity.get(0).getElevyCharge());
|
||||
transactionDataServiceImpl.save(transactionDataEntitySave);
|
||||
|
||||
t24DataEntitySave.setAccountId(account);
|
||||
t24DataEntitySave.setAccountBalance(newBalance);
|
||||
t24DataEntitySave.setCategory(t24DataEntity.get(0).getCategory());
|
||||
t24DataEntitySave.setCustomerNo(t24DataEntity.get(0).getCustomerNo());
|
||||
t24DataEntitySave.setCustomerName(t24DataEntity.get(0).getCustomerName());
|
||||
t24DataEntitySave.setCustomerType(t24DataEntity.get(0).getCustomerType());
|
||||
t24DataEntitySave.setCustomerId(t24DataEntity.get(0).getCustomerId());
|
||||
t24DataEntitySave.setPhoneNumber(t24DataEntity.get(0).getPhoneNumber());
|
||||
t24DataEntitySave.setBranch(t24DataEntity.get(0).getBranch());
|
||||
t24DataEntitySave.setBranchName(t24DataEntity.get(0).getBranchName());
|
||||
t24DataEntitySave.setDob(t24DataEntity.get(0).getDob());
|
||||
t24DataEntitySave.setEmailAddress(t24DataEntity.get(0).getEmailAddress());
|
||||
t24DataEntitySave.setGender(t24DataEntity.get(0).getGender());
|
||||
t24DataEntitySave.setAcStatus(t24DataEntity.get(0).getAcStatus());
|
||||
t24DataEntitySave.setMaxDebitBalance(t24DataEntity.get(0).getMaxDebitBalance());
|
||||
t24DataEntitySave.setMaxCreditBalance(t24DataEntity.get(0).getMaxCreditBalance());
|
||||
t24DataEntitySave.setDebitAllowed(t24DataEntity.get(0).getDebitAllowed());
|
||||
t24DataEntitySave.setCreditAllowed(t24DataEntity.get(0).getCreditAllowed());
|
||||
t24DataEntitySave.setUssdSubscribed(t24DataEntity.get(0).getUssdSubscribed());
|
||||
t24DataServiceImpl.save(t24DataEntitySave);
|
||||
|
||||
break;
|
||||
case "C":
|
||||
|
||||
if(txnStatus.equals("hold")){
|
||||
errorMsg = "Cannot Reverse Transaction in hold - " + txnRef;
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
if(txnStatus.equals("del")){
|
||||
errorMsg = "Transaction Deleted - " + txnRef;
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
|
||||
if(txnStatus.equals("rev")){
|
||||
errorMsg = "Transaction Already Reversed! - " + txnRef;
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
if(txnStatus.equals("revchg")){
|
||||
errorMsg = "Charge Already Reversed, Can Only reverse Amount- " + txnRef;
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
transactionDataEntitySave.setTxnRef(txnRef);
|
||||
transactionDataEntitySave.setApi(transactionDataEntity.get(0).getApi());
|
||||
transactionDataEntitySave.setHold(hold);
|
||||
transactionDataEntitySave.setRequestType(transactionDataEntity.get(0).getRequestType());
|
||||
transactionDataEntitySave.setFtId(ftRef);
|
||||
transactionDataEntitySave.setTxnCode(transactionDataEntity.get(0).getTxnCode());
|
||||
transactionDataEntitySave.setBankWallet(transactionDataEntity.get(0).getBankWallet());
|
||||
transactionDataEntitySave.setCustomerName(transactionDataEntity.get(0).getCustomerName());
|
||||
transactionDataEntitySave.setCustomerBranch(transactionDataEntity.get(0).getCustomerBranch());
|
||||
transactionDataEntitySave.setDrAccount(transactionDataEntity.get(0).getDrAccount());
|
||||
transactionDataEntitySave.setCrAccount(transactionDataEntity.get(0).getCrAccount());
|
||||
transactionDataEntitySave.setTxnAmount(transactionDataEntity.get(0).getTxnAmount());
|
||||
transactionDataEntitySave.setTxnCharge(transactionDataEntity.get(0).getTxnCharge());
|
||||
transactionDataEntitySave.setTxnCurrency(transactionDataEntity.get(0).getTxnCurrency());
|
||||
transactionDataEntitySave.setTxnNarration(transactionDataEntity.get(0).getTxnNarration());
|
||||
transactionDataEntitySave.setTxnStatus("revchg");
|
||||
transactionDataEntitySave.setProcessFlag("Y");
|
||||
transactionDataEntitySave.setElevyCharge(transactionDataEntity.get(0).getElevyCharge());
|
||||
transactionDataServiceImpl.save(transactionDataEntitySave);
|
||||
|
||||
t24DataEntitySave.setAccountId(account);
|
||||
t24DataEntitySave.setAccountBalance(acBalance);
|
||||
t24DataEntitySave.setCategory(t24DataEntity.get(0).getCategory());
|
||||
t24DataEntitySave.setCustomerNo(t24DataEntity.get(0).getCustomerNo());
|
||||
t24DataEntitySave.setCustomerName(t24DataEntity.get(0).getCustomerName());
|
||||
t24DataEntitySave.setCustomerType(t24DataEntity.get(0).getCustomerType());
|
||||
t24DataEntitySave.setCustomerId(t24DataEntity.get(0).getCustomerId());
|
||||
t24DataEntitySave.setPhoneNumber(t24DataEntity.get(0).getPhoneNumber());
|
||||
t24DataEntitySave.setBranch(t24DataEntity.get(0).getBranch());
|
||||
t24DataEntitySave.setBranchName(t24DataEntity.get(0).getBranchName());
|
||||
t24DataEntitySave.setDob(t24DataEntity.get(0).getDob());
|
||||
t24DataEntitySave.setEmailAddress(t24DataEntity.get(0).getEmailAddress());
|
||||
t24DataEntitySave.setGender(t24DataEntity.get(0).getGender());
|
||||
t24DataEntitySave.setAcStatus(t24DataEntity.get(0).getAcStatus());
|
||||
t24DataEntitySave.setMaxDebitBalance(t24DataEntity.get(0).getMaxDebitBalance());
|
||||
t24DataEntitySave.setMaxCreditBalance(t24DataEntity.get(0).getMaxCreditBalance());
|
||||
t24DataEntitySave.setDebitAllowed(t24DataEntity.get(0).getDebitAllowed());
|
||||
t24DataEntitySave.setCreditAllowed(t24DataEntity.get(0).getCreditAllowed());
|
||||
t24DataEntitySave.setUssdSubscribed(t24DataEntity.get(0).getUssdSubscribed());
|
||||
t24DataServiceImpl.save(t24DataEntitySave);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
errorMsg = "Invalid Option";
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
errorMsg = "";
|
||||
statusMsg = "00";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
// public void txnWriter(String outRequest) throws IOException {
|
||||
// FileWriter myWriter = new FileWriter(outFolder + "/"+ txnRef + ".xml");
|
||||
// myWriter.write(outRequest);
|
||||
// myWriter.close();
|
||||
// }
|
||||
|
||||
public String outValue(String api, String txnCode, String requestType, String drAccount, String crAccount, String txnRef, String error, String status){
|
||||
|
||||
return "{\"txnCode\" :\"" + txnCode + "\",\"" +
|
||||
"api\" :\"" + api + "\",\"" +
|
||||
"requestType\" :\"" + requestType + "\",\"" +
|
||||
"otherTxnRef\" :\"" + txnRef + "\",\"" +
|
||||
"drAccount\" :\"" + drAccount + "\",\"" +
|
||||
"crAccount\" :\"" + crAccount + "\",\"" +
|
||||
"ourTxnRef\" :\"" + "" + "\",\"" +
|
||||
"errorMsg\" :\"" + error + "\",\"" +
|
||||
"status\" :\"" + status + "\"" +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,452 @@
|
||||
package com.saslpay.datacapture;
|
||||
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParser;
|
||||
import com.saslpay.config.AppPropertiesConfig;
|
||||
import com.saslpay.config.BeanUtil;
|
||||
import com.saslpay.entities.T24DataEntity;
|
||||
import com.saslpay.entities.TransactionDataEntity;
|
||||
import com.saslpay.impl.T24DataServiceImpl;
|
||||
import com.saslpay.impl.TransactionDataServiceImpl;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.PersistenceContext;
|
||||
import java.io.IOException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import static org.aspectj.util.LangUtil.isEmpty;
|
||||
|
||||
public class ExtTransferCapture {
|
||||
|
||||
@PersistenceContext
|
||||
EntityManager entityManager;
|
||||
|
||||
@Autowired
|
||||
TransactionDataServiceImpl transactionDataServiceImpl;
|
||||
|
||||
@Autowired
|
||||
T24DataServiceImpl t24DataServiceImpl;
|
||||
|
||||
TransactionDataEntity transactionDataEntitySave = new TransactionDataEntity();
|
||||
T24DataEntity t24DataEntitySave = new T24DataEntity();
|
||||
List<TransactionDataEntity> transactionDataEntity;
|
||||
List<T24DataEntity> t24DataEntity;
|
||||
|
||||
AppPropertiesConfig configClass = BeanUtil.getBean(AppPropertiesConfig.class);
|
||||
String t24DataTable = configClass.getT24DataTable();
|
||||
String transactionDataTable = configClass.getTransactionDataTable();
|
||||
String outFolder = configClass.getOutFolder();
|
||||
String sqlStatement;
|
||||
String account;
|
||||
String errorMessage;
|
||||
String txnCode;
|
||||
String txnRef;
|
||||
String ftRef;
|
||||
String hold;
|
||||
String bankWallet;
|
||||
String customerName;
|
||||
String customerBranch;
|
||||
String drAccount;
|
||||
String crAccount;
|
||||
String txnCurrency;
|
||||
String txnAmount;
|
||||
String txnCharge;
|
||||
String txnNarration;
|
||||
String api;
|
||||
String requestType;
|
||||
String elevyCharge;
|
||||
String readRef = "";
|
||||
String txnStatus = "";
|
||||
String errorMsg;
|
||||
String statusMsg;
|
||||
Float sumBalance = 0.00F;
|
||||
Float newBalance = 0.0F;
|
||||
Float minBalance = 0.0F;
|
||||
Float maxBalance = 0.0F;
|
||||
Float acBalance = 0.0F;
|
||||
|
||||
public String extTransfer(String request) throws IOException {
|
||||
|
||||
JsonElement jsonElementAuth = JsonParser.parseString(request);
|
||||
JsonObject jsonObjectAuth = jsonElementAuth.getAsJsonObject();
|
||||
transactionDataServiceImpl = BeanUtil.getBean(TransactionDataServiceImpl.class);
|
||||
t24DataServiceImpl = BeanUtil.getBean(T24DataServiceImpl.class);
|
||||
entityManager = BeanUtil.getBean(EntityManager.class);
|
||||
|
||||
try {
|
||||
txnCode = jsonObjectAuth.get("txnCode").getAsString();
|
||||
api = jsonObjectAuth.get("api").getAsString();
|
||||
requestType = jsonObjectAuth.get("requestType").getAsString();
|
||||
ftRef = jsonObjectAuth.get("ourTxnRef").getAsString();
|
||||
txnRef = jsonObjectAuth.get("otherTxnRef").getAsString();
|
||||
hold = jsonObjectAuth.get("hold").getAsString();
|
||||
bankWallet = jsonObjectAuth.get("bankWallet").getAsString();
|
||||
customerName = jsonObjectAuth.get("customerName").getAsString();
|
||||
customerBranch = jsonObjectAuth.get("customerBranch").getAsString();
|
||||
drAccount = jsonObjectAuth.get("drAccount").getAsString();
|
||||
crAccount = jsonObjectAuth.get("crAccount").getAsString();
|
||||
txnCurrency = jsonObjectAuth.get("txnCurrency").getAsString();
|
||||
txnAmount = jsonObjectAuth.get("txnAmount").getAsString();
|
||||
txnCharge = jsonObjectAuth.get("txnCharge").getAsString();
|
||||
txnNarration = jsonObjectAuth.get("txnNarration").getAsString();
|
||||
elevyCharge = jsonObjectAuth.get("elevyCharge").getAsString();
|
||||
sumBalance = Float.parseFloat(txnAmount) + Float.parseFloat(txnCharge) + Float.parseFloat(elevyCharge);
|
||||
|
||||
} catch (NullPointerException e) {
|
||||
errorMessage = e.getLocalizedMessage();
|
||||
}
|
||||
|
||||
if (txnRef.isEmpty()){
|
||||
errorMsg = "Payment Reference Empty";
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg, ftRef);
|
||||
}
|
||||
|
||||
if (drAccount.equals(crAccount)) {
|
||||
errorMsg = "Cannot Debit and Credit Same Account Number";
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg, ftRef);
|
||||
}
|
||||
|
||||
switch (txnCode){
|
||||
case "extDebTrf":
|
||||
account = drAccount;
|
||||
sqlStatement = "SELECT * FROM " + t24DataTable +" WHERE accountId='" + account + "'";
|
||||
t24DataEntity = entityManager.createNativeQuery(sqlStatement,T24DataEntity.class).getResultList();
|
||||
boolean isDebEmpty = isEmpty(t24DataEntity);
|
||||
if (isDebEmpty){
|
||||
errorMsg = "Debit Account Number - " + drAccount + " Does Not Exist";
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg, ftRef);
|
||||
}
|
||||
|
||||
String debitAllowed = t24DataEntity.get(0).getDebitAllowed();
|
||||
if (debitAllowed.equals("N")) {
|
||||
errorMsg = drAccount + " - Customer Account - Is not allowed to Send Funds";
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg, ftRef);
|
||||
}
|
||||
|
||||
String inactiveMarker = t24DataEntity.get(0).getAcStatus();
|
||||
if (inactiveMarker.equals("Y")) {
|
||||
errorMsg = "Account Number - " + drAccount + " is Inactive";
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg, ftRef);
|
||||
}
|
||||
|
||||
minBalance = t24DataEntity.get(0).getMaxDebitBalance();
|
||||
maxBalance = t24DataEntity.get(0).getMaxCreditBalance();
|
||||
acBalance = t24DataEntity.get(0).getAccountBalance();
|
||||
|
||||
if (sumBalance > acBalance){
|
||||
errorMsg = "Account Number - " +drAccount + " has Insufficient Funds";
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg, ftRef);
|
||||
}
|
||||
|
||||
Float balanceDifference = acBalance - sumBalance;
|
||||
if(minBalance > balanceDifference){
|
||||
errorMsg = "Debit Exceeds Minimum Balance";
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg, ftRef);
|
||||
}
|
||||
|
||||
if (sumBalance > maxBalance){
|
||||
errorMsg = "Transaction Amount Exceeds Maximum Transaction Limit";
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg, ftRef);
|
||||
}
|
||||
|
||||
newBalance = balanceDifference;
|
||||
break;
|
||||
case "extCredTrf":
|
||||
account = crAccount;
|
||||
sqlStatement = "SELECT * FROM " + t24DataTable +" WHERE accountId='" + account + "'";
|
||||
t24DataEntity = entityManager.createNativeQuery(sqlStatement,T24DataEntity.class).getResultList();
|
||||
boolean isCreEmpty = isEmpty(t24DataEntity);
|
||||
if (isCreEmpty){
|
||||
errorMsg = "Credit Account Number - " + crAccount + " Does Not Exist";
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg, ftRef);
|
||||
}
|
||||
|
||||
String creditAllowed = t24DataEntity.get(0).getCreditAllowed();
|
||||
if (creditAllowed.equals("N")) {
|
||||
errorMsg = crAccount + " - Customer Account - Is not allowed to Recieve Funds";
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg, ftRef);
|
||||
}
|
||||
|
||||
acBalance = t24DataEntity.get(0).getAccountBalance();
|
||||
newBalance = acBalance + sumBalance;
|
||||
break;
|
||||
}
|
||||
|
||||
String transactionDataQuery = "SELECT * FROM " + transactionDataTable + " WHERE txnRef='" + txnRef + "'";
|
||||
transactionDataEntity = entityManager.createNativeQuery(transactionDataQuery,TransactionDataEntity.class).getResultList();
|
||||
boolean isTxnEmpty = isEmpty(transactionDataEntity);
|
||||
if (isTxnEmpty){
|
||||
readRef = "";
|
||||
txnStatus = "";
|
||||
} else {
|
||||
readRef = transactionDataEntity.get(0).getTxnRef();
|
||||
txnStatus = transactionDataEntity.get(0).getTxnStatus();
|
||||
}
|
||||
|
||||
String newRef = geFundsTransferRef();
|
||||
|
||||
switch (hold){
|
||||
case "":
|
||||
|
||||
if (readRef.isEmpty()) {
|
||||
|
||||
transactionDataEntitySave.setTxnRef(txnRef);
|
||||
transactionDataEntitySave.setApi(api);
|
||||
transactionDataEntitySave.setHold(hold);
|
||||
transactionDataEntitySave.setRequestType(requestType);
|
||||
transactionDataEntitySave.setFtId(newRef);
|
||||
transactionDataEntitySave.setTxnCode(txnCode);
|
||||
transactionDataEntitySave.setBankWallet(bankWallet);
|
||||
transactionDataEntitySave.setCustomerName(customerName);
|
||||
transactionDataEntitySave.setCustomerBranch(customerBranch);
|
||||
transactionDataEntitySave.setDrAccount(drAccount);
|
||||
transactionDataEntitySave.setCrAccount(crAccount);
|
||||
transactionDataEntitySave.setTxnAmount(Float.parseFloat(txnAmount));
|
||||
transactionDataEntitySave.setElevyCharge(Float.parseFloat(elevyCharge));
|
||||
transactionDataEntitySave.setTxnCharge(Float.parseFloat(txnCharge));
|
||||
transactionDataEntitySave.setTxnCurrency(txnCurrency);
|
||||
transactionDataEntitySave.setTxnNarration(txnNarration);
|
||||
transactionDataEntitySave.setTxnStatus("auth");
|
||||
transactionDataEntitySave.setTransactionType("extTransfer");
|
||||
transactionDataServiceImpl.save(transactionDataEntitySave);
|
||||
|
||||
t24DataEntitySave.setAccountId(account);
|
||||
t24DataEntitySave.setAccountBalance(newBalance);
|
||||
t24DataEntitySave.setCategory(t24DataEntity.get(0).getCategory());
|
||||
t24DataEntitySave.setCustomerNo(t24DataEntity.get(0).getCustomerNo());
|
||||
t24DataEntitySave.setCustomerName(t24DataEntity.get(0).getCustomerName());
|
||||
t24DataEntitySave.setCustomerType(t24DataEntity.get(0).getCustomerType());
|
||||
t24DataEntitySave.setCustomerId(t24DataEntity.get(0).getCustomerId());
|
||||
t24DataEntitySave.setPhoneNumber(t24DataEntity.get(0).getPhoneNumber());
|
||||
t24DataEntitySave.setBranch(t24DataEntity.get(0).getBranch());
|
||||
t24DataEntitySave.setBranchName(t24DataEntity.get(0).getBranchName());
|
||||
t24DataEntitySave.setDob(t24DataEntity.get(0).getDob());
|
||||
t24DataEntitySave.setEmailAddress(t24DataEntity.get(0).getEmailAddress());
|
||||
t24DataEntitySave.setGender(t24DataEntity.get(0).getGender());
|
||||
t24DataEntitySave.setAcStatus(t24DataEntity.get(0).getAcStatus());
|
||||
t24DataEntitySave.setMaxDebitBalance(t24DataEntity.get(0).getMaxDebitBalance());
|
||||
t24DataEntitySave.setMaxCreditBalance(t24DataEntity.get(0).getMaxCreditBalance());
|
||||
t24DataEntitySave.setDebitAllowed(t24DataEntity.get(0).getDebitAllowed());
|
||||
t24DataEntitySave.setCreditAllowed(t24DataEntity.get(0).getCreditAllowed());
|
||||
t24DataEntitySave.setUssdSubscribed(t24DataEntity.get(0).getUssdSubscribed());
|
||||
t24DataServiceImpl.save(t24DataEntitySave);
|
||||
ftRef = newRef;
|
||||
// txnWriter(request);
|
||||
} else {
|
||||
errorMsg = "Duplicate Transaction - " + txnRef;
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg, ftRef);
|
||||
}
|
||||
break;
|
||||
|
||||
case "H":
|
||||
|
||||
if (readRef.isEmpty()){
|
||||
|
||||
transactionDataEntitySave.setTxnRef(txnRef);
|
||||
transactionDataEntitySave.setApi(api);
|
||||
transactionDataEntitySave.setHold(hold);
|
||||
transactionDataEntitySave.setRequestType(requestType);
|
||||
transactionDataEntitySave.setFtId(newRef);
|
||||
transactionDataEntitySave.setTxnCode(txnCode);
|
||||
transactionDataEntitySave.setBankWallet(bankWallet);
|
||||
transactionDataEntitySave.setCustomerName(customerName);
|
||||
transactionDataEntitySave.setCustomerBranch(customerBranch);
|
||||
transactionDataEntitySave.setDrAccount(drAccount);
|
||||
transactionDataEntitySave.setCrAccount(crAccount);
|
||||
transactionDataEntitySave.setTxnAmount(Float.parseFloat(txnAmount));
|
||||
transactionDataEntitySave.setElevyCharge(Float.parseFloat(elevyCharge));
|
||||
transactionDataEntitySave.setTxnCharge(Float.parseFloat(txnCharge));
|
||||
transactionDataEntitySave.setTxnCurrency(txnCurrency);
|
||||
transactionDataEntitySave.setTxnNarration(txnNarration);
|
||||
transactionDataEntitySave.setTxnStatus("hold");
|
||||
transactionDataEntitySave.setTransactionType("extTransfer");
|
||||
transactionDataServiceImpl.save(transactionDataEntitySave);
|
||||
|
||||
t24DataEntitySave.setAccountId(account);
|
||||
t24DataEntitySave.setAccountBalance(newBalance);
|
||||
t24DataEntitySave.setCategory(t24DataEntity.get(0).getCategory());
|
||||
t24DataEntitySave.setCustomerNo(t24DataEntity.get(0).getCustomerNo());
|
||||
t24DataEntitySave.setCustomerName(t24DataEntity.get(0).getCustomerName());
|
||||
t24DataEntitySave.setCustomerType(t24DataEntity.get(0).getCustomerType());
|
||||
t24DataEntitySave.setCustomerId(t24DataEntity.get(0).getCustomerId());
|
||||
t24DataEntitySave.setPhoneNumber(t24DataEntity.get(0).getPhoneNumber());
|
||||
t24DataEntitySave.setBranch(t24DataEntity.get(0).getBranch());
|
||||
t24DataEntitySave.setBranchName(t24DataEntity.get(0).getBranchName());
|
||||
t24DataEntitySave.setDob(t24DataEntity.get(0).getDob());
|
||||
t24DataEntitySave.setEmailAddress(t24DataEntity.get(0).getEmailAddress());
|
||||
t24DataEntitySave.setGender(t24DataEntity.get(0).getGender());
|
||||
t24DataEntitySave.setAcStatus(t24DataEntity.get(0).getAcStatus());
|
||||
t24DataEntitySave.setMaxDebitBalance(t24DataEntity.get(0).getMaxDebitBalance());
|
||||
t24DataEntitySave.setMaxCreditBalance(t24DataEntity.get(0).getMaxCreditBalance());
|
||||
t24DataEntitySave.setDebitAllowed(t24DataEntity.get(0).getDebitAllowed());
|
||||
t24DataEntitySave.setCreditAllowed(t24DataEntity.get(0).getCreditAllowed());
|
||||
t24DataEntitySave.setUssdSubscribed(t24DataEntity.get(0).getUssdSubscribed());
|
||||
t24DataServiceImpl.save(t24DataEntitySave);
|
||||
ftRef = newRef;
|
||||
} else {
|
||||
errorMsg = "Duplicate Transaction - " + txnRef;
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg, ftRef);
|
||||
}
|
||||
|
||||
break;
|
||||
case "D":
|
||||
|
||||
if (txnStatus.equals("del")) {
|
||||
errorMsg = "Unauthorised Record Doesnt exist";
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg, ftRef);
|
||||
}
|
||||
|
||||
if (txnStatus.equals("auth")) {
|
||||
errorMsg = "Unauthorised Record Doesnt exist";
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg, ftRef);
|
||||
}
|
||||
|
||||
if (txnStatus.equals("hold")) {
|
||||
transactionDataEntitySave.setTxnRef(txnRef);
|
||||
transactionDataEntitySave.setApi(api);
|
||||
transactionDataEntitySave.setHold(hold);
|
||||
transactionDataEntitySave.setRequestType(requestType);
|
||||
transactionDataEntitySave.setFtId(ftRef);
|
||||
transactionDataEntitySave.setTxnCode(txnCode);
|
||||
transactionDataEntitySave.setBankWallet(bankWallet);
|
||||
transactionDataEntitySave.setCustomerName(customerName);
|
||||
transactionDataEntitySave.setCustomerBranch(customerBranch);
|
||||
transactionDataEntitySave.setDrAccount(drAccount);
|
||||
transactionDataEntitySave.setCrAccount(crAccount);
|
||||
transactionDataEntitySave.setTxnAmount(Float.parseFloat(txnAmount));
|
||||
transactionDataEntitySave.setElevyCharge(Float.parseFloat(elevyCharge));
|
||||
transactionDataEntitySave.setTxnCharge(Float.parseFloat(txnCharge));
|
||||
transactionDataEntitySave.setTxnCurrency(txnCurrency);
|
||||
transactionDataEntitySave.setTxnNarration(txnNarration);
|
||||
transactionDataEntitySave.setTxnStatus("del");
|
||||
transactionDataEntitySave.setProcessFlag("Y");
|
||||
transactionDataEntitySave.setTransactionType("extTransfer");
|
||||
transactionDataServiceImpl.save(transactionDataEntitySave);
|
||||
|
||||
t24DataEntitySave.setAccountId(account);
|
||||
t24DataEntitySave.setAccountBalance(acBalance);
|
||||
t24DataEntitySave.setCategory(t24DataEntity.get(0).getCategory());
|
||||
t24DataEntitySave.setCustomerNo(t24DataEntity.get(0).getCustomerNo());
|
||||
t24DataEntitySave.setCustomerName(t24DataEntity.get(0).getCustomerName());
|
||||
t24DataEntitySave.setCustomerType(t24DataEntity.get(0).getCustomerType());
|
||||
t24DataEntitySave.setCustomerId(t24DataEntity.get(0).getCustomerId());
|
||||
t24DataEntitySave.setPhoneNumber(t24DataEntity.get(0).getPhoneNumber());
|
||||
t24DataEntitySave.setBranch(t24DataEntity.get(0).getBranch());
|
||||
t24DataEntitySave.setBranchName(t24DataEntity.get(0).getBranchName());
|
||||
t24DataEntitySave.setDob(t24DataEntity.get(0).getDob());
|
||||
t24DataEntitySave.setEmailAddress(t24DataEntity.get(0).getEmailAddress());
|
||||
t24DataEntitySave.setGender(t24DataEntity.get(0).getGender());
|
||||
t24DataEntitySave.setAcStatus(t24DataEntity.get(0).getAcStatus());
|
||||
t24DataEntitySave.setMaxDebitBalance(t24DataEntity.get(0).getMaxDebitBalance());
|
||||
t24DataEntitySave.setMaxCreditBalance(t24DataEntity.get(0).getMaxCreditBalance());
|
||||
t24DataEntitySave.setDebitAllowed(t24DataEntity.get(0).getDebitAllowed());
|
||||
t24DataEntitySave.setCreditAllowed(t24DataEntity.get(0).getCreditAllowed());
|
||||
t24DataEntitySave.setUssdSubscribed(t24DataEntity.get(0).getUssdSubscribed());
|
||||
t24DataServiceImpl.save(t24DataEntitySave);
|
||||
|
||||
} else {
|
||||
errorMsg = drAccount + " - Customer Account - Is not allowed to Send Funds";
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg, ftRef);
|
||||
}
|
||||
break;
|
||||
|
||||
case "A":
|
||||
|
||||
if (txnStatus.equals("del")) {
|
||||
errorMsg = "Unauthorised Record Doesnt exist";
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg, ftRef);
|
||||
}
|
||||
|
||||
if (txnStatus.equals("auth")) {
|
||||
errorMsg = "Unauthorised Record Doesnt exist";
|
||||
statusMsg = "99";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg, ftRef);
|
||||
}
|
||||
|
||||
if (txnStatus.equals("hold")) {
|
||||
transactionDataEntitySave.setTxnRef(txnRef);
|
||||
transactionDataEntitySave.setApi(api);
|
||||
transactionDataEntitySave.setHold("");
|
||||
transactionDataEntitySave.setRequestType(requestType);
|
||||
transactionDataEntitySave.setFtId(ftRef);
|
||||
transactionDataEntitySave.setTxnCode(txnCode);
|
||||
transactionDataEntitySave.setBankWallet(bankWallet);
|
||||
transactionDataEntitySave.setCustomerName(customerName);
|
||||
transactionDataEntitySave.setCustomerBranch(customerBranch);
|
||||
transactionDataEntitySave.setDrAccount(drAccount);
|
||||
transactionDataEntitySave.setCrAccount(crAccount);
|
||||
transactionDataEntitySave.setTxnAmount(Float.parseFloat(txnAmount));
|
||||
transactionDataEntitySave.setElevyCharge(Float.parseFloat(elevyCharge));
|
||||
transactionDataEntitySave.setTxnCharge(Float.parseFloat(txnCharge));
|
||||
transactionDataEntitySave.setTxnCurrency(txnCurrency);
|
||||
transactionDataEntitySave.setTxnNarration(txnNarration);
|
||||
transactionDataEntitySave.setTxnStatus("auth");
|
||||
transactionDataEntitySave.setTransactionType("extTransfer");
|
||||
transactionDataServiceImpl.save(transactionDataEntitySave);
|
||||
// txnWriter(request);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
errorMsg = "";
|
||||
statusMsg = "00";
|
||||
return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg, ftRef);
|
||||
}
|
||||
|
||||
// public void txnWriter(String outRequest) throws IOException {
|
||||
// FileWriter myWriter = new FileWriter(outFolder + "/"+ txnRef + ".xml");
|
||||
// myWriter.write(outRequest);
|
||||
// myWriter.close();
|
||||
// }
|
||||
|
||||
public String outValue(String api, String txnCode, String requestType, String drAccount, String crAccount, String txnRef, String error, String status, String ftRef){
|
||||
|
||||
return "{\"txnCode\" :\"" + txnCode + "\",\"" +
|
||||
"api\" :\"" + api + "\",\"" +
|
||||
"requestType\" :\"" + requestType + "\",\"" +
|
||||
"otherTxnRef\" :\"" + txnRef + "\",\"" +
|
||||
"drAccount\" :\"" + drAccount + "\",\"" +
|
||||
"crAccount\" :\"" + crAccount + "\",\"" +
|
||||
"ourTxnRef\" :\"" + ftRef + "\",\"" +
|
||||
"errorMsg\" :\"" + error + "\",\"" +
|
||||
"status\" :\"" + status + "\"" +
|
||||
"}";
|
||||
}
|
||||
|
||||
public String geFundsTransferRef() {
|
||||
int leftLimit = 48; // numeral '0'
|
||||
int rightLimit = 122; // letter 'z'
|
||||
int targetStringLength = 6;
|
||||
Random random = new Random();
|
||||
int day = LocalDate.now().getDayOfYear();
|
||||
String year = String.valueOf(LocalDate.now()).substring(2, 4);
|
||||
String paddedString = StringUtils.leftPad(String.valueOf(day), 3, "0");
|
||||
String generatedString = random.ints(leftLimit, rightLimit + 1)
|
||||
.filter(i -> (i <= 57 || i >= 65) && (i <= 90 || i >= 97))
|
||||
.limit(targetStringLength)
|
||||
.collect(StringBuilder::new, StringBuilder::appendCodePoint, StringBuilder::append)
|
||||
.toString();
|
||||
return "FT" + year + paddedString + generatedString.toUpperCase();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,232 @@
|
||||
package com.saslpay.datacapture;
|
||||
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParser;
|
||||
import com.saslpay.config.AppPropertiesConfig;
|
||||
import com.saslpay.config.BeanUtil;
|
||||
import com.saslpay.entities.T24DataEntity;
|
||||
import com.saslpay.entities.TransactionDataEntity;
|
||||
import com.saslpay.impl.T24DataServiceImpl;
|
||||
import com.saslpay.impl.TransactionDataServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.PersistenceContext;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static org.aspectj.util.LangUtil.isEmpty;
|
||||
|
||||
public class IntReversalCapture {
|
||||
|
||||
@PersistenceContext
|
||||
EntityManager entityManager;
|
||||
|
||||
@Autowired
|
||||
TransactionDataServiceImpl transactionDataServiceImpl;
|
||||
|
||||
@Autowired
|
||||
T24DataServiceImpl t24DataServiceImpl;
|
||||
|
||||
@Autowired
|
||||
T24DataServiceImpl t24DataServiceImplCr;
|
||||
|
||||
@Autowired
|
||||
T24DataServiceImpl t24DataServiceImplDr;
|
||||
|
||||
TransactionDataEntity transactionDataEntitySave = new TransactionDataEntity();
|
||||
T24DataEntity t24DataEntitySaveCr = new T24DataEntity();
|
||||
T24DataEntity t24DataEntitySaveDr = new T24DataEntity();
|
||||
List<TransactionDataEntity> transactionDataEntity;
|
||||
List<T24DataEntity> t24DataEntityCr;
|
||||
List<T24DataEntity> t24DataEntityDr;
|
||||
|
||||
AppPropertiesConfig configClass = BeanUtil.getBean(AppPropertiesConfig.class);
|
||||
String t24DataTable = configClass.getT24DataTable();
|
||||
String transactionDataTable = configClass.getTransactionDataTable();
|
||||
String outFolder = configClass.getOutFolder();
|
||||
|
||||
String otherTxnRef;
|
||||
String sqlStatement;
|
||||
String errorMessage;
|
||||
String txnCode;
|
||||
String hold;
|
||||
String bankWallet;
|
||||
String customerName;
|
||||
String customerBranch;
|
||||
String drAccount;
|
||||
String crAccount;
|
||||
String txnCurrency;
|
||||
Float txnAmount;
|
||||
String txnCharge;
|
||||
String txnNarration;
|
||||
String api;
|
||||
String requestType;
|
||||
String txnRef;
|
||||
String ftRef;
|
||||
String errorMsg;
|
||||
String statusMsg;
|
||||
String txnStatus = "";
|
||||
String account;
|
||||
Float sumBalance = 0.0F;
|
||||
Float newBalance = 0.0F;
|
||||
Float acBalance = 0.0F;
|
||||
Float fullAmt;
|
||||
|
||||
public String intReversal(String request) throws IOException {
|
||||
|
||||
JsonElement jsonElementAuth = JsonParser.parseString(request);
|
||||
JsonObject jsonObjectAuth = jsonElementAuth.getAsJsonObject();
|
||||
transactionDataServiceImpl = BeanUtil.getBean(TransactionDataServiceImpl.class);
|
||||
t24DataServiceImpl = BeanUtil.getBean(T24DataServiceImpl.class);
|
||||
t24DataServiceImplDr = BeanUtil.getBean(T24DataServiceImpl.class);
|
||||
t24DataServiceImplCr = BeanUtil.getBean(T24DataServiceImpl.class);
|
||||
entityManager = BeanUtil.getBean(EntityManager.class);
|
||||
|
||||
try {
|
||||
|
||||
txnRef = jsonObjectAuth.get("ourTxnRef").getAsString();
|
||||
otherTxnRef = jsonObjectAuth.get("otherTxnRef").getAsString();
|
||||
|
||||
} catch (NullPointerException e) {
|
||||
errorMessage = e.getLocalizedMessage();
|
||||
}
|
||||
|
||||
if (txnRef.isEmpty()){
|
||||
errorMsg = "Payment Reference Empty";
|
||||
statusMsg = "99";
|
||||
return outValue(drAccount,crAccount,"",errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
String transactionDataQuery = "SELECT * FROM " + transactionDataTable + " WHERE txnRef='" + otherTxnRef + "'";
|
||||
transactionDataEntity = entityManager.createNativeQuery(transactionDataQuery, TransactionDataEntity.class).getResultList();
|
||||
boolean isTxnEmpty = isEmpty(transactionDataEntity);
|
||||
if (isTxnEmpty){
|
||||
errorMsg = "Payment Reference Invalid - " + txnRef;
|
||||
statusMsg = "99";
|
||||
return outValue(drAccount,crAccount,"",errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
txnStatus = transactionDataEntity.get(0).getTxnStatus();
|
||||
if(txnStatus.equals("rev")){
|
||||
errorMsg = "Transaction Already Reversed - " + txnRef;
|
||||
statusMsg = "99";
|
||||
return outValue(drAccount,crAccount,"",errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
txnAmount = transactionDataEntity.get(0).getTxnAmount();
|
||||
drAccount = transactionDataEntity.get(0).getDrAccount() ;
|
||||
crAccount = transactionDataEntity.get(0).getCrAccount();
|
||||
|
||||
|
||||
sqlStatement = "SELECT * FROM " + t24DataTable + " WHERE accountId='" + crAccount + "'";
|
||||
t24DataEntityCr = entityManager.createNativeQuery(sqlStatement,T24DataEntity.class).getResultList();
|
||||
boolean isCreEmpty = isEmpty(t24DataEntityCr);
|
||||
if (isCreEmpty){
|
||||
errorMsg = "Credit Account Number - " + crAccount + " Does Not Exist";
|
||||
statusMsg = "99";
|
||||
return outValue(drAccount,crAccount,"",errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
sqlStatement = "SELECT * FROM " + t24DataTable + " WHERE accountId='" + drAccount + "'";
|
||||
t24DataEntityDr = entityManager.createNativeQuery(sqlStatement,T24DataEntity.class).getResultList();
|
||||
boolean isDebEmpty = isEmpty(t24DataEntityDr);
|
||||
if (isDebEmpty){
|
||||
errorMsg = "Debit Account Number - " + drAccount + " Does Not Exist";
|
||||
statusMsg = "99";
|
||||
return outValue(drAccount,crAccount,"",errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
Float crBalance = t24DataEntityCr.get(0).getAccountBalance();
|
||||
Float drBalance = t24DataEntityDr.get(0).getAccountBalance();
|
||||
|
||||
Float newCrBalance = crBalance - txnAmount ;
|
||||
Float newDrBalance = drBalance + txnAmount;
|
||||
|
||||
transactionDataEntitySave.setTxnRef(otherTxnRef);
|
||||
transactionDataEntitySave.setApi(transactionDataEntity.get(0).getApi());
|
||||
transactionDataEntitySave.setHold(transactionDataEntity.get(0).getHold());
|
||||
transactionDataEntitySave.setRequestType(transactionDataEntity.get(0).getRequestType());
|
||||
transactionDataEntitySave.setFtId(transactionDataEntity.get(0).getFtId());
|
||||
transactionDataEntitySave.setTxnCode(transactionDataEntity.get(0).getTxnCode());
|
||||
transactionDataEntitySave.setBankWallet(transactionDataEntity.get(0).getBankWallet());
|
||||
transactionDataEntitySave.setCustomerName(transactionDataEntity.get(0).getCustomerName());
|
||||
transactionDataEntitySave.setCustomerBranch(transactionDataEntity.get(0).getCustomerBranch());
|
||||
transactionDataEntitySave.setDrAccount(drAccount);
|
||||
transactionDataEntitySave.setCrAccount(crAccount);
|
||||
transactionDataEntitySave.setTxnAmount(txnAmount);
|
||||
transactionDataEntitySave.setElevyCharge(transactionDataEntity.get(0).getElevyCharge());
|
||||
transactionDataEntitySave.setTxnCharge(transactionDataEntity.get(0).getTxnCharge());
|
||||
transactionDataEntitySave.setTxnCurrency(transactionDataEntity.get(0).getTxnCurrency());
|
||||
transactionDataEntitySave.setTxnNarration(transactionDataEntity.get(0).getTxnNarration());
|
||||
transactionDataEntitySave.setTxnStatus("rev");
|
||||
transactionDataEntitySave.setProcessFlag("Y");
|
||||
transactionDataEntitySave.setTransactionType(transactionDataEntity.get(0).getTransactionType());
|
||||
transactionDataServiceImpl.save(transactionDataEntitySave);
|
||||
|
||||
t24DataEntitySaveDr.setAccountId(drAccount);
|
||||
t24DataEntitySaveDr.setAccountBalance(newDrBalance);
|
||||
t24DataEntitySaveDr.setCategory(t24DataEntityDr.get(0).getCategory());
|
||||
t24DataEntitySaveDr.setCustomerNo(t24DataEntityDr.get(0).getCustomerNo());
|
||||
t24DataEntitySaveDr.setCustomerName(t24DataEntityDr.get(0).getCustomerName());
|
||||
t24DataEntitySaveDr.setCustomerType(t24DataEntityDr.get(0).getCustomerType());
|
||||
t24DataEntitySaveDr.setCustomerId(t24DataEntityDr.get(0).getCustomerId());
|
||||
t24DataEntitySaveDr.setPhoneNumber(t24DataEntityDr.get(0).getPhoneNumber());
|
||||
t24DataEntitySaveDr.setBranch(t24DataEntityDr.get(0).getBranch());
|
||||
t24DataEntitySaveDr.setBranchName(t24DataEntityDr.get(0).getBranchName());
|
||||
t24DataEntitySaveDr.setDob(t24DataEntityDr.get(0).getDob());
|
||||
t24DataEntitySaveDr.setEmailAddress(t24DataEntityDr.get(0).getEmailAddress());
|
||||
t24DataEntitySaveDr.setGender(t24DataEntityDr.get(0).getGender());
|
||||
t24DataEntitySaveDr.setAcStatus(t24DataEntityDr.get(0).getAcStatus());
|
||||
t24DataEntitySaveDr.setMaxDebitBalance(t24DataEntityDr.get(0).getMaxDebitBalance());
|
||||
t24DataEntitySaveDr.setMaxCreditBalance(t24DataEntityDr.get(0).getMaxCreditBalance());
|
||||
t24DataEntitySaveDr.setDebitAllowed(t24DataEntityDr.get(0).getDebitAllowed());
|
||||
t24DataEntitySaveDr.setCreditAllowed(t24DataEntityDr.get(0).getCreditAllowed());
|
||||
t24DataEntitySaveDr.setUssdSubscribed(t24DataEntityDr.get(0).getUssdSubscribed());
|
||||
t24DataServiceImplDr.save(t24DataEntitySaveDr);
|
||||
|
||||
t24DataEntitySaveCr.setAccountId(crAccount);
|
||||
t24DataEntitySaveCr.setAccountBalance(newCrBalance);
|
||||
t24DataEntitySaveCr.setCategory(t24DataEntityCr.get(0).getCategory());
|
||||
t24DataEntitySaveCr.setCustomerNo(t24DataEntityCr.get(0).getCustomerNo());
|
||||
t24DataEntitySaveCr.setCustomerName(t24DataEntityCr.get(0).getCustomerName());
|
||||
t24DataEntitySaveCr.setCustomerType(t24DataEntityCr.get(0).getCustomerType());
|
||||
t24DataEntitySaveCr.setCustomerId(t24DataEntityCr.get(0).getCustomerId());
|
||||
t24DataEntitySaveCr.setPhoneNumber(t24DataEntityCr.get(0).getPhoneNumber());
|
||||
t24DataEntitySaveCr.setBranch(t24DataEntityCr.get(0).getBranch());
|
||||
t24DataEntitySaveCr.setBranchName(t24DataEntityCr.get(0).getBranchName());
|
||||
t24DataEntitySaveCr.setDob(t24DataEntityCr.get(0).getDob());
|
||||
t24DataEntitySaveCr.setEmailAddress(t24DataEntityCr.get(0).getEmailAddress());
|
||||
t24DataEntitySaveCr.setGender(t24DataEntityCr.get(0).getGender());
|
||||
t24DataEntitySaveCr.setAcStatus(t24DataEntityCr.get(0).getAcStatus());
|
||||
t24DataEntitySaveCr.setMaxDebitBalance(t24DataEntityCr.get(0).getMaxDebitBalance());
|
||||
t24DataEntitySaveCr.setMaxCreditBalance(t24DataEntityCr.get(0).getMaxCreditBalance());
|
||||
t24DataEntitySaveCr.setDebitAllowed(t24DataEntityCr.get(0).getDebitAllowed());
|
||||
t24DataEntitySaveCr.setCreditAllowed(t24DataEntityCr.get(0).getCreditAllowed());
|
||||
t24DataEntitySaveCr.setUssdSubscribed(t24DataEntityCr.get(0).getUssdSubscribed());
|
||||
t24DataServiceImplCr.save(t24DataEntitySaveCr);
|
||||
|
||||
errorMsg = "";
|
||||
statusMsg = "00";
|
||||
return outValue(drAccount,crAccount,"",errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
// public void txnWriter(String outRequest) throws IOException {
|
||||
// FileWriter myWriter = new FileWriter(outFolder + "/"+ txnRef + ".xml");
|
||||
// myWriter.write(outRequest);
|
||||
// myWriter.close();
|
||||
// }
|
||||
|
||||
public String outValue(String drAccount, String crAccount, String txnRef, String error, String status){
|
||||
//
|
||||
return "{\"txnCode\" :\"" + "intTrf" + "\",\"" +
|
||||
"drAccount\" :\"" + drAccount + "\",\"" +
|
||||
"crAccount\" :\"" + crAccount + "\",\"" +
|
||||
"transactionRef\" :\"" + "" + "\",\"" +
|
||||
"errorMsg\" :\"" + error + "\",\"" +
|
||||
"status\" :\"" + status + "\"" +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,282 @@
|
||||
package com.saslpay.datacapture;
|
||||
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParser;
|
||||
import com.saslpay.config.AppPropertiesConfig;
|
||||
import com.saslpay.config.BeanUtil;
|
||||
import com.saslpay.entities.T24DataEntity;
|
||||
import com.saslpay.entities.TransactionDataEntity;
|
||||
import com.saslpay.impl.T24DataServiceImpl;
|
||||
import com.saslpay.impl.TransactionDataServiceImpl;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.PersistenceContext;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import static org.aspectj.util.LangUtil.isEmpty;
|
||||
|
||||
//@Component
|
||||
public class IntTransferCapture {
|
||||
|
||||
@PersistenceContext
|
||||
EntityManager entityManager;
|
||||
|
||||
@Autowired
|
||||
TransactionDataServiceImpl transactionDataServiceImpl;
|
||||
|
||||
@Autowired
|
||||
T24DataServiceImpl t24DataServiceImplCr;
|
||||
|
||||
@Autowired
|
||||
T24DataServiceImpl t24DataServiceImplDr;
|
||||
|
||||
TransactionDataEntity transactionDataEntitySave = new TransactionDataEntity();
|
||||
T24DataEntity t24DataEntitySaveCr = new T24DataEntity();
|
||||
T24DataEntity t24DataEntitySaveDr = new T24DataEntity();
|
||||
List<TransactionDataEntity> transactionDataEntity;
|
||||
List<T24DataEntity> t24DataEntityCr;
|
||||
List<T24DataEntity> t24DataEntityDr;
|
||||
|
||||
String drAccount;
|
||||
String crAccount;
|
||||
String txnCurrency;
|
||||
String txnAmount;
|
||||
String txnNarration;
|
||||
String errorMessage;
|
||||
String errorMsg;
|
||||
String statusMsg;
|
||||
String txnRef;
|
||||
String elevyCharge;
|
||||
String sqlStatement;
|
||||
Float sumBalance = 0.00F;
|
||||
Float newBalanceDr = 0.0F;
|
||||
Float newBalanceCr = 0.0F;
|
||||
Float minBalance = 0.0F;
|
||||
Float maxBalance = 0.0F;
|
||||
Float acBalanceDr = 0.0F;
|
||||
Float acBalanceCr = 0.0F;
|
||||
|
||||
// @Autowired
|
||||
AppPropertiesConfig appPropertiesConfig = BeanUtil.getBean(AppPropertiesConfig.class);
|
||||
String t24DataTable = appPropertiesConfig.getT24DataTable();
|
||||
String transactionDataTable = appPropertiesConfig.getTransactionDataTable();
|
||||
String outFolder = appPropertiesConfig.getOutFolder();
|
||||
|
||||
public String intTransfer(String request) throws IOException {
|
||||
|
||||
JsonElement jsonElementAuth = JsonParser.parseString(request);
|
||||
JsonObject jsonObjectAuth = jsonElementAuth.getAsJsonObject();
|
||||
transactionDataServiceImpl = BeanUtil.getBean(TransactionDataServiceImpl.class);
|
||||
t24DataServiceImplDr = BeanUtil.getBean(T24DataServiceImpl.class);
|
||||
t24DataServiceImplCr = BeanUtil.getBean(T24DataServiceImpl.class);
|
||||
entityManager = BeanUtil.getBean(EntityManager.class);
|
||||
|
||||
try {
|
||||
txnRef = jsonObjectAuth.get("txnRef").getAsString();
|
||||
drAccount = jsonObjectAuth.get("drAccount").getAsString();
|
||||
crAccount = jsonObjectAuth.get("crAccount").getAsString();
|
||||
txnCurrency = jsonObjectAuth.get("currency").getAsString();
|
||||
txnAmount = jsonObjectAuth.get("txnAmount").getAsString();
|
||||
txnNarration = jsonObjectAuth.get("txnNarration").getAsString();
|
||||
elevyCharge = jsonObjectAuth.get("elevyCharge").getAsString();
|
||||
}catch (NullPointerException e){
|
||||
errorMessage = e.getLocalizedMessage();
|
||||
}
|
||||
|
||||
sumBalance = Float.parseFloat(txnAmount) + Float.parseFloat(elevyCharge);
|
||||
|
||||
if (txnRef.isEmpty()){
|
||||
errorMsg = "No Transaction Reference";
|
||||
statusMsg = "99";
|
||||
return outValue(drAccount,crAccount,"",errorMessage,statusMsg);
|
||||
}
|
||||
|
||||
String transactionDataQuery = "SELECT * FROM " + transactionDataTable + " WHERE txnRef='" + txnRef + "'";
|
||||
transactionDataEntity = entityManager.createNativeQuery(transactionDataQuery, TransactionDataEntity.class).getResultList();
|
||||
boolean isTxnEmpty = isEmpty(transactionDataEntity);
|
||||
if (!isTxnEmpty){
|
||||
errorMsg = "Duplicate Transaction - " + txnRef;
|
||||
statusMsg = "99";
|
||||
return outValue(drAccount,crAccount,"",errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
if (drAccount.equals(crAccount)) {
|
||||
errorMsg = "Cannot Debit and Credit Same Account Number";
|
||||
statusMsg = "99";
|
||||
return outValue(drAccount,crAccount,"",errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
sqlStatement = "SELECT * FROM " + t24DataTable + " WHERE accountId='" + drAccount + "'";
|
||||
t24DataEntityDr = entityManager.createNativeQuery(sqlStatement,T24DataEntity.class).getResultList();
|
||||
boolean isDebEmpty = isEmpty(t24DataEntityDr);
|
||||
if (isDebEmpty){
|
||||
errorMsg = "Debit Account Number - " + drAccount + " Does Not Exist";
|
||||
statusMsg = "99";
|
||||
return outValue(drAccount,crAccount,"",errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
String debitAllowed = t24DataEntityDr.get(0).getDebitAllowed();
|
||||
if (debitAllowed.equals("N")) {
|
||||
errorMsg = drAccount + " Cannot Send Funds";
|
||||
statusMsg = "99";
|
||||
return outValue(drAccount,crAccount,"",errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
String inactiveMarker = t24DataEntityDr.get(0).getAcStatus();
|
||||
if (inactiveMarker.equals("Y")) {
|
||||
errorMsg = "Account Number - " + drAccount + " Inactive";
|
||||
statusMsg = "99";
|
||||
return outValue(drAccount,crAccount,"",errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
minBalance = t24DataEntityDr.get(0).getMaxDebitBalance();
|
||||
maxBalance = t24DataEntityDr.get(0).getMaxCreditBalance();
|
||||
acBalanceDr = t24DataEntityDr.get(0).getAccountBalance();
|
||||
|
||||
if (sumBalance > acBalanceDr){
|
||||
errorMsg = "Account Number - " + drAccount + " has Insufficient Funds";
|
||||
statusMsg = "99";
|
||||
return outValue(drAccount,crAccount,"",errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
Float balanceDifference = acBalanceDr - sumBalance;
|
||||
if(minBalance > balanceDifference){
|
||||
errorMsg = "Debit Exceeds Minimum Balance";
|
||||
statusMsg = "99";
|
||||
return outValue(drAccount,crAccount,"",errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
if (sumBalance > maxBalance){
|
||||
errorMsg = "Transaction Amount Exceeds Maximum Transaction Limit";
|
||||
statusMsg = "99";
|
||||
return outValue(drAccount,crAccount,"",errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
newBalanceDr = balanceDifference;
|
||||
|
||||
sqlStatement = "SELECT * FROM " + t24DataTable + " WHERE accountId='" + crAccount + "'";
|
||||
t24DataEntityCr = entityManager.createNativeQuery(sqlStatement,T24DataEntity.class).getResultList();
|
||||
boolean isCreEmpty = isEmpty(t24DataEntityCr);
|
||||
if (isCreEmpty){
|
||||
errorMsg = "Credit Account Number - " + crAccount + " Does Not Exist";
|
||||
statusMsg = "99";
|
||||
return outValue(drAccount,crAccount,"",errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
String creditAllowed = t24DataEntityCr.get(0).getCreditAllowed();
|
||||
if (creditAllowed.equals("N")) {
|
||||
errorMsg = crAccount + " - Account Product Not Allowed to Recieve Funds";
|
||||
statusMsg = "99";
|
||||
return outValue(drAccount,crAccount,"",errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
acBalanceCr = t24DataEntityCr.get(0).getAccountBalance();
|
||||
newBalanceCr = sumBalance + acBalanceCr;
|
||||
|
||||
String ftRef = geFundsTransferRef();
|
||||
|
||||
transactionDataEntitySave.setTxnRef(txnRef);
|
||||
transactionDataEntitySave.setApi("INTERNAL");
|
||||
transactionDataEntitySave.setHold("I");
|
||||
transactionDataEntitySave.setRequestType("A2A");
|
||||
transactionDataEntitySave.setFtId(ftRef);
|
||||
transactionDataEntitySave.setTxnCode("intTrf");
|
||||
transactionDataEntitySave.setBankWallet("BANK");
|
||||
transactionDataEntitySave.setCustomerName("");
|
||||
transactionDataEntitySave.setCustomerBranch("");
|
||||
transactionDataEntitySave.setDrAccount(drAccount);
|
||||
transactionDataEntitySave.setCrAccount(crAccount);
|
||||
transactionDataEntitySave.setTxnAmount(Float.parseFloat(txnAmount));
|
||||
transactionDataEntitySave.setElevyCharge(Float.parseFloat(elevyCharge));
|
||||
transactionDataEntitySave.setTxnCharge(Float.parseFloat("0"));
|
||||
transactionDataEntitySave.setTxnCurrency(txnCurrency);
|
||||
transactionDataEntitySave.setTxnNarration(txnNarration);
|
||||
transactionDataEntitySave.setTxnStatus("auth");
|
||||
transactionDataEntitySave.setTransactionType("intTransfer");
|
||||
transactionDataServiceImpl.save(transactionDataEntitySave);
|
||||
|
||||
t24DataEntitySaveDr.setAccountId(drAccount);
|
||||
t24DataEntitySaveDr.setAccountBalance(newBalanceDr);
|
||||
t24DataEntitySaveDr.setCategory(t24DataEntityDr.get(0).getCategory());
|
||||
t24DataEntitySaveDr.setCustomerNo(t24DataEntityDr.get(0).getCustomerNo());
|
||||
t24DataEntitySaveDr.setCustomerName(t24DataEntityDr.get(0).getCustomerName());
|
||||
t24DataEntitySaveDr.setCustomerType(t24DataEntityDr.get(0).getCustomerType());
|
||||
t24DataEntitySaveDr.setCustomerId(t24DataEntityDr.get(0).getCustomerId());
|
||||
t24DataEntitySaveDr.setPhoneNumber(t24DataEntityDr.get(0).getPhoneNumber());
|
||||
t24DataEntitySaveDr.setBranch(t24DataEntityDr.get(0).getBranch());
|
||||
t24DataEntitySaveDr.setBranchName(t24DataEntityDr.get(0).getBranchName());
|
||||
t24DataEntitySaveDr.setDob(t24DataEntityDr.get(0).getDob());
|
||||
t24DataEntitySaveDr.setEmailAddress(t24DataEntityDr.get(0).getEmailAddress());
|
||||
t24DataEntitySaveDr.setGender(t24DataEntityDr.get(0).getGender());
|
||||
t24DataEntitySaveDr.setAcStatus(t24DataEntityDr.get(0).getAcStatus());
|
||||
t24DataEntitySaveDr.setMaxDebitBalance(t24DataEntityDr.get(0).getMaxDebitBalance());
|
||||
t24DataEntitySaveDr.setMaxCreditBalance(t24DataEntityDr.get(0).getMaxCreditBalance());
|
||||
t24DataEntitySaveDr.setDebitAllowed(t24DataEntityDr.get(0).getDebitAllowed());
|
||||
t24DataEntitySaveDr.setCreditAllowed(t24DataEntityDr.get(0).getCreditAllowed());
|
||||
t24DataEntitySaveDr.setUssdSubscribed(t24DataEntityDr.get(0).getUssdSubscribed());
|
||||
t24DataServiceImplDr.save(t24DataEntitySaveDr);
|
||||
|
||||
t24DataEntitySaveCr.setAccountId(crAccount);
|
||||
t24DataEntitySaveCr.setAccountBalance(newBalanceCr);
|
||||
t24DataEntitySaveCr.setCategory(t24DataEntityCr.get(0).getCategory());
|
||||
t24DataEntitySaveCr.setCustomerNo(t24DataEntityCr.get(0).getCustomerNo());
|
||||
t24DataEntitySaveCr.setCustomerName(t24DataEntityCr.get(0).getCustomerName());
|
||||
t24DataEntitySaveCr.setCustomerType(t24DataEntityCr.get(0).getCustomerType());
|
||||
t24DataEntitySaveCr.setCustomerId(t24DataEntityCr.get(0).getCustomerId());
|
||||
t24DataEntitySaveCr.setPhoneNumber(t24DataEntityCr.get(0).getPhoneNumber());
|
||||
t24DataEntitySaveCr.setBranch(t24DataEntityCr.get(0).getBranch());
|
||||
t24DataEntitySaveCr.setBranchName(t24DataEntityCr.get(0).getBranchName());
|
||||
t24DataEntitySaveCr.setDob(t24DataEntityCr.get(0).getDob());
|
||||
t24DataEntitySaveCr.setEmailAddress(t24DataEntityCr.get(0).getEmailAddress());
|
||||
t24DataEntitySaveCr.setGender(t24DataEntityCr.get(0).getGender());
|
||||
t24DataEntitySaveCr.setAcStatus(t24DataEntityCr.get(0).getAcStatus());
|
||||
t24DataEntitySaveCr.setMaxDebitBalance(t24DataEntityCr.get(0).getMaxDebitBalance());
|
||||
t24DataEntitySaveCr.setMaxCreditBalance(t24DataEntityCr.get(0).getMaxCreditBalance());
|
||||
t24DataEntitySaveCr.setDebitAllowed(t24DataEntityCr.get(0).getDebitAllowed());
|
||||
t24DataEntitySaveCr.setCreditAllowed(t24DataEntityCr.get(0).getCreditAllowed());
|
||||
t24DataEntitySaveCr.setUssdSubscribed(t24DataEntityCr.get(0).getUssdSubscribed());
|
||||
t24DataServiceImplCr.save(t24DataEntitySaveCr);
|
||||
|
||||
// FileWriter myWriter = new FileWriter(outFolder + "/"+ txnRef + ".xml");
|
||||
// myWriter.write(request);
|
||||
// myWriter.close();
|
||||
|
||||
errorMsg = "";
|
||||
statusMsg = "00";
|
||||
return outValue(drAccount,crAccount,ftRef,errorMsg,statusMsg);
|
||||
}
|
||||
//
|
||||
public String outValue(String drAccount, String crAccount, String ftRef, String error, String status){
|
||||
//
|
||||
return "{\"txnCode\" :\"" + "intTrf" + "\",\"" +
|
||||
"drAccount\" :\"" + drAccount + "\",\"" +
|
||||
"crAccount\" :\"" + crAccount + "\",\"" +
|
||||
"transactionRef\" :\"" + ftRef + "\",\"" +
|
||||
"errorMsg\" :\"" + error + "\",\"" +
|
||||
"status\" :\"" + status + "\"" +
|
||||
"}";
|
||||
}
|
||||
|
||||
public String geFundsTransferRef() {
|
||||
int leftLimit = 48; // numeral '0'
|
||||
int rightLimit = 122; // letter 'z'
|
||||
int targetStringLength = 6;
|
||||
Random random = new Random();
|
||||
int day = LocalDate.now().getDayOfYear();
|
||||
String year = String.valueOf(LocalDate.now()).substring(2, 4);
|
||||
String paddedString = StringUtils.leftPad(String.valueOf(day), 3, "0");
|
||||
String generatedString = random.ints(leftLimit, rightLimit + 1)
|
||||
.filter(i -> (i <= 57 || i >= 65) && (i <= 90 || i >= 97))
|
||||
.limit(targetStringLength)
|
||||
.collect(StringBuilder::new, StringBuilder::appendCodePoint, StringBuilder::append)
|
||||
.toString();
|
||||
return "FT" + year + paddedString + generatedString.toUpperCase();
|
||||
}
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
package com.saslpay.datacapture;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class JwtRequest implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 5926468583005150707L;
|
||||
|
||||
private String username;
|
||||
private String password;
|
||||
|
||||
//need default constructor for JSON Parsing
|
||||
public JwtRequest()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public JwtRequest(String username, String password) {
|
||||
this.setUsername(username);
|
||||
this.setPassword(password);
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return this.username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return this.password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.saslpay.datacapture;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class JwtResponse implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -8091879091924046844L;
|
||||
private final String jwttoken;
|
||||
|
||||
public JwtResponse(String jwttoken) {
|
||||
this.jwttoken = jwttoken;
|
||||
}
|
||||
|
||||
public String getToken() {
|
||||
return this.jwttoken;
|
||||
}
|
||||
}
|
||||
+162
@@ -0,0 +1,162 @@
|
||||
package com.saslpay.datacapture;
|
||||
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParser;
|
||||
import com.saslpay.config.AppPropertiesConfig;
|
||||
import com.saslpay.config.BeanUtil;
|
||||
import com.saslpay.entities.T24DataEntity;
|
||||
import com.saslpay.entities.TransactionDataEntity;
|
||||
import com.saslpay.impl.T24DataServiceImpl;
|
||||
import com.saslpay.impl.TransactionDataServiceImpl;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.PersistenceContext;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import static org.aspectj.util.LangUtil.isEmpty;
|
||||
|
||||
public class LevyPay {
|
||||
|
||||
@PersistenceContext
|
||||
EntityManager entityManager;
|
||||
|
||||
@Autowired
|
||||
TransactionDataServiceImpl transactionDataServiceImpl;
|
||||
|
||||
@Autowired
|
||||
T24DataServiceImpl t24DataServiceImplCr;
|
||||
|
||||
@Autowired
|
||||
T24DataServiceImpl t24DataServiceImplDr;
|
||||
|
||||
TransactionDataEntity transactionDataEntitySave = new TransactionDataEntity();
|
||||
T24DataEntity t24DataEntitySave = new T24DataEntity();
|
||||
List<TransactionDataEntity> transactionDataEntity;
|
||||
List<T24DataEntity> t24DataEntity;
|
||||
|
||||
String sqlStatement;
|
||||
String txnCode;
|
||||
String account;
|
||||
String chgAmt;
|
||||
String errorMsg;
|
||||
String statusMsg;
|
||||
Float newBalance = 0.00F;
|
||||
|
||||
AppPropertiesConfig appPropertiesConfig = BeanUtil.getBean(AppPropertiesConfig.class);
|
||||
String t24DataTable = appPropertiesConfig.getT24DataTable();
|
||||
|
||||
public String levyPay(String request){
|
||||
|
||||
JsonElement jsonElementAuth = JsonParser.parseString(request);
|
||||
JsonObject jsonObjectAuth = jsonElementAuth.getAsJsonObject();
|
||||
transactionDataServiceImpl = BeanUtil.getBean(TransactionDataServiceImpl.class);
|
||||
t24DataServiceImplDr = BeanUtil.getBean(T24DataServiceImpl.class);
|
||||
t24DataServiceImplCr = BeanUtil.getBean(T24DataServiceImpl.class);
|
||||
entityManager = BeanUtil.getBean(EntityManager.class);
|
||||
|
||||
try {
|
||||
|
||||
txnCode = jsonObjectAuth.get("txnCode").getAsString();
|
||||
account = jsonObjectAuth.get("account").getAsString();
|
||||
chgAmt = jsonObjectAuth.get("chgAmt").getAsString();
|
||||
|
||||
} catch (NullPointerException e){
|
||||
e.getLocalizedMessage();
|
||||
}
|
||||
|
||||
sqlStatement = "SELECT * FROM " + t24DataTable +" WHERE accountId='" + account + "'";
|
||||
t24DataEntity = entityManager.createNativeQuery(sqlStatement, T24DataEntity.class).getResultList();
|
||||
boolean isCreEmpty = isEmpty(t24DataEntity);
|
||||
if (isCreEmpty){
|
||||
errorMsg = "Account Number - " + account + " Does Not Exist";
|
||||
statusMsg = "99";
|
||||
return null;
|
||||
//return outValue(api, txnCode, requestType, drAccount,crAccount,txnRef,errorMsg,statusMsg);
|
||||
}
|
||||
|
||||
Float acBalance = t24DataEntity.get(0).getAccountBalance();
|
||||
switch (txnCode){
|
||||
case "debit":
|
||||
|
||||
newBalance = acBalance - Float.parseFloat(chgAmt);
|
||||
|
||||
case "credit":
|
||||
|
||||
newBalance = acBalance + Float.parseFloat(chgAmt);
|
||||
|
||||
default:
|
||||
}
|
||||
|
||||
String ftRef = geFundsTransferRef();
|
||||
transactionDataEntitySave.setTxnRef(ftRef);
|
||||
transactionDataEntitySave.setApi("LEVY");
|
||||
transactionDataEntitySave.setHold("");
|
||||
transactionDataEntitySave.setRequestType("LEVY");
|
||||
transactionDataEntitySave.setFtId(ftRef);
|
||||
transactionDataEntitySave.setTxnCode(txnCode);
|
||||
transactionDataEntitySave.setBankWallet("BANK");
|
||||
transactionDataEntitySave.setCustomerName("");
|
||||
transactionDataEntitySave.setCustomerBranch("");
|
||||
transactionDataEntitySave.setDrAccount(account);
|
||||
transactionDataEntitySave.setCrAccount(account);
|
||||
transactionDataEntitySave.setTxnAmount(Float.parseFloat("0.00"));
|
||||
transactionDataEntitySave.setElevyCharge(Float.parseFloat(chgAmt));
|
||||
transactionDataEntitySave.setTxnCharge(Float.parseFloat("0"));
|
||||
transactionDataEntitySave.setTxnCurrency("GHS");
|
||||
transactionDataEntitySave.setTxnNarration("Elvey Charge");
|
||||
transactionDataEntitySave.setTransactionType("levyCharge");
|
||||
transactionDataEntitySave.setTxnStatus("auth");
|
||||
transactionDataServiceImpl.save(transactionDataEntitySave);
|
||||
|
||||
t24DataEntitySave.setAccountId(account);
|
||||
t24DataEntitySave.setAccountBalance(newBalance);
|
||||
t24DataEntitySave.setCategory(t24DataEntity.get(0).getCategory());
|
||||
t24DataEntitySave.setCustomerNo(t24DataEntity.get(0).getCustomerNo());
|
||||
t24DataEntitySave.setCustomerName(t24DataEntity.get(0).getCustomerName());
|
||||
t24DataEntitySave.setCustomerType(t24DataEntity.get(0).getCustomerType());
|
||||
t24DataEntitySave.setCustomerId(t24DataEntity.get(0).getCustomerId());
|
||||
t24DataEntitySave.setPhoneNumber(t24DataEntity.get(0).getPhoneNumber());
|
||||
t24DataEntitySave.setBranch(t24DataEntity.get(0).getBranch());
|
||||
t24DataEntitySave.setBranchName(t24DataEntity.get(0).getBranchName());
|
||||
t24DataEntitySave.setDob(t24DataEntity.get(0).getDob());
|
||||
t24DataEntitySave.setEmailAddress(t24DataEntity.get(0).getEmailAddress());
|
||||
t24DataEntitySave.setGender(t24DataEntity.get(0).getGender());
|
||||
t24DataEntitySave.setAcStatus(t24DataEntity.get(0).getAcStatus());
|
||||
t24DataEntitySave.setMaxDebitBalance(t24DataEntity.get(0).getMaxDebitBalance());
|
||||
t24DataEntitySave.setMaxCreditBalance(t24DataEntity.get(0).getMaxCreditBalance());
|
||||
t24DataEntitySave.setDebitAllowed(t24DataEntity.get(0).getDebitAllowed());
|
||||
t24DataEntitySave.setCreditAllowed(t24DataEntity.get(0).getCreditAllowed());
|
||||
t24DataEntitySave.setUssdSubscribed(t24DataEntity.get(0).getUssdSubscribed());
|
||||
t24DataServiceImplDr.save(t24DataEntitySave);
|
||||
|
||||
return "{\"txnCode\" :\"" + txnCode + "\",\"" +
|
||||
"ourTxnRef\" :\"" + ftRef + "\",\"" +
|
||||
"account\" :\"" + account + "\",\"" +
|
||||
"chgAmt\" :\"" + chgAmt + "\",\"" +
|
||||
"errorMsg\" :\"" + "" + "\",\"" +
|
||||
"status\" :\"" + "00" + "\"" +
|
||||
"}";
|
||||
}
|
||||
|
||||
public String geFundsTransferRef() {
|
||||
int leftLimit = 48; // numeral '0'
|
||||
int rightLimit = 122; // letter 'z'
|
||||
int targetStringLength = 6;
|
||||
Random random = new Random();
|
||||
int day = LocalDate.now().getDayOfYear();
|
||||
String year = String.valueOf(LocalDate.now()).substring(2, 4);
|
||||
String paddedString = StringUtils.leftPad(String.valueOf(day), 3, "0");
|
||||
String generatedString = random.ints(leftLimit, rightLimit + 1)
|
||||
.filter(i -> (i <= 57 || i >= 65) && (i <= 90 || i >= 97))
|
||||
.limit(targetStringLength)
|
||||
.collect(StringBuilder::new, StringBuilder::appendCodePoint, StringBuilder::append)
|
||||
.toString();
|
||||
return "FT" + year + paddedString + generatedString.toUpperCase();
|
||||
}
|
||||
}
|
||||
+290
@@ -0,0 +1,290 @@
|
||||
package com.saslpay.entities;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.sql.Timestamp;
|
||||
|
||||
@Entity
|
||||
@Table(name = "t24Data")
|
||||
public class T24DataEntity {
|
||||
private String accountId;
|
||||
private String category;
|
||||
private String customerNo;
|
||||
private String customerName;
|
||||
private String customerType;
|
||||
private String customerId;
|
||||
private String phoneNumber;
|
||||
private String branch;
|
||||
private String branchName;
|
||||
private String dob;
|
||||
private String emailAddress;
|
||||
private String gender;
|
||||
private String acStatus;
|
||||
private Float accountBalance;
|
||||
private Float maxCreditBalance;
|
||||
private Float maxDebitBalance;
|
||||
private String debitAllowed;
|
||||
private String creditAllowed;
|
||||
private String ussdSubscribed;
|
||||
private Timestamp timeStamp;
|
||||
|
||||
@Id
|
||||
@Column(name = "accountId", nullable = false, length = 13)
|
||||
public String getAccountId() {
|
||||
return accountId;
|
||||
}
|
||||
|
||||
public void setAccountId(String accountId) {
|
||||
this.accountId = accountId;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "category", nullable = true, length = 5)
|
||||
public String getCategory() {
|
||||
return category;
|
||||
}
|
||||
|
||||
public void setCategory(String category) {
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "customerNo", nullable = false, length = 35)
|
||||
public String getCustomerNo() {
|
||||
return customerNo;
|
||||
}
|
||||
|
||||
public void setCustomerNo(String customerNo) {
|
||||
this.customerNo = customerNo;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "customerName", nullable = true, length = 35)
|
||||
public String getCustomerName() {
|
||||
return customerName;
|
||||
}
|
||||
|
||||
public void setCustomerName(String customerName) {
|
||||
this.customerName = customerName;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "customerType", nullable = true, length = 2)
|
||||
public String getCustomerType() {
|
||||
return customerType;
|
||||
}
|
||||
|
||||
public void setCustomerType(String customerType) {
|
||||
this.customerType = customerType;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "customerId", nullable = true, length = 35)
|
||||
public String getCustomerId() {
|
||||
return customerId;
|
||||
}
|
||||
|
||||
public void setCustomerId(String customerId) {
|
||||
this.customerId = customerId;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "phoneNumber", nullable = true, length = 16)
|
||||
public String getPhoneNumber() {
|
||||
return phoneNumber;
|
||||
}
|
||||
|
||||
public void setPhoneNumber(String phoneNumber) {
|
||||
this.phoneNumber = phoneNumber;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "branch", nullable = true, length = 35)
|
||||
public String getBranch() {
|
||||
return branch;
|
||||
}
|
||||
|
||||
public void setBranch(String branch) {
|
||||
this.branch = branch;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "branchName", nullable = true, length = 35)
|
||||
public String getBranchName() {
|
||||
return branchName;
|
||||
}
|
||||
|
||||
public void setBranchName(String branchName) {
|
||||
this.branchName = branchName;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "dob", nullable = true)
|
||||
public String getDob() {
|
||||
return dob;
|
||||
}
|
||||
|
||||
public void setDob(String dob) {
|
||||
this.dob = dob;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "emailAddress", nullable = true, length = 35)
|
||||
public String getEmailAddress() {
|
||||
return emailAddress;
|
||||
}
|
||||
|
||||
public void setEmailAddress(String emailAddress) {
|
||||
this.emailAddress = emailAddress;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "gender", nullable = true, length = 10)
|
||||
public String getGender() {
|
||||
return gender;
|
||||
}
|
||||
|
||||
public void setGender(String gender) {
|
||||
this.gender = gender;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "acStatus", nullable = true, length = 11)
|
||||
public String getAcStatus() {
|
||||
return acStatus;
|
||||
}
|
||||
|
||||
public void setAcStatus(String acStatus) {
|
||||
this.acStatus = acStatus;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "accountBalance", nullable = true, precision = 2)
|
||||
public Float getAccountBalance() {
|
||||
return accountBalance;
|
||||
}
|
||||
|
||||
public void setAccountBalance(Float accountBalance) {
|
||||
this.accountBalance = accountBalance;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "maxCreditBalance", nullable = true, precision = 2)
|
||||
public Float getMaxCreditBalance() {
|
||||
return maxCreditBalance;
|
||||
}
|
||||
|
||||
public void setMaxCreditBalance(Float maxCreditBalance) {
|
||||
this.maxCreditBalance = maxCreditBalance;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "maxDebitBalance", nullable = true, precision = 2)
|
||||
public Float getMaxDebitBalance() {
|
||||
return maxDebitBalance;
|
||||
}
|
||||
|
||||
public void setMaxDebitBalance(Float maxDebitBalance) {
|
||||
this.maxDebitBalance = maxDebitBalance;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "debitAllowed", nullable = true, length = 11)
|
||||
public String getDebitAllowed() {
|
||||
return debitAllowed;
|
||||
}
|
||||
|
||||
public void setDebitAllowed(String debitAllowed) {
|
||||
this.debitAllowed = debitAllowed;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "creditAllowed", nullable = true, length = 11)
|
||||
public String getCreditAllowed() {
|
||||
return creditAllowed;
|
||||
}
|
||||
|
||||
public void setCreditAllowed(String creditAllowed) {
|
||||
this.creditAllowed = creditAllowed;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "ussdSubscribed", nullable = true, length = 2)
|
||||
public String getUssdSubscribed() {
|
||||
return ussdSubscribed;
|
||||
}
|
||||
|
||||
public void setUssdSubscribed(String ussdSubscribed) {
|
||||
this.ussdSubscribed = ussdSubscribed;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "timeStamp", nullable = true)
|
||||
public Timestamp getTimeStamp() {
|
||||
return timeStamp;
|
||||
}
|
||||
|
||||
public void setTimeStamp(Timestamp timeStamp) {
|
||||
this.timeStamp = timeStamp;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
T24DataEntity that = (T24DataEntity) o;
|
||||
|
||||
if (accountId != null ? !accountId.equals(that.accountId) : that.accountId != null) return false;
|
||||
if (category != null ? !category.equals(that.category) : that.category != null) return false;
|
||||
if (customerNo != null ? !customerNo.equals(that.customerNo) : that.customerNo != null) return false;
|
||||
if (customerName != null ? !customerName.equals(that.customerName) : that.customerName != null) return false;
|
||||
if (customerType != null ? !customerType.equals(that.customerType) : that.customerType != null) return false;
|
||||
if (customerId != null ? !customerId.equals(that.customerId) : that.customerId != null) return false;
|
||||
if (phoneNumber != null ? !phoneNumber.equals(that.phoneNumber) : that.phoneNumber != null) return false;
|
||||
if (branch != null ? !branch.equals(that.branch) : that.branch != null) return false;
|
||||
if (branchName != null ? !branchName.equals(that.branchName) : that.branchName != null) return false;
|
||||
if (dob != null ? !dob.equals(that.dob) : that.dob != null) return false;
|
||||
if (emailAddress != null ? !emailAddress.equals(that.emailAddress) : that.emailAddress != null) return false;
|
||||
if (gender != null ? !gender.equals(that.gender) : that.gender != null) return false;
|
||||
if (acStatus != null ? !acStatus.equals(that.acStatus) : that.acStatus != null) return false;
|
||||
if (accountBalance != null ? !accountBalance.equals(that.accountBalance) : that.accountBalance != null)
|
||||
return false;
|
||||
if (maxCreditBalance != null ? !maxCreditBalance.equals(that.maxCreditBalance) : that.maxCreditBalance != null)
|
||||
return false;
|
||||
if (maxDebitBalance != null ? !maxDebitBalance.equals(that.maxDebitBalance) : that.maxDebitBalance != null)
|
||||
return false;
|
||||
if (debitAllowed != null ? !debitAllowed.equals(that.debitAllowed) : that.debitAllowed != null) return false;
|
||||
if (creditAllowed != null ? !creditAllowed.equals(that.creditAllowed) : that.creditAllowed != null)
|
||||
return false;
|
||||
if (ussdSubscribed != null ? !ussdSubscribed.equals(that.ussdSubscribed) : that.ussdSubscribed != null)
|
||||
return false;
|
||||
if (timeStamp != null ? !timeStamp.equals(that.timeStamp) : that.timeStamp != null) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = accountId != null ? accountId.hashCode() : 0;
|
||||
result = 31 * result + (category != null ? category.hashCode() : 0);
|
||||
result = 31 * result + (customerNo != null ? customerNo.hashCode() : 0);
|
||||
result = 31 * result + (customerName != null ? customerName.hashCode() : 0);
|
||||
result = 31 * result + (customerType != null ? customerType.hashCode() : 0);
|
||||
result = 31 * result + (customerId != null ? customerId.hashCode() : 0);
|
||||
result = 31 * result + (phoneNumber != null ? phoneNumber.hashCode() : 0);
|
||||
result = 31 * result + (branch != null ? branch.hashCode() : 0);
|
||||
result = 31 * result + (branchName != null ? branchName.hashCode() : 0);
|
||||
result = 31 * result + (dob != null ? dob.hashCode() : 0);
|
||||
result = 31 * result + (emailAddress != null ? emailAddress.hashCode() : 0);
|
||||
result = 31 * result + (gender != null ? gender.hashCode() : 0);
|
||||
result = 31 * result + (acStatus != null ? acStatus.hashCode() : 0);
|
||||
result = 31 * result + (accountBalance != null ? accountBalance.hashCode() : 0);
|
||||
result = 31 * result + (maxCreditBalance != null ? maxCreditBalance.hashCode() : 0);
|
||||
result = 31 * result + (maxDebitBalance != null ? maxDebitBalance.hashCode() : 0);
|
||||
result = 31 * result + (debitAllowed != null ? debitAllowed.hashCode() : 0);
|
||||
result = 31 * result + (creditAllowed != null ? creditAllowed.hashCode() : 0);
|
||||
result = 31 * result + (ussdSubscribed != null ? ussdSubscribed.hashCode() : 0);
|
||||
result = 31 * result + (timeStamp != null ? timeStamp.hashCode() : 0);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,294 @@
|
||||
package com.saslpay.entities;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.sql.Timestamp;
|
||||
|
||||
@Entity
|
||||
@Table(name = "transactionData", schema = "saslinterfacebkptest", catalog = "")
|
||||
public class TransactionDataEntity {
|
||||
private String txnRef;
|
||||
private String ftId;
|
||||
private String api;
|
||||
private String txnCode;
|
||||
private String hold;
|
||||
private String requestType;
|
||||
private String bankWallet;
|
||||
private String customerName;
|
||||
private String customerBranch;
|
||||
private String drAccount;
|
||||
private String crAccount;
|
||||
private String txnCurrency;
|
||||
private Float txnAmount;
|
||||
private Float txnCharge;
|
||||
private String txnNarration;
|
||||
private Float elevyCharge;
|
||||
private String processFlag;
|
||||
private String txnStatus;
|
||||
private Timestamp timeStamp;
|
||||
private String transactionType;
|
||||
|
||||
@Id
|
||||
@Column(name = "txnRef", nullable = false, length = 35)
|
||||
public String getTxnRef() {
|
||||
return txnRef;
|
||||
}
|
||||
|
||||
public void setTxnRef(String txnRef) {
|
||||
this.txnRef = txnRef;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "ftId", nullable = false, length = 35)
|
||||
public String getFtId() {
|
||||
return ftId;
|
||||
}
|
||||
|
||||
public void setFtId(String ftId) {
|
||||
this.ftId = ftId;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "api", nullable = false, length = 35)
|
||||
public String getApi() {
|
||||
return api;
|
||||
}
|
||||
|
||||
public void setApi(String api) {
|
||||
this.api = api;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "txnCode", nullable = false, length = 35)
|
||||
public String getTxnCode() {
|
||||
return txnCode;
|
||||
}
|
||||
|
||||
public void setTxnCode(String txnCode) {
|
||||
this.txnCode = txnCode;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "hold", nullable = false, length = 1)
|
||||
public String getHold() {
|
||||
return hold;
|
||||
}
|
||||
|
||||
public void setHold(String hold) {
|
||||
this.hold = hold;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "requestType", nullable = false, length = 35)
|
||||
public String getRequestType() {
|
||||
return requestType;
|
||||
}
|
||||
|
||||
public void setRequestType(String requestType) {
|
||||
this.requestType = requestType;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "bankWallet", nullable = true, length = 35)
|
||||
public String getBankWallet() {
|
||||
return bankWallet;
|
||||
}
|
||||
|
||||
public void setBankWallet(String bankWallet) {
|
||||
this.bankWallet = bankWallet;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "customerName", nullable = true, length = 35)
|
||||
public String getCustomerName() {
|
||||
return customerName;
|
||||
}
|
||||
|
||||
public void setCustomerName(String customerName) {
|
||||
this.customerName = customerName;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "customerBranch", nullable = true, length = 35)
|
||||
public String getCustomerBranch() {
|
||||
return customerBranch;
|
||||
}
|
||||
|
||||
public void setCustomerBranch(String customerBranch) {
|
||||
this.customerBranch = customerBranch;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "drAccount", nullable = false, precision = 0, length = 35)
|
||||
public String getDrAccount() {
|
||||
return drAccount;
|
||||
}
|
||||
|
||||
public void setDrAccount(String drAccount) {
|
||||
this.drAccount = drAccount;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "crAccount", nullable = true, precision = 0, length = 35)
|
||||
public String getCrAccount() {
|
||||
return crAccount;
|
||||
}
|
||||
|
||||
public void setCrAccount(String crAccount) {
|
||||
this.crAccount = crAccount;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "txnCurrency", nullable = false, length = 3)
|
||||
public String getTxnCurrency() {
|
||||
return txnCurrency;
|
||||
}
|
||||
|
||||
public void setTxnCurrency(String txnCurrency) {
|
||||
this.txnCurrency = txnCurrency;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "txnAmount", nullable = false, precision = 0)
|
||||
public Float getTxnAmount() {
|
||||
return txnAmount;
|
||||
}
|
||||
|
||||
public void setTxnAmount(Float txnAmount) {
|
||||
this.txnAmount = txnAmount;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "txnCharge", nullable = false, precision = 0)
|
||||
public Float getTxnCharge() {
|
||||
return txnCharge;
|
||||
}
|
||||
|
||||
public void setTxnCharge(float txnCharge) {
|
||||
this.txnCharge = txnCharge;
|
||||
}
|
||||
|
||||
public void setTxnCharge(Float txnCharge) {
|
||||
this.txnCharge = txnCharge;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "txnNarration", nullable = true, length = 11)
|
||||
public String getTxnNarration() {
|
||||
return txnNarration;
|
||||
}
|
||||
|
||||
public void setTxnNarration(String txnNarration) {
|
||||
this.txnNarration = txnNarration;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "elevyCharge", nullable = false, precision = 0)
|
||||
public Float getElevyCharge() {
|
||||
return elevyCharge;
|
||||
}
|
||||
|
||||
public void setElevyCharge(float elevyCharge) {
|
||||
this.elevyCharge = elevyCharge;
|
||||
}
|
||||
|
||||
public void setElevyCharge(Float elevyCharge) {
|
||||
this.elevyCharge = elevyCharge;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "processFlag", nullable = true, length = 11)
|
||||
public String getProcessFlag() {
|
||||
return processFlag;
|
||||
}
|
||||
|
||||
public void setProcessFlag(String processFlag) {
|
||||
this.processFlag = processFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
TransactionDataEntity that = (TransactionDataEntity) o;
|
||||
|
||||
if (Double.compare(that.txnAmount, txnAmount) != 0) return false;
|
||||
if (Double.compare(that.txnCharge, txnCharge) != 0) return false;
|
||||
if (Double.compare(that.elevyCharge, elevyCharge) != 0) return false;
|
||||
if (drAccount != null ? !drAccount.equals(that.drAccount) : that.drAccount != null) return false;
|
||||
if (crAccount != null ? !crAccount.equals(that.crAccount) : that.crAccount != null) return false;
|
||||
if (txnRef != null ? !txnRef.equals(that.txnRef) : that.txnRef != null) return false;
|
||||
if (ftId != null ? !ftId.equals(that.ftId) : that.ftId != null) return false;
|
||||
if (api != null ? !api.equals(that.api) : that.api != null) return false;
|
||||
if (txnCode != null ? !txnCode.equals(that.txnCode) : that.txnCode != null) return false;
|
||||
if (hold != null ? !hold.equals(that.hold) : that.hold != null) return false;
|
||||
if (requestType != null ? !requestType.equals(that.requestType) : that.requestType != null) return false;
|
||||
if (bankWallet != null ? !bankWallet.equals(that.bankWallet) : that.bankWallet != null) return false;
|
||||
if (customerName != null ? !customerName.equals(that.customerName) : that.customerName != null) return false;
|
||||
if (customerBranch != null ? !customerBranch.equals(that.customerBranch) : that.customerBranch != null)
|
||||
return false;
|
||||
if (txnCurrency != null ? !txnCurrency.equals(that.txnCurrency) : that.txnCurrency != null) return false;
|
||||
if (txnNarration != null ? !txnNarration.equals(that.txnNarration) : that.txnNarration != null) return false;
|
||||
if (processFlag != null ? !processFlag.equals(that.processFlag) : that.processFlag != null) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "txnStatus", nullable = false, length = 4)
|
||||
public String getTxnStatus() {
|
||||
return txnStatus;
|
||||
}
|
||||
|
||||
public void setTxnStatus(String txnStatus) {
|
||||
this.txnStatus = txnStatus;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result;
|
||||
long temp;
|
||||
result = txnRef != null ? txnRef.hashCode() : 0;
|
||||
result = 31 * result + (ftId != null ? ftId.hashCode() : 0);
|
||||
result = 31 * result + (api != null ? api.hashCode() : 0);
|
||||
result = 31 * result + (txnCode != null ? txnCode.hashCode() : 0);
|
||||
result = 31 * result + (hold != null ? hold.hashCode() : 0);
|
||||
result = 31 * result + (requestType != null ? requestType.hashCode() : 0);
|
||||
result = 31 * result + (bankWallet != null ? bankWallet.hashCode() : 0);
|
||||
result = 31 * result + (customerName != null ? customerName.hashCode() : 0);
|
||||
result = 31 * result + (customerBranch != null ? customerBranch.hashCode() : 0);
|
||||
result = 31 * result + (drAccount != null ? drAccount.hashCode() : 0);
|
||||
result = 31 * result + (crAccount != null ? crAccount.hashCode() : 0);
|
||||
result = 31 * result + (txnCurrency != null ? txnCurrency.hashCode() : 0);
|
||||
temp = Double.doubleToLongBits(txnAmount);
|
||||
result = 31 * result + (int) (temp ^ (temp >>> 32));
|
||||
temp = Double.doubleToLongBits(txnCharge);
|
||||
result = 31 * result + (int) (temp ^ (temp >>> 32));
|
||||
result = 31 * result + (txnNarration != null ? txnNarration.hashCode() : 0);
|
||||
temp = Double.doubleToLongBits(elevyCharge);
|
||||
result = 31 * result + (int) (temp ^ (temp >>> 32));
|
||||
result = 31 * result + (processFlag != null ? processFlag.hashCode() : 0);
|
||||
result = 31 * result + (txnStatus != null ? txnStatus.hashCode() : 0);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "timeStamp")
|
||||
public Timestamp getTimeStamp() {
|
||||
return timeStamp;
|
||||
}
|
||||
|
||||
public void setTimeStamp(Timestamp timeStamp) {
|
||||
this.timeStamp = timeStamp;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "transactionType")
|
||||
public String getTransactionType() {
|
||||
return transactionType;
|
||||
}
|
||||
|
||||
public void setTransactionType(String transactionType) {
|
||||
this.transactionType = transactionType;
|
||||
}
|
||||
}
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
package com.saslpay.entities;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
@Entity
|
||||
@Table(name = "user")
|
||||
public class UserEntity {
|
||||
private float userId;
|
||||
private String username;
|
||||
private String password;
|
||||
|
||||
@Id
|
||||
@Column(name = "userId", nullable = false, precision = 0)
|
||||
public float getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(float userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "username", nullable = false, length = 15)
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "password", nullable = false, length = 200)
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
UserEntity that = (UserEntity) o;
|
||||
|
||||
if (Float.compare(that.userId, userId) != 0) return false;
|
||||
if (username != null ? !username.equals(that.username) : that.username != null) return false;
|
||||
if (password != null ? !password.equals(that.password) : that.password != null) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = (userId != +0.0f ? Float.floatToIntBits(userId) : 0);
|
||||
result = 31 * result + (username != null ? username.hashCode() : 0);
|
||||
result = 31 * result + (password != null ? password.hashCode() : 0);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.saslpay.impl;
|
||||
|
||||
import com.saslpay.entities.UserEntity;
|
||||
import com.saslpay.repository.UserRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.core.userdetails.User;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
||||
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@Service
|
||||
public class JwtUserDetailsService implements UserDetailsService {
|
||||
|
||||
@Autowired
|
||||
private UserRepository userDao;
|
||||
|
||||
@Autowired
|
||||
PasswordEncoder bcryptEncoder;
|
||||
|
||||
@Override
|
||||
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
|
||||
UserEntity user = userDao.findByUsername(username);
|
||||
if (user == null) {
|
||||
throw new UsernameNotFoundException("User not found with username: " + username);
|
||||
}
|
||||
return new User(user.getUsername(), user.getPassword(),
|
||||
new ArrayList<>());
|
||||
}
|
||||
|
||||
public UserEntity save(UserEntity user) {
|
||||
UserEntity newUser = new UserEntity();
|
||||
newUser.setUsername(user.getUsername());
|
||||
newUser.setPassword(bcryptEncoder.encode(user.getPassword()));
|
||||
return userDao.save(newUser);
|
||||
}
|
||||
|
||||
public String failed(UserEntity user) {
|
||||
return "{Invalid User}" ;
|
||||
}
|
||||
}
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
package com.saslpay.impl;
|
||||
|
||||
import com.saslpay.entities.T24DataEntity;
|
||||
import com.saslpay.repository.T24DataRepository;
|
||||
import com.saslpay.service.T24DataService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.PersistenceContext;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
@Service("T24DataService")
|
||||
@Transactional
|
||||
public class T24DataServiceImpl implements T24DataService {
|
||||
|
||||
@Autowired
|
||||
private T24DataRepository t24DataRepository;
|
||||
|
||||
@PersistenceContext
|
||||
EntityManager entityManager;
|
||||
private Object T24DataEntity;
|
||||
|
||||
// @Override
|
||||
// public T24DataEntity saveT24DataEntity(T24DataEntity t24DataEntity) {
|
||||
// T24DataEntity response = t24DataRepository.save(t24DataEntity);
|
||||
// return response;
|
||||
// }
|
||||
|
||||
// @Override
|
||||
// public T24DataEntity getT24DataEntity(String id) {
|
||||
// T24DataEntity t24DataEntity = entityManager.find(T24DataEntity.class, id);
|
||||
// return t24DataEntity;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public List<T24DataEntity> findAll() {
|
||||
return t24DataRepository.findAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<T24DataEntity> findById(String id) {
|
||||
t24DataRepository.findById(id);
|
||||
return t24DataRepository.findById(id);
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public Optional<T24DataEntity> deleteById(String id) {
|
||||
// t24DataRepository.deleteById(id);
|
||||
// return Optional.empty();
|
||||
// }
|
||||
//"SELECT * FROM `t24Data` WHERE `customerNo` = '111247'"
|
||||
//"SELECT * FROM `t24Data` WHERE `accountId'` = '01070011124701'
|
||||
|
||||
// @Override
|
||||
// public List<T24DataEntity> deleteAll() {
|
||||
// t24DataRepository.deleteAll();
|
||||
// return null;
|
||||
// }
|
||||
|
||||
// @Override
|
||||
// public T24DataEntity update(T24DataEntity t24DataEntity) {
|
||||
// return null;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public T24DataEntity save(T24DataEntity t24DataEntity) {
|
||||
t24DataRepository.save(t24DataEntity);
|
||||
return t24DataEntity;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.saslpay.impl;
|
||||
|
||||
import com.saslpay.entities.TransactionDataEntity;
|
||||
import com.saslpay.repository.TransactionDataRepository;
|
||||
import com.saslpay.service.TransactionDataService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.PersistenceContext;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
@Service("TransactionDataService")
|
||||
@Transactional
|
||||
public class TransactionDataServiceImpl implements TransactionDataService {
|
||||
|
||||
@Autowired
|
||||
private TransactionDataRepository transactionDataRepository;
|
||||
|
||||
@PersistenceContext
|
||||
EntityManager entityManager;
|
||||
|
||||
@Override
|
||||
public TransactionDataEntity saveTransactionDataEntity(TransactionDataEntity transactionDataEntity) {
|
||||
TransactionDataEntity response = transactionDataRepository.save(transactionDataEntity);
|
||||
return response;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TransactionDataEntity getTransactionDataEntity(String id) {
|
||||
TransactionDataEntity transactionDataEntity = entityManager.find(TransactionDataEntity.class,id);
|
||||
return transactionDataEntity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TransactionDataEntity> findAll() {
|
||||
return transactionDataRepository.findAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<TransactionDataEntity> findById(String id) {
|
||||
return transactionDataRepository.findById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<TransactionDataEntity> deleteById(String id) {
|
||||
transactionDataRepository.deleteById(id);
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TransactionDataEntity> deleteAll() {
|
||||
transactionDataRepository.deleteAll();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TransactionDataEntity update(TransactionDataEntity transactionDataEntity) {
|
||||
transactionDataRepository.save(transactionDataEntity);
|
||||
return transactionDataEntity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TransactionDataEntity save(TransactionDataEntity transactionDataEntity) {
|
||||
transactionDataRepository.save(transactionDataEntity);
|
||||
return transactionDataEntity;
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.saslpay.log;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class SaslPayLog {
|
||||
|
||||
public void log(String log){
|
||||
Logger logger = LoggerFactory.getLogger(SaslPayLog.class);
|
||||
logger.info(log);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.saslpay.repository;
|
||||
|
||||
import com.saslpay.entities.T24DataEntity;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface T24DataRepository extends JpaRepository<T24DataEntity, String> {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.saslpay.repository;
|
||||
|
||||
import com.saslpay.entities.TransactionDataEntity;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface TransactionDataRepository extends JpaRepository<TransactionDataEntity, String> {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.saslpay.repository;
|
||||
|
||||
import com.saslpay.entities.UserEntity;
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface UserRepository extends CrudRepository<UserEntity, Integer> {
|
||||
|
||||
UserEntity findByUsername(String username);
|
||||
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package com.saslpay.service;
|
||||
|
||||
import com.saslpay.entities.T24DataEntity;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
public interface T24DataService {
|
||||
|
||||
// T24DataEntity saveT24DataEntity(T24DataEntity t24DataEntity);
|
||||
|
||||
// T24DataEntity getT24DataEntity(String id);
|
||||
|
||||
List<T24DataEntity> findAll();
|
||||
|
||||
Optional<T24DataEntity> findById(String id);
|
||||
|
||||
// Optional<T24DataEntity> deleteById(String id);
|
||||
|
||||
// List<T24DataEntity> deleteAll();
|
||||
|
||||
// T24DataEntity update(T24DataEntity t24DataEntity);
|
||||
|
||||
T24DataEntity save(T24DataEntity t24DataEntity);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.saslpay.service;
|
||||
|
||||
|
||||
import com.saslpay.entities.TransactionDataEntity;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
public interface TransactionDataService {
|
||||
|
||||
TransactionDataEntity saveTransactionDataEntity(TransactionDataEntity transactionDataEntity);
|
||||
|
||||
TransactionDataEntity getTransactionDataEntity(String id);
|
||||
|
||||
List<TransactionDataEntity> findAll();
|
||||
|
||||
Optional<TransactionDataEntity> findById(String id);
|
||||
|
||||
Optional<TransactionDataEntity> deleteById(String id);
|
||||
|
||||
List<TransactionDataEntity> deleteAll();
|
||||
|
||||
TransactionDataEntity update(TransactionDataEntity transactionDataEntity);
|
||||
|
||||
TransactionDataEntity save(TransactionDataEntity transactionDataEntity);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,262 @@
|
||||
package com.sasl.Interface.entities;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Objects;
|
||||
|
||||
@Entity
|
||||
@Table(name = "transactionData", schema = "saslinterfacebkptest", catalog = "")
|
||||
public class TransactionDataEntity {
|
||||
private String txnRef;
|
||||
private String ftId;
|
||||
private String api;
|
||||
private String txnCode;
|
||||
private String hold;
|
||||
private String requestType;
|
||||
private String bankWallet;
|
||||
private String customerName;
|
||||
private String customerBranch;
|
||||
private String drAccount;
|
||||
private String crAccount;
|
||||
private String txnCurrency;
|
||||
private Float txnAmount;
|
||||
private Float txnCharge;
|
||||
private String txnNarration;
|
||||
private Float elevyCharge;
|
||||
private String processFlag;
|
||||
private String txnStatus;
|
||||
private Timestamp timeStamp;
|
||||
private String transactionType;
|
||||
|
||||
@Id
|
||||
@Column(name = "txnRef")
|
||||
public String getTxnRef() {
|
||||
return txnRef;
|
||||
}
|
||||
|
||||
public void setTxnRef(String txnRef) {
|
||||
this.txnRef = txnRef;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "ftId")
|
||||
public String getFtId() {
|
||||
return ftId;
|
||||
}
|
||||
|
||||
public void setFtId(String ftId) {
|
||||
this.ftId = ftId;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "api")
|
||||
public String getApi() {
|
||||
return api;
|
||||
}
|
||||
|
||||
public void setApi(String api) {
|
||||
this.api = api;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "txnCode")
|
||||
public String getTxnCode() {
|
||||
return txnCode;
|
||||
}
|
||||
|
||||
public void setTxnCode(String txnCode) {
|
||||
this.txnCode = txnCode;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "hold")
|
||||
public String getHold() {
|
||||
return hold;
|
||||
}
|
||||
|
||||
public void setHold(String hold) {
|
||||
this.hold = hold;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "requestType")
|
||||
public String getRequestType() {
|
||||
return requestType;
|
||||
}
|
||||
|
||||
public void setRequestType(String requestType) {
|
||||
this.requestType = requestType;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "bankWallet")
|
||||
public String getBankWallet() {
|
||||
return bankWallet;
|
||||
}
|
||||
|
||||
public void setBankWallet(String bankWallet) {
|
||||
this.bankWallet = bankWallet;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "customerName")
|
||||
public String getCustomerName() {
|
||||
return customerName;
|
||||
}
|
||||
|
||||
public void setCustomerName(String customerName) {
|
||||
this.customerName = customerName;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "customerBranch")
|
||||
public String getCustomerBranch() {
|
||||
return customerBranch;
|
||||
}
|
||||
|
||||
public void setCustomerBranch(String customerBranch) {
|
||||
this.customerBranch = customerBranch;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "drAccount")
|
||||
public String getDrAccount() {
|
||||
return drAccount;
|
||||
}
|
||||
|
||||
public void setDrAccount(String drAccount) {
|
||||
this.drAccount = drAccount;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "crAccount")
|
||||
public String getCrAccount() {
|
||||
return crAccount;
|
||||
}
|
||||
|
||||
public void setCrAccount(String crAccount) {
|
||||
this.crAccount = crAccount;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "txnCurrency")
|
||||
public String getTxnCurrency() {
|
||||
return txnCurrency;
|
||||
}
|
||||
|
||||
public void setTxnCurrency(String txnCurrency) {
|
||||
this.txnCurrency = txnCurrency;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "txnAmount")
|
||||
public Float getTxnAmount() {
|
||||
return txnAmount;
|
||||
}
|
||||
|
||||
public void setTxnAmount(Float txnAmount) {
|
||||
this.txnAmount = txnAmount;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "txnCharge")
|
||||
public Float getTxnCharge() {
|
||||
return txnCharge;
|
||||
}
|
||||
|
||||
public void setTxnCharge(Float txnCharge) {
|
||||
this.txnCharge = txnCharge;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "txnNarration")
|
||||
public String getTxnNarration() {
|
||||
return txnNarration;
|
||||
}
|
||||
|
||||
public void setTxnNarration(String txnNarration) {
|
||||
this.txnNarration = txnNarration;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "elevyCharge")
|
||||
public Float getElevyCharge() {
|
||||
return elevyCharge;
|
||||
}
|
||||
|
||||
public void setElevyCharge(Float elevyCharge) {
|
||||
this.elevyCharge = elevyCharge;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "processFlag")
|
||||
public String getProcessFlag() {
|
||||
return processFlag;
|
||||
}
|
||||
|
||||
public void setProcessFlag(String processFlag) {
|
||||
this.processFlag = processFlag;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "txnStatus")
|
||||
public String getTxnStatus() {
|
||||
return txnStatus;
|
||||
}
|
||||
|
||||
public void setTxnStatus(String txnStatus) {
|
||||
this.txnStatus = txnStatus;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "timeStamp")
|
||||
public Timestamp getTimeStamp() {
|
||||
return timeStamp;
|
||||
}
|
||||
|
||||
public void setTimeStamp(Timestamp timeStamp) {
|
||||
this.timeStamp = timeStamp;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "transactionType")
|
||||
public String getTransactionType() {
|
||||
return transactionType;
|
||||
}
|
||||
|
||||
public void setTransactionType(String transactionType) {
|
||||
this.transactionType = transactionType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
TransactionDataEntity that = (TransactionDataEntity) o;
|
||||
return Objects.equals(txnRef, that.txnRef) &&
|
||||
Objects.equals(ftId, that.ftId) &&
|
||||
Objects.equals(api, that.api) &&
|
||||
Objects.equals(txnCode, that.txnCode) &&
|
||||
Objects.equals(hold, that.hold) &&
|
||||
Objects.equals(requestType, that.requestType) &&
|
||||
Objects.equals(bankWallet, that.bankWallet) &&
|
||||
Objects.equals(customerName, that.customerName) &&
|
||||
Objects.equals(customerBranch, that.customerBranch) &&
|
||||
Objects.equals(drAccount, that.drAccount) &&
|
||||
Objects.equals(crAccount, that.crAccount) &&
|
||||
Objects.equals(txnCurrency, that.txnCurrency) &&
|
||||
Objects.equals(txnAmount, that.txnAmount) &&
|
||||
Objects.equals(txnCharge, that.txnCharge) &&
|
||||
Objects.equals(txnNarration, that.txnNarration) &&
|
||||
Objects.equals(elevyCharge, that.elevyCharge) &&
|
||||
Objects.equals(processFlag, that.processFlag) &&
|
||||
Objects.equals(txnStatus, that.txnStatus) &&
|
||||
Objects.equals(timeStamp, that.timeStamp) &&
|
||||
Objects.equals(transactionType, that.transactionType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(txnRef, ftId, api, txnCode, hold, requestType, bankWallet, customerName, customerBranch, drAccount, crAccount, txnCurrency, txnAmount, txnCharge, txnNarration, elevyCharge, processFlag, txnStatus, timeStamp, transactionType);
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package com.saslpay;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@SpringBootTest
|
||||
class SaslPayBkpTests {
|
||||
|
||||
@Test
|
||||
void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user