Update spring tools.
Update spring boot version. Add -proc:full to maven compiler args. Change mysql connector to mariadb connector in pom. Add detail.hidden. Enhance report filtering. Add paid and paid-by to report. Change mysql driver to mariadb driver.
This commit is contained in:
parent
2ff60ad985
commit
d9f26954b8
10 changed files with 290 additions and 106 deletions
167
.factorypath
167
.factorypath
|
|
@ -1,80 +1,107 @@
|
|||
<factorypath>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-thymeleaf/3.4.7/spring-boot-starter-thymeleaf-3.4.7.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter/3.4.7/spring-boot-starter-3.4.7.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot/3.4.7/spring-boot-3.4.7.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-autoconfigure/3.4.7/spring-boot-autoconfigure-3.4.7.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-logging/3.4.7/spring-boot-starter-logging-3.4.7.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/ch/qos/logback/logback-classic/1.5.18/logback-classic-1.5.18.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/ch/qos/logback/logback-core/1.5.18/logback-core-1.5.18.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-to-slf4j/2.24.3/log4j-to-slf4j-2.24.3.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-api/2.24.3/log4j-api-2.24.3.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/jul-to-slf4j/2.0.17/jul-to-slf4j-2.0.17.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/jakarta/annotation/jakarta.annotation-api/2.1.1/jakarta.annotation-api-2.1.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-core/6.2.8/spring-core-6.2.8.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-jcl/6.2.8/spring-jcl-6.2.8.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/yaml/snakeyaml/2.3/snakeyaml-2.3.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/thymeleaf/thymeleaf-spring6/3.1.3.RELEASE/thymeleaf-spring6-3.1.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/thymeleaf/thymeleaf/3.1.3.RELEASE/thymeleaf-3.1.3.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/attoparser/attoparser/2.0.7.RELEASE/attoparser-2.0.7.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/unbescape/unbescape/1.1.6.RELEASE/unbescape-1.1.6.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-web/3.4.7/spring-boot-starter-web-3.4.7.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-json/3.4.7/spring-boot-starter-json-3.4.7.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.18.4/jackson-datatype-jdk8-2.18.4.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.18.4/jackson-datatype-jsr310-2.18.4.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/module/jackson-module-parameter-names/2.18.4/jackson-module-parameter-names-2.18.4.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-tomcat/3.4.7/spring-boot-starter-tomcat-3.4.7.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/embed/tomcat-embed-core/10.1.42/tomcat-embed-core-10.1.42.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/embed/tomcat-embed-el/10.1.42/tomcat-embed-el-10.1.42.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/embed/tomcat-embed-websocket/10.1.42/tomcat-embed-websocket-10.1.42.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-web/6.2.8/spring-web-6.2.8.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-beans/6.2.8/spring-beans-6.2.8.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/io/micrometer/micrometer-observation/1.14.8/micrometer-observation-1.14.8.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/io/micrometer/micrometer-commons/1.14.8/micrometer-commons-1.14.8.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-webmvc/6.2.8/spring-webmvc-6.2.8.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-context/6.2.8/spring-context-6.2.8.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-expression/6.2.8/spring-expression-6.2.8.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-data-jpa/3.4.7/spring-boot-starter-data-jpa-3.4.7.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/orm/hibernate-core/6.6.18.Final/hibernate-core-6.6.18.Final.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/jakarta/persistence/jakarta.persistence-api/3.1.0/jakarta.persistence-api-3.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-thymeleaf/4.1.0/spring-boot-starter-thymeleaf-4.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter/4.1.0/spring-boot-starter-4.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-logging/4.1.0/spring-boot-starter-logging-4.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/ch/qos/logback/logback-classic/1.5.34/logback-classic-1.5.34.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/ch/qos/logback/logback-core/1.5.34/logback-core-1.5.34.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-to-slf4j/2.25.4/log4j-to-slf4j-2.25.4.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-api/2.25.4/log4j-api-2.25.4.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/jul-to-slf4j/2.0.18/jul-to-slf4j-2.0.18.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-autoconfigure/4.1.0/spring-boot-autoconfigure-4.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/jakarta/annotation/jakarta.annotation-api/3.0.0/jakarta.annotation-api-3.0.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/yaml/snakeyaml/2.6/snakeyaml-2.6.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-thymeleaf/4.1.0/spring-boot-thymeleaf-4.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot/4.1.0/spring-boot-4.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-context/7.0.8/spring-context-7.0.8.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-web/7.0.8/spring-web-7.0.8.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/io/micrometer/micrometer-observation/1.17.0/micrometer-observation-1.17.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/io/micrometer/micrometer-commons/1.17.0/micrometer-commons-1.17.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-web/4.1.0/spring-boot-starter-web-4.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-jackson/4.1.0/spring-boot-starter-jackson-4.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-jackson/4.1.0/spring-boot-jackson-4.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/tools/jackson/core/jackson-databind/3.1.4/jackson-databind-3.1.4.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/tools/jackson/core/jackson-core/3.1.4/jackson-core-3.1.4.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-tomcat/4.1.0/spring-boot-starter-tomcat-4.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-tomcat-runtime/4.1.0/spring-boot-starter-tomcat-runtime-4.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-web-server/4.1.0/spring-boot-web-server-4.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/embed/tomcat-embed-core/11.0.22/tomcat-embed-core-11.0.22.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/embed/tomcat-embed-el/11.0.22/tomcat-embed-el-11.0.22.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/embed/tomcat-embed-websocket/11.0.22/tomcat-embed-websocket-11.0.22.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-tomcat/4.1.0/spring-boot-tomcat-4.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-http-converter/4.1.0/spring-boot-http-converter-4.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-webmvc/4.1.0/spring-boot-webmvc-4.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-servlet/4.1.0/spring-boot-servlet-4.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-webmvc/7.0.8/spring-webmvc-7.0.8.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-expression/7.0.8/spring-expression-7.0.8.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-data-jpa/4.1.0/spring-boot-starter-data-jpa-4.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-data-jpa/4.1.0/spring-boot-data-jpa-4.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-data-commons/4.1.0/spring-boot-data-commons-4.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-persistence/4.1.0/spring-boot-persistence-4.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/data/spring-data-commons/4.1.0/spring-data-commons-4.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-hibernate/4.1.0/spring-boot-hibernate-4.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-jpa/4.1.0/spring-boot-jpa-4.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/jakarta/persistence/jakarta.persistence-api/3.2.0/jakarta.persistence-api-3.2.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/orm/hibernate-core/7.4.1.Final/hibernate-core-7.4.1.Final.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/jakarta/transaction/jakarta.transaction-api/2.0.1/jakarta.transaction-api-2.0.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/jboss/logging/jboss-logging/3.6.1.Final/jboss-logging-3.6.1.Final.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/common/hibernate-commons-annotations/7.0.3.Final/hibernate-commons-annotations-7.0.3.Final.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/io/smallrye/jandex/3.2.0/jandex-3.2.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/classmate/1.7.0/classmate-1.7.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/bytebuddy/byte-buddy/1.15.11/byte-buddy-1.15.11.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/jakarta/xml/bind/jakarta.xml.bind-api/4.0.2/jakarta.xml.bind-api-4.0.2.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/jakarta/activation/jakarta.activation-api/2.1.3/jakarta.activation-api-2.1.3.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/glassfish/jaxb/jaxb-runtime/4.0.5/jaxb-runtime-4.0.5.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/glassfish/jaxb/jaxb-core/4.0.5/jaxb-core-4.0.5.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/eclipse/angus/angus-activation/2.0.2/angus-activation-2.0.2.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/glassfish/jaxb/txw2/4.0.5/txw2-4.0.5.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/jboss/logging/jboss-logging/3.6.3.Final/jboss-logging-3.6.3.Final.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/models/hibernate-models/1.1.1/hibernate-models-1.1.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/net/bytebuddy/byte-buddy/1.18.10/byte-buddy-1.18.10.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/jakarta/xml/bind/jakarta.xml.bind-api/4.0.5/jakarta.xml.bind-api-4.0.5.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/jakarta/activation/jakarta.activation-api/2.1.4/jakarta.activation-api-2.1.4.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/glassfish/jaxb/jaxb-runtime/4.0.9/jaxb-runtime-4.0.9.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/glassfish/jaxb/jaxb-core/4.0.9/jaxb-core-4.0.9.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/eclipse/angus/angus-activation/2.0.3/angus-activation-2.0.3.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/glassfish/jaxb/txw2/4.0.9/txw2-4.0.9.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/istack/istack-commons-runtime/4.1.2/istack-commons-runtime-4.1.2.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/jakarta/inject/jakarta.inject-api/2.0.1/jakarta.inject-api-2.0.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/antlr/antlr4-runtime/4.13.0/antlr4-runtime-4.13.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/data/spring-data-jpa/3.4.7/spring-data-jpa-3.4.7.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/data/spring-data-commons/3.4.7/spring-data-commons-3.4.7.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-orm/6.2.8/spring-orm-6.2.8.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-tx/6.2.8/spring-tx-6.2.8.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-aspects/6.2.8/spring-aspects-6.2.8.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/aspectj/aspectjweaver/1.9.24/aspectjweaver-1.9.24.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-jdbc/3.4.7/spring-boot-starter-jdbc-3.4.7.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/zaxxer/HikariCP/5.1.0/HikariCP-5.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-jdbc/6.2.8/spring-jdbc-6.2.8.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-security/3.4.7/spring-boot-starter-security-3.4.7.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-aop/6.2.8/spring-aop-6.2.8.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-config/6.4.7/spring-security-config-6.4.7.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-core/6.4.7/spring-security-core-6.4.7.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-crypto/6.4.7/spring-security-crypto-6.4.7.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-web/6.4.7/spring-security-web-6.4.7.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-orm/7.0.8/spring-orm-7.0.8.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/data/spring-data-jpa/4.1.0/spring-data-jpa-4.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-tx/7.0.8/spring-tx-7.0.8.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/antlr/antlr4-runtime/4.13.2/antlr4-runtime-4.13.2.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-aspects/7.0.8/spring-aspects-7.0.8.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/aspectj/aspectjweaver/1.9.25.1/aspectjweaver-1.9.25.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-jdbc/4.1.0/spring-boot-jdbc-4.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-sql/4.1.0/spring-boot-sql-4.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-transaction/4.1.0/spring-boot-transaction-4.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-jdbc/7.0.8/spring-jdbc-7.0.8.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-jdbc/4.1.0/spring-boot-starter-jdbc-4.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/zaxxer/HikariCP/7.0.2/HikariCP-7.0.2.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-security/4.1.0/spring-boot-starter-security-4.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-security/4.1.0/spring-boot-security-4.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-config/7.1.0/spring-security-config-7.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-core/7.1.0/spring-security-core-7.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-crypto/7.1.0/spring-security-crypto-7.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-web/7.1.0/spring-security-web-7.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-aop/7.0.8/spring-aop-7.0.8.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-beans/7.0.8/spring-beans-7.0.8.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-core/7.0.8/spring-core-7.0.8.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/commons-logging/commons-logging/1.3.6/commons-logging-1.3.6.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/thymeleaf/extras/thymeleaf-extras-springsecurity6/3.1.1.RELEASE/thymeleaf-extras-springsecurity6-3.1.1.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/slf4j-api/2.0.17/slf4j-api-2.0.17.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/projectlombok/lombok/1.18.38/lombok-1.18.38.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/thymeleaf/thymeleaf-spring6/3.1.5.RELEASE/thymeleaf-spring6-3.1.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/thymeleaf/thymeleaf/3.1.5.RELEASE/thymeleaf-3.1.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/attoparser/attoparser/2.0.7.RELEASE/attoparser-2.0.7.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/unbescape/unbescape/1.1.6.RELEASE/unbescape-1.1.6.RELEASE.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/slf4j-api/2.0.18/slf4j-api-2.0.18.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/projectlombok/lombok/1.18.46/lombok-1.18.46.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/io/jsonwebtoken/jjwt/0.9.0/jjwt-0.9.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-databind/2.18.4/jackson-databind-2.18.4.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-annotations/2.18.4/jackson-annotations-2.18.4.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-core/2.18.4.1/jackson-core-2.18.4.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/mysql/mysql-connector-j/9.1.0/mysql-connector-j-9.1.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-databind/2.21.4/jackson-databind-2.21.4.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-annotations/2.21/jackson-annotations-2.21.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-core/2.21.4/jackson-core-2.21.4.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/mysql/mysql-connector-j/9.7.0/mysql-connector-j-9.7.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/joda-time/joda-time/2.10.9/joda-time-2.10.9.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-csv/1.5/commons-csv-1.5.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/javax/xml/bind/jaxb-api/2.3.0/jaxb-api-2.3.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springdoc/springdoc-openapi-starter-webmvc-ui/2.8.5/springdoc-openapi-starter-webmvc-ui-2.8.5.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springdoc/springdoc-openapi-starter-webmvc-api/2.8.5/springdoc-openapi-starter-webmvc-api-2.8.5.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/springdoc/springdoc-openapi-starter-common/2.8.5/springdoc-openapi-starter-common-2.8.5.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/io/swagger/core/v3/swagger-core-jakarta/2.2.28/swagger-core-jakarta-2.2.28.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-lang3/3.20.0/commons-lang3-3.20.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/io/swagger/core/v3/swagger-annotations-jakarta/2.2.28/swagger-annotations-jakarta-2.2.28.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/io/swagger/core/v3/swagger-models-jakarta/2.2.28/swagger-models-jakarta-2.2.28.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/jakarta/validation/jakarta.validation-api/3.1.1/jakarta.validation-api-3.1.1.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/dataformat/jackson-dataformat-yaml/2.21.4/jackson-dataformat-yaml-2.21.4.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.21.4/jackson-datatype-jsr310-2.21.4.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/webjars/swagger-ui/5.18.3/swagger-ui-5.18.3.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/webjars/webjars-locator-lite/1.1.3/webjars-locator-lite-1.1.3.jar" enabled="true" runInBatchMode="false"/>
|
||||
<factorypathentry kind="VARJAR" id="M2_REPO/org/jspecify/jspecify/1.0.0/jspecify-1.0.0.jar" enabled="true" runInBatchMode="false"/>
|
||||
</factorypath>
|
||||
|
|
|
|||
2
build
2
build
|
|
@ -4,7 +4,7 @@ ROOT=$(pwd)
|
|||
./stop
|
||||
# export JAVA_HOME="/usr/lib/jvm/java-11-openjdk"
|
||||
mkdir -p logs
|
||||
if ! mvn clean package > logs/build.log 2> logs/build.err.log; then
|
||||
if ! mvn clean install > logs/build.log 2> logs/build.err.log; then
|
||||
echo "build failed"
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
|||
2
eclipse
2
eclipse
|
|
@ -2,5 +2,5 @@
|
|||
cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||
LOG=./logs
|
||||
mkdir -p $LOG
|
||||
/home/eclipse/sts-4.30.0.RELEASE/SpringToolSuite4 -data .. \
|
||||
/home/eclipse/sts-5.2.0.RELEASE/SpringToolsForEclipse -data .. \
|
||||
>$LOG/eclipse-sts.log 2>$LOG/eclipse-sts.err.log &
|
||||
|
|
|
|||
16
pom.xml
16
pom.xml
|
|
@ -12,7 +12,7 @@
|
|||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>3.4.7</version>
|
||||
<version>4.1.0</version>
|
||||
</parent>
|
||||
|
||||
<dependencyManagement>
|
||||
|
|
@ -62,8 +62,8 @@
|
|||
<version>0.9.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
<groupId>org.mariadb.jdbc</groupId>
|
||||
<artifactId>mariadb-java-client</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
@ -88,7 +88,6 @@
|
|||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<java.version>17</java.version>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
|
|
@ -97,6 +96,15 @@
|
|||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<compilerArgs>
|
||||
<arg>-proc:full</arg>
|
||||
</compilerArgs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
|
|
|||
|
|
@ -103,7 +103,9 @@ public class ReportCategory {
|
|||
public BigDecimal getDetailTotal() {
|
||||
var amount = new BigDecimal(0);
|
||||
for (final ReportDetail detail : details) {
|
||||
amount = amount.add(detail.amount);
|
||||
if (!detail.hidden) {
|
||||
amount = amount.add(detail.amount);
|
||||
}
|
||||
}
|
||||
return amount;
|
||||
}
|
||||
|
|
@ -111,10 +113,12 @@ public class ReportCategory {
|
|||
public BigDecimal getMonthTotal(final int month) {
|
||||
var amount = new BigDecimal(0);
|
||||
for (final ReportDetail detail : details) {
|
||||
final Calendar cal = new GregorianCalendar();
|
||||
cal.setTime(detail.date);
|
||||
if (month == cal.get(Calendar.MONTH)) {
|
||||
amount = amount.add(detail.amount);
|
||||
if (!detail.hidden) {
|
||||
final Calendar cal = new GregorianCalendar();
|
||||
cal.setTime(detail.date);
|
||||
if (month == cal.get(Calendar.MONTH)) {
|
||||
amount = amount.add(detail.amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
return amount;
|
||||
|
|
@ -125,14 +129,16 @@ public class ReportCategory {
|
|||
if (monthTotals == null) {
|
||||
monthTotals = new HashMap<>();
|
||||
for (final ReportDetail detail : details) {
|
||||
final Calendar cal = new GregorianCalendar();
|
||||
cal.setTime(detail.date);
|
||||
final int month = cal.get(Calendar.MONTH);
|
||||
BigDecimal monthTotal = monthTotals.get(month);
|
||||
if (monthTotal == null) {
|
||||
monthTotal = new BigDecimal(0);
|
||||
if (!detail.hidden) {
|
||||
final Calendar cal = new GregorianCalendar();
|
||||
cal.setTime(detail.date);
|
||||
final int month = cal.get(Calendar.MONTH);
|
||||
BigDecimal monthTotal = monthTotals.get(month);
|
||||
if (monthTotal == null) {
|
||||
monthTotal = new BigDecimal(0);
|
||||
}
|
||||
monthTotals.put(month, monthTotal.add(detail.amount));
|
||||
}
|
||||
monthTotals.put(month, monthTotal.add(detail.amount));
|
||||
}
|
||||
this.monthTotals = monthTotals;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
package com.stephenschafer.budget;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public class ReportCategoryFilters {
|
||||
final String year;
|
||||
final boolean includeIncome;
|
||||
final boolean includePayments;
|
||||
final boolean includeInvestments;
|
||||
final boolean includeExpenses;
|
||||
final boolean excludePaypalPayments;
|
||||
final boolean excludeWholefoodsPayments;
|
||||
final boolean excludeAmazonPayments;
|
||||
final int monthCount;
|
||||
}
|
||||
|
|
@ -95,6 +95,7 @@ public class ReportController {
|
|||
@RequestParam(required = false, name = "startDate") final String startDateString,
|
||||
@RequestParam(required = false, name = "endDate") final String endDateString,
|
||||
@RequestParam(required = false) final List<String> includes,
|
||||
@RequestParam(required = false) final List<String> excludes,
|
||||
final HttpServletRequest request)
|
||||
throws SQLException, UnsupportedEncodingException, FileNotFoundException, IOException {
|
||||
log.info("GET /report");
|
||||
|
|
@ -127,18 +128,45 @@ public class ReportController {
|
|||
else if ("investments".equalsIgnoreCase(include)) {
|
||||
tmpIncludeInvestments = true;
|
||||
}
|
||||
else {
|
||||
return new ApiResponse<>(HttpStatus.BAD_REQUEST.value(),
|
||||
"Unrecognized includes value", null);
|
||||
}
|
||||
}
|
||||
}
|
||||
final var includeExpenses = tmpIncludeExpenses;
|
||||
final var includeIncome = tmpIncludeIncome;
|
||||
final var includePayments = tmpIncludePayments;
|
||||
final var includeInvestments = tmpIncludeInvestments;
|
||||
var tmpExcludePaypalPayments = false;
|
||||
var tmpExcludeWholefoodsPayments = false;
|
||||
var tmpExcludeAmazonPayments = false;
|
||||
if (excludes != null && !excludes.isEmpty()) {
|
||||
for (final String exclude : excludes) {
|
||||
if ("paypalPayments".equalsIgnoreCase(exclude)) {
|
||||
tmpExcludePaypalPayments = true;
|
||||
}
|
||||
else if ("wholefoodsPayments".equalsIgnoreCase(exclude)) {
|
||||
tmpExcludeWholefoodsPayments = true;
|
||||
}
|
||||
else if ("amazonPayments".equalsIgnoreCase(exclude)) {
|
||||
tmpExcludeAmazonPayments = true;
|
||||
}
|
||||
else {
|
||||
return new ApiResponse<>(HttpStatus.BAD_REQUEST.value(),
|
||||
"Unrecognized excludes value", null);
|
||||
}
|
||||
}
|
||||
}
|
||||
final var excludePaypalPayments = tmpExcludePaypalPayments;
|
||||
final var excludeWholefoodsPayments = tmpExcludeWholefoodsPayments;
|
||||
final var excludeAmazonPayments = tmpExcludeAmazonPayments;
|
||||
final DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
||||
final Date startDate;
|
||||
final Date endDate;
|
||||
Date tmpEndDate;
|
||||
try {
|
||||
startDate = startDateString == null ? null : df.parse(startDateString);
|
||||
endDate = endDateString == null ? null : df.parse(endDateString);
|
||||
tmpEndDate = endDateString == null ? null : df.parse(endDateString);
|
||||
}
|
||||
catch (final ParseException e) {
|
||||
return new ApiResponse<>(HttpStatus.BAD_REQUEST.value(), "Invalid date", null);
|
||||
|
|
@ -153,19 +181,25 @@ public class ReportController {
|
|||
startMonth = 0;
|
||||
}
|
||||
final int endMonth;
|
||||
if (endDate != null) {
|
||||
final Date endDate;
|
||||
if (tmpEndDate != null) {
|
||||
final Calendar endCal = new GregorianCalendar();
|
||||
endCal.setTime(endDate);
|
||||
endCal.setTime(tmpEndDate);
|
||||
endMonth = endCal.get(Calendar.MONTH);
|
||||
endCal.add(Calendar.DAY_OF_MONTH, 1);
|
||||
endDate = endCal.getTime();
|
||||
}
|
||||
else {
|
||||
endMonth = 11;
|
||||
endDate = null;
|
||||
}
|
||||
final int monthCount = endMonth - startMonth + 1;
|
||||
final Map<String, Report> response = new HashMap<>();
|
||||
for (final String year : years) {
|
||||
final var categoryMap = loadCategories(year, includeIncome, includePayments,
|
||||
includeInvestments, includeExpenses, monthCount);
|
||||
final var filters = new ReportCategoryFilters(year, includeIncome, includePayments,
|
||||
includeInvestments, includeExpenses, excludePaypalPayments,
|
||||
excludeWholefoodsPayments, excludeAmazonPayments, monthCount);
|
||||
final var categoryMap = loadCategories(filters);
|
||||
final String createBudgetTableSql = Util.getResourceAsString(
|
||||
"createBudgetAmountsTable.sql") //
|
||||
.replace("${ifNotExists}", "if not exists ") //
|
||||
|
|
@ -188,6 +222,7 @@ public class ReportController {
|
|||
}
|
||||
}
|
||||
});
|
||||
final Map<String, List<ReportDetail>> detailMap = new HashMap<>();
|
||||
final String sql = Util.getResourceAsString("getTransactionDetail.sql") //
|
||||
.replace("${databaseName}", "budget_" + year) //
|
||||
.replace("${regexDatabaseName}", "budget");
|
||||
|
|
@ -214,7 +249,14 @@ public class ReportController {
|
|||
category.isIncluded()) {
|
||||
category.addDetail(detail);
|
||||
}
|
||||
List<ReportDetail> detailList = detailMap.get(detail.source);
|
||||
if (detailList == null) {
|
||||
detailList = new ArrayList<>();
|
||||
detailMap.put(detail.source, detailList);
|
||||
}
|
||||
detailList.add(detail);
|
||||
});
|
||||
hidePaymentDetails(detailMap);
|
||||
final var rootCategory = new ReportCategory(-1, null, "total", monthCount);
|
||||
for (final Integer categoryId : categoryMap.keySet()) {
|
||||
final var category = categoryMap.get(categoryId);
|
||||
|
|
@ -229,6 +271,41 @@ public class ReportController {
|
|||
return new ApiResponse<>(HttpStatus.OK.value(), "Report fetched successfully", response);
|
||||
}
|
||||
|
||||
static final String[] payerSources = new String[] { "chase", "firstbank" };
|
||||
static final String[] payeeSources = new String[] { "paypal", "amz.sandy.dig.org",
|
||||
"amz.steve.dig.ord", "amz.sandy.retail.ord", "amz.steve.retail.ord" };
|
||||
|
||||
private void hidePaymentDetails(final Map<String, List<ReportDetail>> detailMap) {
|
||||
final List<ReportDetail> payerDetails = new ArrayList<>();
|
||||
for (final String source : payerSources) {
|
||||
final List<ReportDetail> details = detailMap.get(source);
|
||||
if (details != null) {
|
||||
for (final ReportDetail detail : details) {
|
||||
payerDetails.add(detail);
|
||||
}
|
||||
}
|
||||
}
|
||||
final List<ReportDetail> payeeDetails = new ArrayList<>();
|
||||
for (final String source : payeeSources) {
|
||||
final List<ReportDetail> details = detailMap.get(source);
|
||||
if (details != null) {
|
||||
for (final ReportDetail detail : details) {
|
||||
payeeDetails.add(detail);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (final ReportDetail payeeDetail : payeeDetails) {
|
||||
for (final ReportDetail payerDetail : payerDetails) {
|
||||
if (payeeDetail.isPaidBy(payerDetail)) {
|
||||
payerDetail.setHidden(true);
|
||||
payeeDetail.setPaidByTransactionId(payerDetail.transactionId);
|
||||
payerDetail.setPaidTransactionId(payeeDetail.transactionId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
List<String> getYears() throws IOException, SQLException {
|
||||
final String sql = Util.getResourceAsString("getYears.sql") //
|
||||
.replace("${databaseName}", "budget");
|
||||
|
|
@ -244,9 +321,7 @@ public class ReportController {
|
|||
boolean include(ReportCategory category);
|
||||
}
|
||||
|
||||
private Map<Integer, ReportCategory> loadCategories(final String year,
|
||||
final boolean includeIncome, final boolean includePayments,
|
||||
final boolean includeInvestments, final boolean includeExpenses, final int monthCount)
|
||||
private Map<Integer, ReportCategory> loadCategories(final ReportCategoryFilters filters)
|
||||
throws SQLException, IOException {
|
||||
ReportCategory unknownCategory = null;
|
||||
final Map<Integer, ReportCategory> categories = new HashMap<>();
|
||||
|
|
@ -260,7 +335,7 @@ public class ReportController {
|
|||
parentId = null;
|
||||
}
|
||||
final var name = rs.getString(3);
|
||||
final var category = new ReportCategory(id, parentId, name, monthCount);
|
||||
final var category = new ReportCategory(id, parentId, name, filters.monthCount);
|
||||
return category;
|
||||
});
|
||||
for (final ReportCategory category : list) {
|
||||
|
|
@ -274,29 +349,48 @@ public class ReportController {
|
|||
category.updateParent(categories);
|
||||
}
|
||||
if (unknownCategory == null) {
|
||||
unknownCategory = new ReportCategory(-1, null, "unknown", monthCount);
|
||||
unknownCategory = new ReportCategory(-1, null, "unknown", filters.monthCount);
|
||||
categories.put(unknownCategory.getId(), unknownCategory);
|
||||
}
|
||||
for (final Integer categoryId : categories.keySet()) {
|
||||
final var category = categories.get(categoryId);
|
||||
final CategoryFilter filter = category1 -> {
|
||||
final String categoryName = category1.getName();
|
||||
final ReportCategory parentCategory = category1.getParent();
|
||||
final String parentCategoryName = parentCategory == null ? null
|
||||
: parentCategory.getName();
|
||||
if ("income".equals(categoryName) || "refunds".equals(categoryName)) {
|
||||
if (!includeIncome) {
|
||||
if (!filters.includeIncome) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if ("payment".equals(categoryName)) {
|
||||
if (!includePayments) {
|
||||
if (!filters.includePayments) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if ("investment".equals(categoryName)) {
|
||||
if (!includeInvestments) {
|
||||
if (!filters.includeInvestments) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (!includeExpenses) {
|
||||
else if ("paypal".equals(categoryName) && "payment".equals(parentCategoryName)) {
|
||||
if (filters.excludePaypalPayments) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if ("wholefoods".equals(categoryName)
|
||||
&& "payment".equals(parentCategoryName)) {
|
||||
if (filters.excludeWholefoodsPayments) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if ("amazon".equals(categoryName) && "payment".equals(parentCategoryName)) {
|
||||
if (filters.excludeAmazonPayments) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (!filters.includeExpenses) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -20,6 +20,9 @@ class ReportDetail implements Comparable<ReportDetail> {
|
|||
int flags;
|
||||
String requiredSource;
|
||||
String extraDescription;
|
||||
boolean hidden = false;
|
||||
Integer paidByTransactionId = null;
|
||||
Integer paidTransactionId = null;
|
||||
|
||||
@Override
|
||||
public int compareTo(final ReportDetail arg1) {
|
||||
|
|
@ -77,4 +80,32 @@ class ReportDetail implements Comparable<ReportDetail> {
|
|||
public boolean isBefore(final Date endDate) {
|
||||
return endDate == null || endDate.getTime() > this.date.getTime();
|
||||
}
|
||||
|
||||
public boolean isPaidBy(final ReportDetail payingDetail) {
|
||||
if (payingDetail.description == null) {
|
||||
return false;
|
||||
}
|
||||
if (payingDetail.description.toLowerCase().indexOf(this.source.toLowerCase()) < 0) {
|
||||
return false;
|
||||
}
|
||||
if (payingDetail.date == null) {
|
||||
return false;
|
||||
}
|
||||
if (this.date == null) {
|
||||
return false;
|
||||
}
|
||||
if (payingDetail.date.getTime() < this.date.getTime()) {
|
||||
return false;
|
||||
}
|
||||
if (payingDetail.amount == null) {
|
||||
return false;
|
||||
}
|
||||
if (this.amount == null) {
|
||||
return false;
|
||||
}
|
||||
if (!payingDetail.amount.equals(this.amount)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -27,8 +27,7 @@ public class WebSecurityConfig {
|
|||
@Bean
|
||||
AuthenticationManager authenticationManager(final UserDetailsService userDetailsService,
|
||||
final PasswordEncoder passwordEncoder) {
|
||||
final var provider = new DaoAuthenticationProvider();
|
||||
provider.setUserDetailsService(userDetailsService);
|
||||
final var provider = new DaoAuthenticationProvider(userDetailsService);
|
||||
provider.setPasswordEncoder(passwordEncoder);
|
||||
return new ProviderManager(provider);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
|
||||
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
|
||||
#com.mysql.jdbc.Driver
|
||||
spring.datasource.url=jdbc:mysql://localhost:3306?serverTimezone=UTC&useSSL=false
|
||||
spring.datasource.username=elephant
|
||||
# spring.datasource.password=CHANGEME
|
||||
|
|
|
|||
Loading…
Reference in a new issue