diff --git a/.DS_Store b/.DS_Store
new file mode 100644
index 000000000..a59f59db9
Binary files /dev/null and b/.DS_Store differ
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000..cdb913b85
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,23 @@
+# Compiled class file
+*.class
+
+# Log file
+*.log
+
+# BlueJ files
+*.ctxt
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.nar
+*.ear
+*.zip
+*.tar.gz
+.rar
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 000000000..26d33521a
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 000000000..e65307f0f
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
new file mode 100644
index 000000000..63e900193
--- /dev/null
+++ b/.idea/encodings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
new file mode 100644
index 000000000..712ab9d98
--- /dev/null
+++ b/.idea/jarRepositories.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/jpa-buddy.xml b/.idea/jpa-buddy.xml
new file mode 100644
index 000000000..d08f40080
--- /dev/null
+++ b/.idea/jpa-buddy.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__antlr_antlr_2_7_7.xml b/.idea/libraries/Maven__antlr_antlr_2_7_7.xml
new file mode 100644
index 000000000..b8d93d8e0
--- /dev/null
+++ b/.idea/libraries/Maven__antlr_antlr_2_7_7.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_2_5.xml b/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_2_5.xml
new file mode 100644
index 000000000..3b769cbef
--- /dev/null
+++ b/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_2_5.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__ch_qos_logback_logback_core_1_2_5.xml b/.idea/libraries/Maven__ch_qos_logback_logback_core_1_2_5.xml
new file mode 100644
index 000000000..568aa1333
--- /dev/null
+++ b/.idea/libraries/Maven__ch_qos_logback_logback_core_1_2_5.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_datastax_oss_java_driver_core_4_13_0.xml b/.idea/libraries/Maven__com_datastax_oss_java_driver_core_4_13_0.xml
new file mode 100644
index 000000000..11382471b
--- /dev/null
+++ b/.idea/libraries/Maven__com_datastax_oss_java_driver_core_4_13_0.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_datastax_oss_java_driver_shaded_guava_25_1_jre_graal_sub_1.xml b/.idea/libraries/Maven__com_datastax_oss_java_driver_shaded_guava_25_1_jre_graal_sub_1.xml
new file mode 100644
index 000000000..6bf150008
--- /dev/null
+++ b/.idea/libraries/Maven__com_datastax_oss_java_driver_shaded_guava_25_1_jre_graal_sub_1.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_datastax_oss_native_protocol_1_5_0.xml b/.idea/libraries/Maven__com_datastax_oss_native_protocol_1_5_0.xml
new file mode 100644
index 000000000..7dc984fe3
--- /dev/null
+++ b/.idea/libraries/Maven__com_datastax_oss_native_protocol_1_5_0.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_esri_geometry_esri_geometry_api_1_2_1.xml b/.idea/libraries/Maven__com_esri_geometry_esri_geometry_api_1_2_1.xml
new file mode 100644
index 000000000..78ea4dda9
--- /dev/null
+++ b/.idea/libraries/Maven__com_esri_geometry_esri_geometry_api_1_2_1.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_fasterxml_classmate_1_5_1.xml b/.idea/libraries/Maven__com_fasterxml_classmate_1_5_1.xml
new file mode 100644
index 000000000..bc7d7fd86
--- /dev/null
+++ b/.idea/libraries/Maven__com_fasterxml_classmate_1_5_1.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_12_4.xml b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_12_4.xml
new file mode 100644
index 000000000..5351aad07
--- /dev/null
+++ b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_12_4.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_12_4.xml b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_12_4.xml
new file mode 100644
index 000000000..b61928ee9
--- /dev/null
+++ b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_12_4.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_12_4.xml b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_12_4.xml
new file mode 100644
index 000000000..3088e4d32
--- /dev/null
+++ b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_12_4.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_12_4.xml b/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_12_4.xml
new file mode 100644
index 000000000..03661abee
--- /dev/null
+++ b/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_12_4.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_12_4.xml b/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_12_4.xml
new file mode 100644
index 000000000..518a6c986
--- /dev/null
+++ b/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_12_4.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_fasterxml_jackson_module_jackson_module_parameter_names_2_12_4.xml b/.idea/libraries/Maven__com_fasterxml_jackson_module_jackson_module_parameter_names_2_12_4.xml
new file mode 100644
index 000000000..9c5251c32
--- /dev/null
+++ b/.idea/libraries/Maven__com_fasterxml_jackson_module_jackson_module_parameter_names_2_12_4.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_github_jnr_jffi_1_3_1.xml b/.idea/libraries/Maven__com_github_jnr_jffi_1_3_1.xml
new file mode 100644
index 000000000..5b5933644
--- /dev/null
+++ b/.idea/libraries/Maven__com_github_jnr_jffi_1_3_1.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_github_jnr_jffi_native_1_3_1.xml b/.idea/libraries/Maven__com_github_jnr_jffi_native_1_3_1.xml
new file mode 100644
index 000000000..768bab74c
--- /dev/null
+++ b/.idea/libraries/Maven__com_github_jnr_jffi_native_1_3_1.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_github_jnr_jnr_a64asm_1_0_0.xml b/.idea/libraries/Maven__com_github_jnr_jnr_a64asm_1_0_0.xml
new file mode 100644
index 000000000..7c81fe212
--- /dev/null
+++ b/.idea/libraries/Maven__com_github_jnr_jnr_a64asm_1_0_0.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_github_jnr_jnr_constants_0_10_1.xml b/.idea/libraries/Maven__com_github_jnr_jnr_constants_0_10_1.xml
new file mode 100644
index 000000000..c85ec6ac5
--- /dev/null
+++ b/.idea/libraries/Maven__com_github_jnr_jnr_constants_0_10_1.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_github_jnr_jnr_ffi_2_2_2.xml b/.idea/libraries/Maven__com_github_jnr_jnr_ffi_2_2_2.xml
new file mode 100644
index 000000000..1d8e33229
--- /dev/null
+++ b/.idea/libraries/Maven__com_github_jnr_jnr_ffi_2_2_2.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_github_jnr_jnr_posix_3_1_5.xml b/.idea/libraries/Maven__com_github_jnr_jnr_posix_3_1_5.xml
new file mode 100644
index 000000000..5efd8c64a
--- /dev/null
+++ b/.idea/libraries/Maven__com_github_jnr_jnr_posix_3_1_5.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_github_jnr_jnr_x86asm_1_0_2.xml b/.idea/libraries/Maven__com_github_jnr_jnr_x86asm_1_0_2.xml
new file mode 100644
index 000000000..8b6f57d8a
--- /dev/null
+++ b/.idea/libraries/Maven__com_github_jnr_jnr_x86asm_1_0_2.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_github_spotbugs_spotbugs_annotations_3_1_12.xml b/.idea/libraries/Maven__com_github_spotbugs_spotbugs_annotations_3_1_12.xml
new file mode 100644
index 000000000..a815845a2
--- /dev/null
+++ b/.idea/libraries/Maven__com_github_spotbugs_spotbugs_annotations_3_1_12.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_github_stephenc_jcip_jcip_annotations_1_0_1.xml b/.idea/libraries/Maven__com_github_stephenc_jcip_jcip_annotations_1_0_1.xml
new file mode 100644
index 000000000..6fe105afb
--- /dev/null
+++ b/.idea/libraries/Maven__com_github_stephenc_jcip_jcip_annotations_1_0_1.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_google_code_findbugs_jsr305_3_0_2.xml b/.idea/libraries/Maven__com_google_code_findbugs_jsr305_3_0_2.xml
new file mode 100644
index 000000000..1c380d0bd
--- /dev/null
+++ b/.idea/libraries/Maven__com_google_code_findbugs_jsr305_3_0_2.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_5_0.xml b/.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_5_0.xml
new file mode 100644
index 000000000..b76ecb038
--- /dev/null
+++ b/.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_5_0.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_sun_activation_jakarta_activation_1_2_2.xml b/.idea/libraries/Maven__com_sun_activation_jakarta_activation_1_2_2.xml
new file mode 100644
index 000000000..fea99f026
--- /dev/null
+++ b/.idea/libraries/Maven__com_sun_activation_jakarta_activation_1_2_2.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_sun_istack_istack_commons_runtime_3_0_12.xml b/.idea/libraries/Maven__com_sun_istack_istack_commons_runtime_3_0_12.xml
new file mode 100644
index 000000000..9f0fc0526
--- /dev/null
+++ b/.idea/libraries/Maven__com_sun_istack_istack_commons_runtime_3_0_12.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_typesafe_config_1_4_1.xml b/.idea/libraries/Maven__com_typesafe_config_1_4_1.xml
new file mode 100644
index 000000000..ac8a59da1
--- /dev/null
+++ b/.idea/libraries/Maven__com_typesafe_config_1_4_1.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml b/.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml
new file mode 100644
index 000000000..b8581a6f5
--- /dev/null
+++ b/.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_zaxxer_HikariCP_4_0_3.xml b/.idea/libraries/Maven__com_zaxxer_HikariCP_4_0_3.xml
new file mode 100644
index 000000000..9314c366f
--- /dev/null
+++ b/.idea/libraries/Maven__com_zaxxer_HikariCP_4_0_3.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__io_dropwizard_metrics_metrics_core_4_1_25.xml b/.idea/libraries/Maven__io_dropwizard_metrics_metrics_core_4_1_25.xml
new file mode 100644
index 000000000..df673ee29
--- /dev/null
+++ b/.idea/libraries/Maven__io_dropwizard_metrics_metrics_core_4_1_25.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__io_jsonwebtoken_jjwt_0_9_1.xml b/.idea/libraries/Maven__io_jsonwebtoken_jjwt_0_9_1.xml
new file mode 100644
index 000000000..f25b99b8f
--- /dev/null
+++ b/.idea/libraries/Maven__io_jsonwebtoken_jjwt_0_9_1.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__io_netty_netty_buffer_4_1_67_Final.xml b/.idea/libraries/Maven__io_netty_netty_buffer_4_1_67_Final.xml
new file mode 100644
index 000000000..44eea2f66
--- /dev/null
+++ b/.idea/libraries/Maven__io_netty_netty_buffer_4_1_67_Final.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__io_netty_netty_codec_4_1_67_Final.xml b/.idea/libraries/Maven__io_netty_netty_codec_4_1_67_Final.xml
new file mode 100644
index 000000000..9c663a5ec
--- /dev/null
+++ b/.idea/libraries/Maven__io_netty_netty_codec_4_1_67_Final.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__io_netty_netty_common_4_1_67_Final.xml b/.idea/libraries/Maven__io_netty_netty_common_4_1_67_Final.xml
new file mode 100644
index 000000000..f6ef17690
--- /dev/null
+++ b/.idea/libraries/Maven__io_netty_netty_common_4_1_67_Final.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__io_netty_netty_handler_4_1_67_Final.xml b/.idea/libraries/Maven__io_netty_netty_handler_4_1_67_Final.xml
new file mode 100644
index 000000000..036a8e305
--- /dev/null
+++ b/.idea/libraries/Maven__io_netty_netty_handler_4_1_67_Final.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__io_netty_netty_resolver_4_1_67_Final.xml b/.idea/libraries/Maven__io_netty_netty_resolver_4_1_67_Final.xml
new file mode 100644
index 000000000..d739d5a68
--- /dev/null
+++ b/.idea/libraries/Maven__io_netty_netty_resolver_4_1_67_Final.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__io_netty_netty_transport_4_1_67_Final.xml b/.idea/libraries/Maven__io_netty_netty_transport_4_1_67_Final.xml
new file mode 100644
index 000000000..a51cb29dd
--- /dev/null
+++ b/.idea/libraries/Maven__io_netty_netty_transport_4_1_67_Final.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__jakarta_activation_jakarta_activation_api_1_2_2.xml b/.idea/libraries/Maven__jakarta_activation_jakarta_activation_api_1_2_2.xml
new file mode 100644
index 000000000..be90656e6
--- /dev/null
+++ b/.idea/libraries/Maven__jakarta_activation_jakarta_activation_api_1_2_2.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__jakarta_annotation_jakarta_annotation_api_1_3_5.xml b/.idea/libraries/Maven__jakarta_annotation_jakarta_annotation_api_1_3_5.xml
new file mode 100644
index 000000000..cba9dd244
--- /dev/null
+++ b/.idea/libraries/Maven__jakarta_annotation_jakarta_annotation_api_1_3_5.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__jakarta_persistence_jakarta_persistence_api_2_2_3.xml b/.idea/libraries/Maven__jakarta_persistence_jakarta_persistence_api_2_2_3.xml
new file mode 100644
index 000000000..c11957d98
--- /dev/null
+++ b/.idea/libraries/Maven__jakarta_persistence_jakarta_persistence_api_2_2_3.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__jakarta_transaction_jakarta_transaction_api_1_3_3.xml b/.idea/libraries/Maven__jakarta_transaction_jakarta_transaction_api_1_3_3.xml
new file mode 100644
index 000000000..5b31fe500
--- /dev/null
+++ b/.idea/libraries/Maven__jakarta_transaction_jakarta_transaction_api_1_3_3.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__jakarta_xml_bind_jakarta_xml_bind_api_2_3_3.xml b/.idea/libraries/Maven__jakarta_xml_bind_jakarta_xml_bind_api_2_3_3.xml
new file mode 100644
index 000000000..04213f738
--- /dev/null
+++ b/.idea/libraries/Maven__jakarta_xml_bind_jakarta_xml_bind_api_2_3_3.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__junit_junit_4_13_2.xml b/.idea/libraries/Maven__junit_junit_4_13_2.xml
new file mode 100644
index 000000000..606c352d5
--- /dev/null
+++ b/.idea/libraries/Maven__junit_junit_4_13_2.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__mysql_mysql_connector_java_8_0_26.xml b/.idea/libraries/Maven__mysql_mysql_connector_java_8_0_26.xml
new file mode 100644
index 000000000..89b981286
--- /dev/null
+++ b/.idea/libraries/Maven__mysql_mysql_connector_java_8_0_26.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_10_22.xml b/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_10_22.xml
new file mode 100644
index 000000000..db4968eab
--- /dev/null
+++ b/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_10_22.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__net_bytebuddy_byte_buddy_agent_1_10_22.xml b/.idea/libraries/Maven__net_bytebuddy_byte_buddy_agent_1_10_22.xml
new file mode 100644
index 000000000..910ad03fd
--- /dev/null
+++ b/.idea/libraries/Maven__net_bytebuddy_byte_buddy_agent_1_10_22.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__net_minidev_accessors_smart_2_4_7.xml b/.idea/libraries/Maven__net_minidev_accessors_smart_2_4_7.xml
new file mode 100644
index 000000000..8157bb414
--- /dev/null
+++ b/.idea/libraries/Maven__net_minidev_accessors_smart_2_4_7.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__net_minidev_json_smart_2_4_7.xml b/.idea/libraries/Maven__net_minidev_json_smart_2_4_7.xml
new file mode 100644
index 000000000..a17f648a6
--- /dev/null
+++ b/.idea/libraries/Maven__net_minidev_json_smart_2_4_7.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_apache_logging_log4j_log4j_api_2_14_1.xml b/.idea/libraries/Maven__org_apache_logging_log4j_log4j_api_2_14_1.xml
new file mode 100644
index 000000000..700b41b8e
--- /dev/null
+++ b/.idea/libraries/Maven__org_apache_logging_log4j_log4j_api_2_14_1.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_apache_logging_log4j_log4j_to_slf4j_2_14_1.xml b/.idea/libraries/Maven__org_apache_logging_log4j_log4j_to_slf4j_2_14_1.xml
new file mode 100644
index 000000000..ae5c0b5db
--- /dev/null
+++ b/.idea/libraries/Maven__org_apache_logging_log4j_log4j_to_slf4j_2_14_1.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_9_0_52.xml b/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_9_0_52.xml
new file mode 100644
index 000000000..241b61d11
--- /dev/null
+++ b/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_9_0_52.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_el_9_0_52.xml b/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_el_9_0_52.xml
new file mode 100644
index 000000000..5fdce7ccc
--- /dev/null
+++ b/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_el_9_0_52.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_websocket_9_0_52.xml b/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_websocket_9_0_52.xml
new file mode 100644
index 000000000..74e5155a0
--- /dev/null
+++ b/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_websocket_9_0_52.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_apiguardian_apiguardian_api_1_1_0.xml b/.idea/libraries/Maven__org_apiguardian_apiguardian_api_1_1_0.xml
new file mode 100644
index 000000000..f854ab00f
--- /dev/null
+++ b/.idea/libraries/Maven__org_apiguardian_apiguardian_api_1_1_0.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_aspectj_aspectjweaver_1_9_7.xml b/.idea/libraries/Maven__org_aspectj_aspectjweaver_1_9_7.xml
new file mode 100644
index 000000000..bbaf9a7fc
--- /dev/null
+++ b/.idea/libraries/Maven__org_aspectj_aspectjweaver_1_9_7.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_assertj_assertj_core_3_19_0.xml b/.idea/libraries/Maven__org_assertj_assertj_core_3_19_0.xml
new file mode 100644
index 000000000..94e438d84
--- /dev/null
+++ b/.idea/libraries/Maven__org_assertj_assertj_core_3_19_0.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_codehaus_jackson_jackson_core_asl_1_9_12.xml b/.idea/libraries/Maven__org_codehaus_jackson_jackson_core_asl_1_9_12.xml
new file mode 100644
index 000000000..a02acc09c
--- /dev/null
+++ b/.idea/libraries/Maven__org_codehaus_jackson_jackson_core_asl_1_9_12.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_dom4j_dom4j_2_1_3.xml b/.idea/libraries/Maven__org_dom4j_dom4j_2_1_3.xml
new file mode 100644
index 000000000..10fb46ae0
--- /dev/null
+++ b/.idea/libraries/Maven__org_dom4j_dom4j_2_1_3.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_glassfish_jaxb_jaxb_runtime_2_3_5.xml b/.idea/libraries/Maven__org_glassfish_jaxb_jaxb_runtime_2_3_5.xml
new file mode 100644
index 000000000..310bfb8ee
--- /dev/null
+++ b/.idea/libraries/Maven__org_glassfish_jaxb_jaxb_runtime_2_3_5.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_glassfish_jaxb_txw2_2_3_5.xml b/.idea/libraries/Maven__org_glassfish_jaxb_txw2_2_3_5.xml
new file mode 100644
index 000000000..5ad6256c4
--- /dev/null
+++ b/.idea/libraries/Maven__org_glassfish_jaxb_txw2_2_3_5.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_hamcrest_hamcrest_2_2.xml b/.idea/libraries/Maven__org_hamcrest_hamcrest_2_2.xml
new file mode 100644
index 000000000..6b5496ff0
--- /dev/null
+++ b/.idea/libraries/Maven__org_hamcrest_hamcrest_2_2.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_hamcrest_hamcrest_core_2_2.xml b/.idea/libraries/Maven__org_hamcrest_hamcrest_core_2_2.xml
new file mode 100644
index 000000000..15f1e4c17
--- /dev/null
+++ b/.idea/libraries/Maven__org_hamcrest_hamcrest_core_2_2.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_hdrhistogram_HdrHistogram_2_1_12.xml b/.idea/libraries/Maven__org_hdrhistogram_HdrHistogram_2_1_12.xml
new file mode 100644
index 000000000..6908885fb
--- /dev/null
+++ b/.idea/libraries/Maven__org_hdrhistogram_HdrHistogram_2_1_12.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_hibernate_common_hibernate_commons_annotations_5_1_2_Final.xml b/.idea/libraries/Maven__org_hibernate_common_hibernate_commons_annotations_5_1_2_Final.xml
new file mode 100644
index 000000000..a775836a0
--- /dev/null
+++ b/.idea/libraries/Maven__org_hibernate_common_hibernate_commons_annotations_5_1_2_Final.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_hibernate_hibernate_core_5_4_32_Final.xml b/.idea/libraries/Maven__org_hibernate_hibernate_core_5_4_32_Final.xml
new file mode 100644
index 000000000..a4d5f4d7f
--- /dev/null
+++ b/.idea/libraries/Maven__org_hibernate_hibernate_core_5_4_32_Final.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_hibernate_javax_persistence_hibernate_jpa_2_1_api_1_0_2_Final.xml b/.idea/libraries/Maven__org_hibernate_javax_persistence_hibernate_jpa_2_1_api_1_0_2_Final.xml
new file mode 100644
index 000000000..1d8ce4056
--- /dev/null
+++ b/.idea/libraries/Maven__org_hibernate_javax_persistence_hibernate_jpa_2_1_api_1_0_2_Final.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_javassist_javassist_3_27_0_GA.xml b/.idea/libraries/Maven__org_javassist_javassist_3_27_0_GA.xml
new file mode 100644
index 000000000..39550dac7
--- /dev/null
+++ b/.idea/libraries/Maven__org_javassist_javassist_3_27_0_GA.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_jboss_jandex_2_2_3_Final.xml b/.idea/libraries/Maven__org_jboss_jandex_2_2_3_Final.xml
new file mode 100644
index 000000000..e4e6c8c88
--- /dev/null
+++ b/.idea/libraries/Maven__org_jboss_jandex_2_2_3_Final.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_4_2_Final.xml b/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_4_2_Final.xml
new file mode 100644
index 000000000..5fb518147
--- /dev/null
+++ b/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_4_2_Final.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_json_json_20090211.xml b/.idea/libraries/Maven__org_json_json_20090211.xml
new file mode 100644
index 000000000..e57dc0ae9
--- /dev/null
+++ b/.idea/libraries/Maven__org_json_json_20090211.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_5_7_2.xml b/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_5_7_2.xml
new file mode 100644
index 000000000..a9a026606
--- /dev/null
+++ b/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_5_7_2.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_api_5_7_2.xml b/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_api_5_7_2.xml
new file mode 100644
index 000000000..2b9b50663
--- /dev/null
+++ b/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_api_5_7_2.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_engine_5_7_2.xml b/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_engine_5_7_2.xml
new file mode 100644
index 000000000..636171a62
--- /dev/null
+++ b/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_engine_5_7_2.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_params_5_7_2.xml b/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_params_5_7_2.xml
new file mode 100644
index 000000000..380c9dd7e
--- /dev/null
+++ b/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_params_5_7_2.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_junit_platform_junit_platform_commons_1_7_2.xml b/.idea/libraries/Maven__org_junit_platform_junit_platform_commons_1_7_2.xml
new file mode 100644
index 000000000..66260e69a
--- /dev/null
+++ b/.idea/libraries/Maven__org_junit_platform_junit_platform_commons_1_7_2.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_junit_platform_junit_platform_engine_1_7_2.xml b/.idea/libraries/Maven__org_junit_platform_junit_platform_engine_1_7_2.xml
new file mode 100644
index 000000000..af6fc851f
--- /dev/null
+++ b/.idea/libraries/Maven__org_junit_platform_junit_platform_engine_1_7_2.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_mockito_mockito_core_2_24_0.xml b/.idea/libraries/Maven__org_mockito_mockito_core_2_24_0.xml
new file mode 100644
index 000000000..5176b3673
--- /dev/null
+++ b/.idea/libraries/Maven__org_mockito_mockito_core_2_24_0.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_mockito_mockito_junit_jupiter_3_9_0.xml b/.idea/libraries/Maven__org_mockito_mockito_junit_jupiter_3_9_0.xml
new file mode 100644
index 000000000..0fc879a4b
--- /dev/null
+++ b/.idea/libraries/Maven__org_mockito_mockito_junit_jupiter_3_9_0.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_objenesis_objenesis_2_6.xml b/.idea/libraries/Maven__org_objenesis_objenesis_2_6.xml
new file mode 100644
index 000000000..af41e3b61
--- /dev/null
+++ b/.idea/libraries/Maven__org_objenesis_objenesis_2_6.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_opentest4j_opentest4j_1_2_0.xml b/.idea/libraries/Maven__org_opentest4j_opentest4j_1_2_0.xml
new file mode 100644
index 000000000..fbc1b1635
--- /dev/null
+++ b/.idea/libraries/Maven__org_opentest4j_opentest4j_1_2_0.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_ow2_asm_asm_9_1.xml b/.idea/libraries/Maven__org_ow2_asm_asm_9_1.xml
new file mode 100644
index 000000000..67127c293
--- /dev/null
+++ b/.idea/libraries/Maven__org_ow2_asm_asm_9_1.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_ow2_asm_asm_analysis_9_1.xml b/.idea/libraries/Maven__org_ow2_asm_asm_analysis_9_1.xml
new file mode 100644
index 000000000..a177d6a75
--- /dev/null
+++ b/.idea/libraries/Maven__org_ow2_asm_asm_analysis_9_1.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_ow2_asm_asm_commons_9_1.xml b/.idea/libraries/Maven__org_ow2_asm_asm_commons_9_1.xml
new file mode 100644
index 000000000..ae10a769a
--- /dev/null
+++ b/.idea/libraries/Maven__org_ow2_asm_asm_commons_9_1.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_ow2_asm_asm_tree_9_1.xml b/.idea/libraries/Maven__org_ow2_asm_asm_tree_9_1.xml
new file mode 100644
index 000000000..fbcb2cee7
--- /dev/null
+++ b/.idea/libraries/Maven__org_ow2_asm_asm_tree_9_1.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_ow2_asm_asm_util_9_1.xml b/.idea/libraries/Maven__org_ow2_asm_asm_util_9_1.xml
new file mode 100644
index 000000000..031c51c2f
--- /dev/null
+++ b/.idea/libraries/Maven__org_ow2_asm_asm_util_9_1.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_reactivestreams_reactive_streams_1_0_3.xml b/.idea/libraries/Maven__org_reactivestreams_reactive_streams_1_0_3.xml
new file mode 100644
index 000000000..f17253bf8
--- /dev/null
+++ b/.idea/libraries/Maven__org_reactivestreams_reactive_streams_1_0_3.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_skyscreamer_jsonassert_1_5_0.xml b/.idea/libraries/Maven__org_skyscreamer_jsonassert_1_5_0.xml
new file mode 100644
index 000000000..c4c54d6d5
--- /dev/null
+++ b/.idea/libraries/Maven__org_skyscreamer_jsonassert_1_5_0.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_32.xml b/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_32.xml
new file mode 100644
index 000000000..a758eac2a
--- /dev/null
+++ b/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_32.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_32.xml b/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_32.xml
new file mode 100644
index 000000000..e5a84fb0f
--- /dev/null
+++ b/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_32.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_2_5_4.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_2_5_4.xml
new file mode 100644
index 000000000..0a1945ab8
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_2_5_4.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_2_5_4.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_2_5_4.xml
new file mode 100644
index 000000000..61745f64a
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_2_5_4.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_devtools_2_5_4.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_devtools_2_5_4.xml
new file mode 100644
index 000000000..fc29bb874
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_devtools_2_5_4.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_2_5_4.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_2_5_4.xml
new file mode 100644
index 000000000..3381161c1
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_2_5_4.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_aop_2_5_4.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_aop_2_5_4.xml
new file mode 100644
index 000000000..51cd898df
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_aop_2_5_4.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_data_jpa_2_5_4.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_data_jpa_2_5_4.xml
new file mode 100644
index 000000000..c9657d716
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_data_jpa_2_5_4.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_jdbc_2_5_4.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_jdbc_2_5_4.xml
new file mode 100644
index 000000000..c66e22ca7
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_jdbc_2_5_4.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_json_2_5_4.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_json_2_5_4.xml
new file mode 100644
index 000000000..8014349c9
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_json_2_5_4.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_2_5_4.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_2_5_4.xml
new file mode 100644
index 000000000..b5ab97e2b
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_2_5_4.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_security_2_5_4.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_security_2_5_4.xml
new file mode 100644
index 000000000..68781cd55
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_security_2_5_4.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_2_5_4.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_2_5_4.xml
new file mode 100644
index 000000000..b581ee56b
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_2_5_4.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_tomcat_2_5_4.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_tomcat_2_5_4.xml
new file mode 100644
index 000000000..503acb788
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_tomcat_2_5_4.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_web_2_5_4.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_web_2_5_4.xml
new file mode 100644
index 000000000..230bb3cdb
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_web_2_5_4.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_websocket_2_5_4.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_websocket_2_5_4.xml
new file mode 100644
index 000000000..3b4a88919
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_websocket_2_5_4.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_2_5_4.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_2_5_4.xml
new file mode 100644
index 000000000..10114d4c5
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_2_5_4.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_2_5_4.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_2_5_4.xml
new file mode 100644
index 000000000..8d1c0a139
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_2_5_4.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_data_spring_data_commons_2_5_4.xml b/.idea/libraries/Maven__org_springframework_data_spring_data_commons_2_5_4.xml
new file mode 100644
index 000000000..3c13af1e9
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_data_spring_data_commons_2_5_4.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_data_spring_data_jpa_2_5_4.xml b/.idea/libraries/Maven__org_springframework_data_spring_data_jpa_2_5_4.xml
new file mode 100644
index 000000000..1b905c93d
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_data_spring_data_jpa_2_5_4.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_security_spring_security_config_5_5_2.xml b/.idea/libraries/Maven__org_springframework_security_spring_security_config_5_5_2.xml
new file mode 100644
index 000000000..2c8cd9a55
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_security_spring_security_config_5_5_2.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_security_spring_security_core_5_5_2.xml b/.idea/libraries/Maven__org_springframework_security_spring_security_core_5_5_2.xml
new file mode 100644
index 000000000..dde7dd2e4
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_security_spring_security_core_5_5_2.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_security_spring_security_crypto_5_5_2.xml b/.idea/libraries/Maven__org_springframework_security_spring_security_crypto_5_5_2.xml
new file mode 100644
index 000000000..9a74b3aa5
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_security_spring_security_crypto_5_5_2.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_security_spring_security_web_5_5_2.xml b/.idea/libraries/Maven__org_springframework_security_spring_security_web_5_5_2.xml
new file mode 100644
index 000000000..3562f1210
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_security_spring_security_web_5_5_2.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_spring_aop_5_3_9.xml b/.idea/libraries/Maven__org_springframework_spring_aop_5_3_9.xml
new file mode 100644
index 000000000..06b191bb0
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_spring_aop_5_3_9.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_spring_aspects_5_3_9.xml b/.idea/libraries/Maven__org_springframework_spring_aspects_5_3_9.xml
new file mode 100644
index 000000000..c8f627cf7
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_spring_aspects_5_3_9.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_spring_beans_5_3_9.xml b/.idea/libraries/Maven__org_springframework_spring_beans_5_3_9.xml
new file mode 100644
index 000000000..c5bd2d378
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_spring_beans_5_3_9.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_spring_context_5_3_9.xml b/.idea/libraries/Maven__org_springframework_spring_context_5_3_9.xml
new file mode 100644
index 000000000..4c2900a0e
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_spring_context_5_3_9.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_spring_core_5_3_9.xml b/.idea/libraries/Maven__org_springframework_spring_core_5_3_9.xml
new file mode 100644
index 000000000..2529cbf64
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_spring_core_5_3_9.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_spring_expression_5_3_9.xml b/.idea/libraries/Maven__org_springframework_spring_expression_5_3_9.xml
new file mode 100644
index 000000000..dea9689dc
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_spring_expression_5_3_9.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_spring_jcl_5_3_9.xml b/.idea/libraries/Maven__org_springframework_spring_jcl_5_3_9.xml
new file mode 100644
index 000000000..feea851c0
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_spring_jcl_5_3_9.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_spring_jdbc_5_3_9.xml b/.idea/libraries/Maven__org_springframework_spring_jdbc_5_3_9.xml
new file mode 100644
index 000000000..31e814404
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_spring_jdbc_5_3_9.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_spring_messaging_5_3_9.xml b/.idea/libraries/Maven__org_springframework_spring_messaging_5_3_9.xml
new file mode 100644
index 000000000..ea46c2cba
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_spring_messaging_5_3_9.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_spring_orm_5_3_9.xml b/.idea/libraries/Maven__org_springframework_spring_orm_5_3_9.xml
new file mode 100644
index 000000000..a334be5a8
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_spring_orm_5_3_9.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_spring_test_5_3_9.xml b/.idea/libraries/Maven__org_springframework_spring_test_5_3_9.xml
new file mode 100644
index 000000000..b90da2f0d
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_spring_test_5_3_9.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_spring_tx_5_3_9.xml b/.idea/libraries/Maven__org_springframework_spring_tx_5_3_9.xml
new file mode 100644
index 000000000..d8a0e6752
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_spring_tx_5_3_9.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_spring_web_5_3_9.xml b/.idea/libraries/Maven__org_springframework_spring_web_5_3_9.xml
new file mode 100644
index 000000000..eeb831a9e
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_spring_web_5_3_9.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_spring_webmvc_5_3_9.xml b/.idea/libraries/Maven__org_springframework_spring_webmvc_5_3_9.xml
new file mode 100644
index 000000000..b4ee97bcb
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_spring_webmvc_5_3_9.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_spring_websocket_5_3_9.xml b/.idea/libraries/Maven__org_springframework_spring_websocket_5_3_9.xml
new file mode 100644
index 000000000..c3c39879d
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_spring_websocket_5_3_9.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_xmlunit_xmlunit_core_2_8_2.xml b/.idea/libraries/Maven__org_xmlunit_xmlunit_core_2_8_2.xml
new file mode 100644
index 000000000..e6506e078
--- /dev/null
+++ b/.idea/libraries/Maven__org_xmlunit_xmlunit_core_2_8_2.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_yaml_snakeyaml_1_28.xml b/.idea/libraries/Maven__org_yaml_snakeyaml_1_28.xml
new file mode 100644
index 000000000..1f853f704
--- /dev/null
+++ b/.idea/libraries/Maven__org_yaml_snakeyaml_1_28.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 000000000..25daa30c8
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 000000000..0fb971708
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml
new file mode 100644
index 000000000..797acea53
--- /dev/null
+++ b/.idea/runConfigurations.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
new file mode 100644
index 000000000..e96534fb2
--- /dev/null
+++ b/.idea/uiDesigner.xml
@@ -0,0 +1,124 @@
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 000000000..94a25f7f4
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HELP.md b/HELP.md
new file mode 100644
index 000000000..befc34a15
--- /dev/null
+++ b/HELP.md
@@ -0,0 +1,20 @@
+# Getting Started
+
+### Reference Documentation
+For further reference, please consider the following sections:
+
+* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html)
+* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/2.5.4/maven-plugin/reference/html/)
+* [Create an OCI image](https://docs.spring.io/spring-boot/docs/2.5.4/maven-plugin/reference/html/#build-image)
+* [Spring Web](https://docs.spring.io/spring-boot/docs/2.5.4/reference/htmlsingle/#boot-features-developing-web-applications)
+* [Spring Data JPA](https://docs.spring.io/spring-boot/docs/2.5.4/reference/htmlsingle/#boot-features-jpa-and-spring-data)
+* [Spring Boot DevTools](https://docs.spring.io/spring-boot/docs/2.5.4/reference/htmlsingle/#using-boot-devtools)
+
+### Guides
+The following guides illustrate how to use some features concretely:
+
+* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/)
+* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/)
+* [Building REST services with Spring](https://spring.io/guides/tutorials/bookmarks/)
+* [Accessing Data with JPA](https://spring.io/guides/gs/accessing-data-jpa/)
+
diff --git a/demo.iml b/demo.iml
new file mode 100644
index 000000000..50784e268
--- /dev/null
+++ b/demo.iml
@@ -0,0 +1,144 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/mvnw b/mvnw
new file mode 100755
index 000000000..a16b5431b
--- /dev/null
+++ b/mvnw
@@ -0,0 +1,310 @@
+#!/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 /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="`which 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/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ else
+ jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.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"
+ else
+ wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$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 \
+ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+ "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+ ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/mvnw.cmd b/mvnw.cmd
new file mode 100644
index 000000000..c8d43372c
--- /dev/null
+++ b/mvnw.cmd
@@ -0,0 +1,182 @@
+@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 "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
+if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\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/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+
+FOR /F "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%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.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 "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
+if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\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%
+
+exit /B %ERROR_CODE%
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 000000000..c09e9eb19
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,33 @@
+{
+ "requires": true,
+ "lockfileVersion": 1,
+ "dependencies": {
+ "js-tokens": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
+ },
+ "loose-envify": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
+ "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
+ "requires": {
+ "js-tokens": "^3.0.0 || ^4.0.0"
+ }
+ },
+ "object-assign": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
+ },
+ "react": {
+ "version": "17.0.2",
+ "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz",
+ "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==",
+ "requires": {
+ "loose-envify": "^1.1.0",
+ "object-assign": "^4.1.1"
+ }
+ }
+ }
+}
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 000000000..1702b33ee
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,95 @@
+
+
+ 4.0.0
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.5.4
+
+
+ com.example
+ demo
+ 0.0.1-SNAPSHOT
+ demo
+ Demo project for Spring Boot
+
+ 1.8
+
+
+
+ org.springframework.boot
+ spring-boot-starter-data-jpa
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ com.datastax.oss
+ java-driver-core
+ 4.13.0
+
+
+ org.springframework.boot
+ spring-boot-starter-websocket
+
+
+ org.springframework.boot
+ spring-boot-devtools
+ runtime
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
+
+ io.jsonwebtoken
+ jjwt
+ 0.9.1
+
+
+
+ org.springframework.boot
+ spring-boot-starter-security
+
+
+
+
+ junit
+ junit
+ 4.13.2
+ test
+
+
+
+ org.mockito
+ mockito-core
+ 2.24.0
+
+
+ org.mockito
+ mockito-junit-jupiter
+ test
+
+
+
+ mysql
+ mysql-connector-java
+ runtime
+ 8.0.26
+
+
+
+ org.hibernate.javax.persistence
+ hibernate-jpa-2.1-api
+ 1.0.2.Final
+
+
+
+
+
diff --git a/src/main/java/com/example/demo/WebsocketApplication.java b/src/main/java/com/example/demo/WebsocketApplication.java
new file mode 100644
index 000000000..7f9d840d7
--- /dev/null
+++ b/src/main/java/com/example/demo/WebsocketApplication.java
@@ -0,0 +1,27 @@
+package com.example.demo;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.Bean;
+import org.springframework.web.servlet.config.annotation.CorsRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
+
+@SpringBootApplication
+public class WebsocketApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(WebsocketApplication.class, args);
+ }
+
+ @Bean
+ public WebMvcConfigurer corsConfigurer() {
+ return new WebMvcConfigurer() {
+ @Override
+ public void addCorsMappings(CorsRegistry registry) {
+ registry.addMapping("/**").allowedMethods("GET", "POST", "PUT", "DELETE").allowCredentials(true).allowedOriginPatterns("*").allowedHeaders("*");
+ }
+ };
+ }
+}
+
diff --git a/src/main/java/com/example/demo/config/ChannelConfig.java b/src/main/java/com/example/demo/config/ChannelConfig.java
new file mode 100644
index 000000000..8ca35e678
--- /dev/null
+++ b/src/main/java/com/example/demo/config/ChannelConfig.java
@@ -0,0 +1,21 @@
+package com.example.demo.config;
+
+import com.example.demo.models.Channel;
+import com.example.demo.service.ChannelService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+
+import javax.annotation.PostConstruct;
+
+@Configuration
+public class ChannelConfig {
+ @Autowired
+ private ChannelService service;
+
+ @PostConstruct
+ public void setup() {
+ service.createChannel(new Channel());
+ service.createChannel(new Channel());
+ service.createChannel(new Channel());
+ }
+}
diff --git a/src/main/java/com/example/demo/config/MessageConfig.java b/src/main/java/com/example/demo/config/MessageConfig.java
new file mode 100644
index 000000000..4f0899d94
--- /dev/null
+++ b/src/main/java/com/example/demo/config/MessageConfig.java
@@ -0,0 +1,4 @@
+package com.example.demo.config;
+
+public class MessageConfig {
+}
diff --git a/src/main/java/com/example/demo/config/ProfileConfig.java b/src/main/java/com/example/demo/config/ProfileConfig.java
new file mode 100644
index 000000000..1b8d5689b
--- /dev/null
+++ b/src/main/java/com/example/demo/config/ProfileConfig.java
@@ -0,0 +1,10 @@
+package com.example.demo.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
+import org.springframework.security.crypto.password.PasswordEncoder;
+
+@Configuration
+public class ProfileConfig {
+}
diff --git a/src/main/java/com/example/demo/config/WebSocketConfig.java b/src/main/java/com/example/demo/config/WebSocketConfig.java
new file mode 100644
index 000000000..aab2fbbd0
--- /dev/null
+++ b/src/main/java/com/example/demo/config/WebSocketConfig.java
@@ -0,0 +1,24 @@
+package com.example.demo.config;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.messaging.simp.config.MessageBrokerRegistry;
+import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;
+import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
+import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer;
+
+@Configuration
+@EnableWebSocketMessageBroker
+public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
+ @Override
+ public void registerStompEndpoints(StompEndpointRegistry stompEndpointRegistry) {
+ stompEndpointRegistry.addEndpoint("/chat")
+ .setAllowedOrigins("allowedOriginPatterns")
+ .withSockJS();
+ }
+
+ @Override
+ public void configureMessageBroker(MessageBrokerRegistry registry) {
+ registry.enableSimpleBroker("/topic/");
+ registry.setApplicationDestinationPrefixes("/app");
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/example/demo/controller/ChannelController.java b/src/main/java/com/example/demo/controller/ChannelController.java
new file mode 100644
index 000000000..38f35ff87
--- /dev/null
+++ b/src/main/java/com/example/demo/controller/ChannelController.java
@@ -0,0 +1,59 @@
+package com.example.demo.controller;
+
+import com.example.demo.models.Channel;
+import com.example.demo.service.ChannelService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@Controller
+@RequestMapping(value = "/channel-controller")
+public class ChannelController {
+ @Autowired
+ private ChannelService service;
+
+ @RequestMapping(method = RequestMethod.POST, value = "/create")
+ public ResponseEntity createChannel(@RequestBody Channel channel) {
+ return new ResponseEntity<>(service.createChannel(channel), HttpStatus.CREATED);
+ }
+
+ @RequestMapping(method = RequestMethod.GET, value = "/read/{id}")
+ public ResponseEntity readChannel(@PathVariable Long id) {
+ if(service.readChannel(id) != null){
+ return new ResponseEntity<>(service.readChannel(id), HttpStatus.OK);
+ }
+ return new ResponseEntity<>(service.readChannel(id),HttpStatus.NOT_FOUND);
+ }
+
+ @GetMapping("/exists/{name}")
+ public ResponseEntity existsByName(@PathVariable String name) {
+ return new ResponseEntity<>(service.existsByName(name), HttpStatus.OK);
+ }
+
+ @GetMapping("find/{name}")
+ public ResponseEntity findByName(@PathVariable String name) {
+ return new ResponseEntity<>(service.findByName(name), HttpStatus.OK);
+ }
+
+ @RequestMapping(method = RequestMethod.GET, value = "/readAll")
+ public ResponseEntity> readAllChannels() {
+ return new ResponseEntity<>(service.readAllChannels(), HttpStatus.OK);
+ }
+
+ @RequestMapping(method = RequestMethod.PUT, value = "/update/{id}")
+ public ResponseEntity update(@PathVariable Long id,@RequestBody Channel channel) {
+ if(service.readChannel(id) != null) {
+ return new ResponseEntity<>(service.update(id, channel), HttpStatus.OK);
+ }
+ return new ResponseEntity<>(service.createChannel(channel), HttpStatus.CREATED);
+ }
+
+ @RequestMapping(method = RequestMethod.DELETE, value = "/delete/{id}")
+ public ResponseEntity delete(@PathVariable Long id) {
+ return new ResponseEntity<>(service.delete(id), HttpStatus.NO_CONTENT);
+ }
+}
diff --git a/src/main/java/com/example/demo/controller/MessageController.java b/src/main/java/com/example/demo/controller/MessageController.java
new file mode 100644
index 000000000..9e11117af
--- /dev/null
+++ b/src/main/java/com/example/demo/controller/MessageController.java
@@ -0,0 +1,58 @@
+package com.example.demo.controller;
+
+import com.example.demo.models.Message;
+import com.example.demo.repository.MessageRepo;
+import com.example.demo.service.MessageService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@Controller
+@RequestMapping("/message")
+public class MessageController {
+
+ private MessageService messageService;
+
+ @Autowired
+ public MessageController(MessageService messageService) {
+ this.messageService = messageService;
+
+ }
+
+ @PostMapping(value = "/create")
+ public ResponseEntity create(@RequestBody Message message) {
+ return new ResponseEntity<>(messageService.create(message), HttpStatus.CREATED);
+ }
+
+ @GetMapping("/find/{channelName}")
+ public ResponseEntity> findByChannelName(@PathVariable String channelName) {
+ return new ResponseEntity<>(messageService.findByChannelName(channelName), HttpStatus.OK);
+ }
+
+ @GetMapping(value = "/read/{id}")
+ public ResponseEntity read(@PathVariable Long id ){
+ return new ResponseEntity<>(messageService.read(id), HttpStatus.OK);
+
+ }
+
+ @GetMapping(value = "/all")
+ public ResponseEntity> readAll(){
+ return new ResponseEntity<>(messageService.readAll(), HttpStatus.OK);
+ }
+
+ @PutMapping(value = "/update{id}")
+ public ResponseEntity update (@PathVariable Long id, @RequestBody Message newMessageData){
+ return new ResponseEntity<>(messageService.update(id, newMessageData), HttpStatus.OK);
+ }
+
+ @DeleteMapping(value = "delete{id}")
+ public ResponseEntity delete(@PathVariable Long id ){
+ return new ResponseEntity<>(messageService.delete(id), HttpStatus.OK);
+ }
+
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/example/demo/controller/ProfileController.java b/src/main/java/com/example/demo/controller/ProfileController.java
new file mode 100644
index 000000000..fd70d6fcb
--- /dev/null
+++ b/src/main/java/com/example/demo/controller/ProfileController.java
@@ -0,0 +1,83 @@
+package com.example.demo.controller;
+
+import com.example.demo.models.Profile;
+import com.example.demo.security.JwtGenerator;
+import com.example.demo.security.LoginRequest;
+import com.example.demo.security.LoginResponse;
+import com.example.demo.service.ProfileService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.authentication.AuthenticationManager;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.context.SecurityContextHolder;
+import org.springframework.security.crypto.password.PasswordEncoder;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@RestController
+@RequestMapping(value = "/profile")
+public class ProfileController {
+
+ @Autowired
+ AuthenticationManager authenticationManager;
+
+ @Autowired
+ PasswordEncoder passwordEncoder;
+
+ @Autowired
+ JwtGenerator jwtGenerator;
+
+ @Autowired
+ ProfileService service;
+
+ @PostMapping(value = "/register")
+ public ResponseEntity> createProfile(@RequestBody Profile profile) {
+ if (service.existsByUsername(profile.getUsername())) {
+ return new ResponseEntity<>("Username is taken", HttpStatus.OK);
+ }
+ if (service.existsByEmail(profile.getEmail())) {
+ return new ResponseEntity<>("Email is taken", HttpStatus.OK);
+ }
+ profile.setPassword(passwordEncoder.encode(profile.getPassword()));
+ return new ResponseEntity<>(service.createProfile(profile), HttpStatus.CREATED);
+ }
+
+ @GetMapping(value = "/find/{id}")
+ public ResponseEntity findProfileById(@PathVariable Long id) {
+ return new ResponseEntity<>(service.findById(id), HttpStatus.OK);
+ }
+
+ @GetMapping(value = "/findAll")
+ public ResponseEntity> findAllProfiles() {
+ return new ResponseEntity<>(service.findAllProfiles(), HttpStatus.OK);
+ }
+
+ @PostMapping(value = "/login/{username}/{password}")
+ public ResponseEntity> login(@PathVariable String username, @PathVariable String password) {
+ Authentication authentication = authenticationManager
+ .authenticate(new UsernamePasswordAuthenticationToken(
+ username, password));
+
+ SecurityContextHolder.getContext().setAuthentication(authentication);
+ String token = jwtGenerator.generateToken(username);
+ Profile profile = service.findByUsername(username);
+ return new ResponseEntity<>(new LoginResponse(profile.getId(),
+ token, profile.getFirstName(), profile.getLastName(),
+ profile.getUsername(), profile.getEmail()
+ ), HttpStatus.OK);
+ }
+
+ @PutMapping(value = "/update")
+ public ResponseEntity updateProfile(@RequestBody Profile profile) {
+ return new ResponseEntity<>(service.update(profile), HttpStatus.OK);
+ }
+
+ @DeleteMapping(value = "/delete/{id}")
+ public ResponseEntity deleteById(@PathVariable Long id) {
+ service.deleteProfileById(id);
+ return new ResponseEntity<>("Your Profile Has Been Deleted", HttpStatus.OK);
+ }
+}
diff --git a/src/main/java/com/example/demo/controller/WebSocketController.java b/src/main/java/com/example/demo/controller/WebSocketController.java
new file mode 100644
index 000000000..580c7f177
--- /dev/null
+++ b/src/main/java/com/example/demo/controller/WebSocketController.java
@@ -0,0 +1,36 @@
+package com.example.demo.controller;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.messaging.Message;
+import org.springframework.messaging.handler.annotation.MessageMapping;
+import org.springframework.messaging.handler.annotation.Payload;
+import org.springframework.messaging.handler.annotation.SendTo;
+import org.springframework.messaging.simp.SimpMessagingTemplate;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
+@Controller
+public class WebSocketController {
+
+ @Autowired
+ SimpMessagingTemplate template;
+
+ @PostMapping("/send")
+ public ResponseEntity sendMessage(@RequestBody Message message) {
+ template.convertAndSend("/topic/message", message);
+ return new ResponseEntity<>(HttpStatus.OK);
+ }
+ @MessageMapping("/sendMessage")
+ public void receiveMessage(@Payload Message message) {
+ // receive message from client
+ }
+
+
+ @SendTo("/topic/message")
+ public Message broadcastMessage(@Payload Message message) {
+ return message;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/example/demo/models/Channel.java b/src/main/java/com/example/demo/models/Channel.java
new file mode 100644
index 000000000..4aa6127af
--- /dev/null
+++ b/src/main/java/com/example/demo/models/Channel.java
@@ -0,0 +1,86 @@
+package com.example.demo.models;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
+import javax.persistence.*;
+import java.util.List;
+
+
+@Entity
+public class Channel {
+// Comment yo
+ @Id
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ private Long id;
+ private String name;
+ @Enumerated(value = EnumType.STRING)
+ private ChannelType type;
+// @ManyToMany(mappedBy = "channels", fetch = FetchType.LAZY)
+// private List profileList;
+// @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
+// private List messages;
+
+ public Channel() {
+ }
+
+// public Channel(Long id, String name, ChannelType type, List profileList, List messages) {
+// this.id = id;
+// this.name = name;
+// this.type = type;
+// this.profileList = profileList;
+// this.messages = messages;
+// }
+
+
+ public Channel(Long id, String name, ChannelType type) {
+ this.id = id;
+ this.name = name;
+ this.type = type;
+ }
+
+ public Channel(String name, ChannelType type) {
+ this.name = name;
+ this.type = type;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+// public List getProfileList() {
+// return profileList;
+// }
+//
+// public void setProfileList(List profileList) {
+// this.profileList = profileList;
+// }
+//
+// public List getMessages() {
+// return messages;
+// }
+//
+// public void setMessages(List messages) {
+// this.messages = messages;
+// }
+
+ public ChannelType getType() {
+ return type;
+ }
+
+ public void setType(ChannelType type) {
+ this.type = type;
+ }
+}
diff --git a/src/main/java/com/example/demo/models/ChannelType.java b/src/main/java/com/example/demo/models/ChannelType.java
new file mode 100644
index 000000000..f0d76de03
--- /dev/null
+++ b/src/main/java/com/example/demo/models/ChannelType.java
@@ -0,0 +1,6 @@
+package com.example.demo.models;
+
+public enum ChannelType {
+ DM,
+ CHANNEL;
+}
diff --git a/src/main/java/com/example/demo/models/Message.java b/src/main/java/com/example/demo/models/Message.java
new file mode 100644
index 000000000..ba79c5c92
--- /dev/null
+++ b/src/main/java/com/example/demo/models/Message.java
@@ -0,0 +1,108 @@
+package com.example.demo.models;
+
+import com.fasterxml.jackson.annotation.JsonBackReference;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import org.apache.catalina.User;
+
+import javax.persistence.*;
+import java.util.Date;
+
+@Entity
+public class Message {
+
+ @Id
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ Long id;
+// @ManyToOne(fetch = FetchType.LAZY)
+// @JoinColumn(name = "profile_id", referencedColumnName = "id")
+// Profile profile;
+
+ String profileSentFrom;
+ String body;
+ String timestamp = new Date().toString();
+ String channelName;
+// @ManyToOne(fetch = FetchType.LAZY)
+// @JoinColumn(name = "channel_id", referencedColumnName = "id")
+// Channel channel;
+
+
+ public Message(Long id, String body, String timestamp) {
+ this.id = id;
+ this.body = body;
+ this.timestamp = timestamp;
+ }
+
+ public Message(Long id, String profileSentFrom, String body, String timestamp, String channelName) {
+ this.id = id;
+ this.profileSentFrom = profileSentFrom;
+ this.body = body;
+ this.timestamp = timestamp;
+ this.channelName = channelName;
+ }
+
+ public Message() {
+ }
+
+// public Message(Long id, Profile profile, String body, String timestamp, Channel channel) {
+// this.id = id;
+// this.profile = profile;
+// this.body = body;
+// this.timestamp = timestamp;
+// this.channel = channel;
+// }
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getBody() {
+ return body;
+ }
+
+ public void setBody(String body) {
+ this.body = body;
+ }
+
+ public String getTimestamp() {
+ return timestamp;
+ }
+
+ public void setTimestamp(String timestamp) {
+ this.timestamp = timestamp;
+ }
+
+// public Profile getProfile() {
+// return profile;
+// }
+//
+// public void setProfile(Profile profile) {
+// this.profile = profile;
+// }
+//
+// public Channel getChannel() {
+// return channel;
+// }
+//
+// public void setChannel(Channel channel) {
+// this.channel = channel;
+// }
+ public String getProfileSentFrom() {
+ return profileSentFrom;
+ }
+
+ public void setProfileSentFrom(String profileSentFrom) {
+ this.profileSentFrom = profileSentFrom;
+ }
+
+ public String getChannelName() {
+ return channelName;
+ }
+
+ public void setChannelName(String channelName) {
+ this.channelName = channelName;
+ }
+}
diff --git a/src/main/java/com/example/demo/models/Profile.java b/src/main/java/com/example/demo/models/Profile.java
new file mode 100644
index 000000000..4f62eeb9b
--- /dev/null
+++ b/src/main/java/com/example/demo/models/Profile.java
@@ -0,0 +1,179 @@
+package com.example.demo.models;
+
+import com.fasterxml.jackson.annotation.JsonBackReference;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonManagedReference;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.core.userdetails.UserDetails;
+
+import javax.persistence.*;
+import java.util.Collection;
+import java.util.List;
+
+@Entity
+public class Profile implements UserDetails {
+
+ @Id
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ private Long id;
+ private String token;
+ private String firstName;
+ private String lastName;
+ private String username;
+ private String password;
+ private String email;
+ private boolean enabled = true;
+// @ManyToMany(fetch = FetchType.LAZY)
+// @JoinTable(joinColumns = @JoinColumn(name = "profile_id"),
+// inverseJoinColumns = @JoinColumn(name = "channel_id"))
+// private List channels;
+// @OneToMany(mappedBy = "profile", cascade = CascadeType.ALL)
+// private List messages;
+
+ public Profile() {
+ }
+
+ public Profile(String username, String password) {
+ this.username = username;
+ this.password = password;
+ }
+
+ public Profile(Long id, String token, String firstName, String lastName, String username, String password, String email, boolean enabled) {
+ this.id = id;
+ this.token = token;
+ this.firstName = firstName;
+ this.lastName = lastName;
+ this.username = username;
+ this.password = password;
+ this.email = email;
+ this.enabled = enabled;
+ }
+ // public Profile(Long id, String token, String firstName, String lastName, String username, String password, String email, boolean enabled, List channels) {
+// this.id = id;
+// this.token = token;
+// this.firstName = firstName;
+// this.lastName = lastName;
+// this.username = username;
+// this.password = password;
+// this.email = email;
+// this.enabled = enabled;
+// this.channels = channels;
+// }
+//
+// public Profile(Long id, String token, String firstName, String lastName, String username, String password, String email, boolean enabled, List channels, List messages) {
+// this.id = id;
+// this.token = token;
+// this.firstName = firstName;
+// this.lastName = lastName;
+// this.username = username;
+// this.password = password;
+// this.email = email;
+// this.enabled = enabled;
+// this.channels = channels;
+// this.messages = messages;
+// }
+
+ @Override
+ public String getUsername() {
+ return username;
+ }
+
+ @Override
+ public boolean isAccountNonExpired() {
+ return enabled;
+ }
+
+ @Override
+ public boolean isAccountNonLocked() {
+ return enabled;
+ }
+
+ @Override
+ public boolean isCredentialsNonExpired() {
+ return enabled;
+ }
+
+ @Override
+ public boolean isEnabled() {
+ return enabled;
+ }
+
+ @Override
+ public Collection extends GrantedAuthority> getAuthorities() {
+ return null;
+ }
+
+ @Override
+ public String getPassword() {
+ return password;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+ public String getLastName() {
+ return lastName;
+ }
+
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ public void setEnabled(boolean enabled) {
+ this.enabled = enabled;
+ }
+
+// public List getChannels() {
+// return channels;
+// }
+//
+// public void setChannels(List channels) {
+// this.channels = channels;
+// }
+
+ public String getToken() {
+ return token;
+ }
+
+ public void setToken(String token) {
+ this.token = token;
+ }
+
+// public List getMessages() {
+// return messages;
+// }
+//
+// public void setMessages(List messages) {
+// this.messages = messages;
+// }
+}
diff --git a/src/main/java/com/example/demo/repository/ChannelRepo.java b/src/main/java/com/example/demo/repository/ChannelRepo.java
new file mode 100644
index 000000000..3c5acffce
--- /dev/null
+++ b/src/main/java/com/example/demo/repository/ChannelRepo.java
@@ -0,0 +1,15 @@
+package com.example.demo.repository;
+
+import com.example.demo.models.Channel;
+import com.example.demo.models.ChannelType;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+import java.util.List;
+
+public interface ChannelRepo extends JpaRepository {
+ List findByType(ChannelType type);
+
+ boolean existsByName(String name);
+
+ Channel findByName(String name);
+}
diff --git a/src/main/java/com/example/demo/repository/MessageRepo.java b/src/main/java/com/example/demo/repository/MessageRepo.java
new file mode 100644
index 000000000..724d3f027
--- /dev/null
+++ b/src/main/java/com/example/demo/repository/MessageRepo.java
@@ -0,0 +1,17 @@
+package com.example.demo.repository;
+
+import com.example.demo.models.Message;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface MessageRepo extends JpaRepository {
+
+
+ // Iterable getMessageByChannel_Id(Long id);
+
+ List findByChannelName(String channelName);
+
+}
diff --git a/src/main/java/com/example/demo/repository/ProfileRepo.java b/src/main/java/com/example/demo/repository/ProfileRepo.java
new file mode 100644
index 000000000..3ca7101a5
--- /dev/null
+++ b/src/main/java/com/example/demo/repository/ProfileRepo.java
@@ -0,0 +1,16 @@
+package com.example.demo.repository;
+
+import com.example.demo.models.Profile;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface ProfileRepo extends JpaRepository {
+// Profile findByUsernameAndPassword(String username, String password);
+
+ Profile findByUsername(String username);
+
+ boolean existsByUsername(String username);
+
+ boolean existsByEmail(String email);
+}
diff --git a/src/main/java/com/example/demo/security/JwtAuthenticationEntryPoint.java b/src/main/java/com/example/demo/security/JwtAuthenticationEntryPoint.java
new file mode 100644
index 000000000..b3cfd6105
--- /dev/null
+++ b/src/main/java/com/example/demo/security/JwtAuthenticationEntryPoint.java
@@ -0,0 +1,19 @@
+package com.example.demo.security;
+
+import org.springframework.security.core.AuthenticationException;
+import org.springframework.security.web.AuthenticationEntryPoint;
+import org.springframework.stereotype.Component;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+@Component
+public class JwtAuthenticationEntryPoint implements AuthenticationEntryPoint {
+
+ @Override
+ public void commence(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, AuthenticationException e) throws IOException, ServletException {
+ httpServletResponse.sendError(HttpServletResponse.SC_UNAUTHORIZED, e.getMessage());
+ }
+}
diff --git a/src/main/java/com/example/demo/security/JwtFilter.java b/src/main/java/com/example/demo/security/JwtFilter.java
new file mode 100644
index 000000000..0a812d70b
--- /dev/null
+++ b/src/main/java/com/example/demo/security/JwtFilter.java
@@ -0,0 +1,41 @@
+package com.example.demo.security;
+
+import com.example.demo.models.Profile;
+import com.example.demo.service.ProfileService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+import org.springframework.security.core.context.SecurityContextHolder;
+import org.springframework.security.web.authentication.WebAuthenticationDetails;
+import org.springframework.security.web.authentication.WebAuthenticationDetailsSource;
+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;
+
+public class JwtFilter extends OncePerRequestFilter {
+
+ @Autowired
+ private ProfileService service;
+
+ @Autowired
+ private JwtGenerator jwtGenerator;
+
+ @Override
+ protected void doFilterInternal(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, FilterChain filterChain) throws ServletException, IOException {
+ String token = jwtGenerator.getToken(httpServletRequest);
+ if (token != null) {
+ String username = jwtGenerator.getUsernameFromToken(token);
+ Profile profile = service.findByUsername(username);
+ if (jwtGenerator.validateToken(token)) {
+ UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(profile, null, null);
+ authentication.setDetails(new WebAuthenticationDetailsSource().buildDetails(httpServletRequest));
+
+ SecurityContextHolder.getContext().setAuthentication(authentication);
+ }
+ }
+ filterChain.doFilter(httpServletRequest, httpServletResponse);
+ }
+}
diff --git a/src/main/java/com/example/demo/security/JwtGenerator.java b/src/main/java/com/example/demo/security/JwtGenerator.java
new file mode 100644
index 000000000..c397dfba2
--- /dev/null
+++ b/src/main/java/com/example/demo/security/JwtGenerator.java
@@ -0,0 +1,66 @@
+package com.example.demo.security;
+
+import com.example.demo.models.Profile;
+import io.jsonwebtoken.Claims;
+import io.jsonwebtoken.Jwts;
+import io.jsonwebtoken.SignatureAlgorithm;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Date;
+
+@Component
+public class JwtGenerator {
+
+ @Value("${chatter-box.app.jwtSecret}")
+ private String secret;
+ @Value("${chatter-box.app.jwtExpirationMs}")
+ private int expiration;
+
+ private Claims getTokenBody(String token) {
+ return Jwts.parser()
+ .setSigningKey(secret)
+ .parseClaimsJws(token)
+ .getBody();
+ }
+
+ public String getUsernameFromToken(String token) {
+ return getTokenBody(token)
+ .getSubject();
+ }
+
+ public Date getExpirationDate(String token) {
+ return getTokenBody(token)
+ .getExpiration();
+ }
+
+ public String generateToken(String username) {
+ return Jwts.builder()
+ .setSubject(username)
+ .setIssuedAt(new Date())
+ .setExpiration(new Date(new Date().getTime() + expiration))
+ .signWith(SignatureAlgorithm.HS256, secret)
+ .compact();
+ }
+
+ public String getToken(HttpServletRequest request) {
+ String header = request.getHeader("Authorization");
+ if (header != null && header.startsWith("Bearer")) {
+ return header.substring(7);
+ }
+ return null;
+ }
+
+ public boolean validateToken(String token) {
+ if (token != null) {
+ try {
+ getTokenBody(token);
+ return true;
+ } catch(Exception e) {
+ System.out.println("Error: " + e);
+ }
+ }
+ return false;
+ }
+}
diff --git a/src/main/java/com/example/demo/security/LoginRequest.java b/src/main/java/com/example/demo/security/LoginRequest.java
new file mode 100644
index 000000000..b30c68be2
--- /dev/null
+++ b/src/main/java/com/example/demo/security/LoginRequest.java
@@ -0,0 +1,23 @@
+package com.example.demo.security;
+
+public class LoginRequest {
+
+ private String username;
+ private String password;
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+}
diff --git a/src/main/java/com/example/demo/security/LoginResponse.java b/src/main/java/com/example/demo/security/LoginResponse.java
new file mode 100644
index 000000000..10885d878
--- /dev/null
+++ b/src/main/java/com/example/demo/security/LoginResponse.java
@@ -0,0 +1,92 @@
+package com.example.demo.security;
+
+import com.example.demo.models.Channel;
+import com.example.demo.models.Message;
+
+import java.util.List;
+
+public class LoginResponse {
+
+ private Long id;
+ private String token;
+ private String firstName;
+ private String lastName;
+ private String username;
+ private String email;
+ private List channels;
+
+ public LoginResponse(Long id, String token, String firstName, String lastName, String username, String email, List channels) {
+ this.id = id;
+ this.token = token;
+ this.firstName = firstName;
+ this.lastName = lastName;
+ this.username = username;
+ this.email = email;
+ this.channels = channels;
+ }
+
+ public LoginResponse(Long id, String token, String firstName, String lastName, String username, String email) {
+ this.id = id;
+ this.token = token;
+ this.firstName = firstName;
+ this.lastName = lastName;
+ this.username = username;
+ this.email = email;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getToken() {
+ return token;
+ }
+
+ public void setToken(String token) {
+ this.token = token;
+ }
+
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+ public String getLastName() {
+ return lastName;
+ }
+
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ public List getChannels() {
+ return channels;
+ }
+
+ public void setChannels(List channels) {
+ this.channels = channels;
+ }
+}
diff --git a/src/main/java/com/example/demo/security/WebSecurityConfiguration.java b/src/main/java/com/example/demo/security/WebSecurityConfiguration.java
new file mode 100644
index 000000000..228e861b9
--- /dev/null
+++ b/src/main/java/com/example/demo/security/WebSecurityConfiguration.java
@@ -0,0 +1,63 @@
+package com.example.demo.security;
+
+import com.example.demo.service.ProfileService;
+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.crypto.bcrypt.BCryptPasswordEncoder;
+import org.springframework.security.crypto.password.PasswordEncoder;
+import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
+
+@Configuration
+@EnableWebSecurity
+public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {
+
+ @Autowired
+ private ProfileService service;
+
+ @Autowired
+ private JwtGenerator jwtGenerator;
+
+ @Autowired
+ private JwtAuthenticationEntryPoint entryPoint;
+
+ @Bean
+ public PasswordEncoder passwordEncoder() {
+ return new BCryptPasswordEncoder();
+ }
+
+ @Bean JwtFilter jwtFilter() {
+ return new JwtFilter();
+ }
+
+ @Bean
+ @Override
+ public AuthenticationManager authenticationManagerBean() throws Exception {
+ return super.authenticationManagerBean();
+ }
+
+ @Override
+ protected void configure(AuthenticationManagerBuilder auth) throws Exception {
+ auth.userDetailsService(service).passwordEncoder(passwordEncoder());
+ }
+
+ @Override
+ protected void configure(HttpSecurity http) throws Exception {
+ http
+ .addFilterBefore(jwtFilter(), UsernamePasswordAuthenticationFilter.class)
+ .cors().and().csrf().disable()
+ .exceptionHandling().authenticationEntryPoint(entryPoint)
+ .and()
+ .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)
+ .and()
+ .authorizeRequests().antMatchers("/profile/login/**", "/profile/register").permitAll()
+ .anyRequest().authenticated();
+ }
+}
diff --git a/src/main/java/com/example/demo/service/ChannelService.java b/src/main/java/com/example/demo/service/ChannelService.java
new file mode 100644
index 000000000..e7805e5bb
--- /dev/null
+++ b/src/main/java/com/example/demo/service/ChannelService.java
@@ -0,0 +1,90 @@
+package com.example.demo.service;
+
+import com.example.demo.models.Channel;
+import com.example.demo.models.ChannelType;
+import com.example.demo.models.Profile;
+import com.example.demo.repository.ChannelRepo;
+import com.example.demo.repository.ProfileRepo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@Service
+public class ChannelService {
+
+ private ChannelRepo channelRepo;
+ private ProfileRepo profileRepo;
+
+ @Autowired
+ public ChannelService(ChannelRepo channelRepo, ProfileRepo profileRepo) {
+ this.channelRepo = channelRepo;
+ this.profileRepo = profileRepo;
+ }
+
+ public Channel createChannel(Channel channel) {
+ return channelRepo.save(channel);
+ }
+
+ public Channel readChannel(Long id) {
+ return channelRepo.findById(id).get();
+ }
+
+ public List readAllChannels() {
+ Iterable channelIterable = channelRepo.findAll();
+ List result = new ArrayList<>();
+ channelIterable.forEach(result::add);
+ return result;
+ }
+
+ public List readAllChannelsByType(ChannelType type) {
+ return channelRepo.findByType(type);
+ }
+
+ public boolean existsByName(String name) {
+ return channelRepo.existsByName(name);
+ }
+
+ public Channel findByName(String name) {
+ return channelRepo.findByName(name);
+ }
+
+// public List findByProfileUsername(String username) {
+// List allChannels = readAllChannels();
+// return allChannels
+// .stream()
+// .filter(channel -> {
+// List profilesInChannel = channel.getProfileList();
+// for (Profile profile : profilesInChannel) {
+// if (profile.getUsername().equals(username)) {
+// return true;
+// }
+// }
+// return false;
+// })
+// .collect(Collectors.toList());
+//
+// }
+
+ public Channel update(Long id, Channel channel) {
+ Channel channelInDb = readChannel(id);
+ channelInDb.setId(channel.getId());
+ channelInDb = channelRepo.save(channelInDb);
+ return channelInDb;
+ }
+
+ public Channel delete(Long id) {
+ Channel channelInDb = readChannel(id);
+ channelRepo.delete(channelInDb);
+ return channelInDb;
+ }
+
+ public Boolean deleteAllChannels() {
+ readAllChannels().forEach(channel -> delete(channel.getId()));
+ return true;
+ }
+
+
+}
diff --git a/src/main/java/com/example/demo/service/MessageService.java b/src/main/java/com/example/demo/service/MessageService.java
new file mode 100644
index 000000000..4e50f6515
--- /dev/null
+++ b/src/main/java/com/example/demo/service/MessageService.java
@@ -0,0 +1,65 @@
+package com.example.demo.service;
+
+import com.example.demo.models.Message;
+import com.example.demo.repository.MessageRepo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.List;
+
+@Service
+public class MessageService {
+ private MessageRepo messageRepo;
+
+
+ @Autowired
+ public MessageService(MessageRepo messageRepo){
+ this.messageRepo = messageRepo;
+ }
+
+
+ public Message create (Message message){
+ message.setTimestamp(LocalDateTime.now().format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));
+ return messageRepo.save(message);
+ }
+
+ public List findByChannelName(String channelName) {
+ return messageRepo.findByChannelName(channelName);
+ }
+
+ public Message read(Long id){
+ return messageRepo.getById(id);
+ }
+
+ public List readAll(){
+ return messageRepo.findAll();
+ }
+
+ public Message update(Long id, Message newMessageData){
+ Message messageInDB = read(id);
+ messageInDB.setBody(newMessageData.getBody());
+
+ messageInDB.setProfileSentFrom(newMessageData.getProfileSentFrom());
+ messageInDB.setChannelName(newMessageData.getChannelName());
+
+ messageInDB.setTimestamp(newMessageData.getTimestamp());
+ messageRepo.save(messageInDB);
+ return messageInDB;
+ }
+
+ public Message delete(Long id){
+ Message messageInDB = read(id);
+ messageRepo.delete(messageInDB);
+ return messageInDB;
+ }
+
+ public void deleteAll(){
+ messageRepo.deleteAll();
+ }
+
+
+
+}
diff --git a/src/main/java/com/example/demo/service/ProfileService.java b/src/main/java/com/example/demo/service/ProfileService.java
new file mode 100644
index 000000000..50076f205
--- /dev/null
+++ b/src/main/java/com/example/demo/service/ProfileService.java
@@ -0,0 +1,74 @@
+package com.example.demo.service;
+
+import com.example.demo.models.Profile;
+import com.example.demo.repository.ProfileRepo;
+import org.springframework.beans.factory.annotation.Autowired;
+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.List;
+
+@Service
+public class ProfileService implements UserDetailsService {
+
+ @Autowired
+ private PasswordEncoder passwordEncoder;
+
+ @Autowired
+ private ProfileRepo repository;
+
+ public Profile createProfile(Profile profile) {
+// Profile profile = new Profile();
+// profile.setFirstName(profileData.getFirstName());
+// profile.setLastName(profileData.getLastName());
+// profile.setUsername(profileData.getUsername());
+// profile.setPassword(passwordEncoder.encode(profileData.getPassword()));
+// profile.setEnabled(true);
+// profile.setEmail(profileData.getEmail());
+ return repository.save(profile);
+ }
+
+ public Profile findById(Long id) {
+ return repository.findById(id).get();
+ }
+
+ @Override
+ public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
+ Profile profile = repository.findByUsername(username);
+ if (profile == null) {
+ throw new UsernameNotFoundException("Profile with username " + username + " not found");
+ }
+ return profile;
+ }
+
+ public Profile findByUsername(String username) {
+ Profile profile = repository.findByUsername(username);
+ if (profile == null) {
+ throw new UsernameNotFoundException("Profile with username " + username + " not found");
+ }
+ return profile;
+ }
+
+ public boolean existsByUsername(String username) {
+ return repository.existsByUsername(username);
+ }
+
+ public boolean existsByEmail(String email) {
+ return repository.existsByEmail(email);
+ }
+
+ public List findAllProfiles() {
+ return repository.findAll();
+ }
+
+ public Profile update(Profile profileData) {
+ return repository.save(profileData);
+ }
+
+ public void deleteProfileById(Long id) {
+ repository.deleteById(id);
+ }
+}
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
new file mode 100644
index 000000000..50b564dcf
--- /dev/null
+++ b/src/main/resources/application.properties
@@ -0,0 +1,8 @@
+spring.datasource.url=jdbc:mysql://localhost:3306/chatter_box
+spring.datasource.username=root
+spring.datasource.password=zipcode0
+spring.jpa.hibernate.ddl-auto=create
+spring.jpa.show-sql=true
+spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
+chatter-box.app.jwtSecret=someSecretKey
+chatter-box.app.jwtExpirationMs=36000000
diff --git a/src/test/java/com/example/demo/DemoApplicationTests.java b/src/test/java/com/example/demo/DemoApplicationTests.java
new file mode 100644
index 000000000..2778a6a7e
--- /dev/null
+++ b/src/test/java/com/example/demo/DemoApplicationTests.java
@@ -0,0 +1,13 @@
+package com.example.demo;
+
+import org.junit.jupiter.api.Test;
+import org.springframework.boot.test.context.SpringBootTest;
+
+@SpringBootTest
+class DemoApplicationTests {
+
+ @Test
+ void contextLoads() {
+ }
+
+}
diff --git a/src/test/java/com/example/demo/config/TestChannelConfig.java b/src/test/java/com/example/demo/config/TestChannelConfig.java
new file mode 100644
index 000000000..2fe53f97c
--- /dev/null
+++ b/src/test/java/com/example/demo/config/TestChannelConfig.java
@@ -0,0 +1,4 @@
+package com.example.demo.config;
+
+public class TestChannelConfig {
+}
diff --git a/src/test/java/com/example/demo/config/TestMessageConfig.java b/src/test/java/com/example/demo/config/TestMessageConfig.java
new file mode 100644
index 000000000..8bf17e1b0
--- /dev/null
+++ b/src/test/java/com/example/demo/config/TestMessageConfig.java
@@ -0,0 +1,4 @@
+package com.example.demo.config;
+
+public class TestMessageConfig {
+}
diff --git a/src/test/java/com/example/demo/config/TestProfileConfig.java b/src/test/java/com/example/demo/config/TestProfileConfig.java
new file mode 100644
index 000000000..f8499d7c7
--- /dev/null
+++ b/src/test/java/com/example/demo/config/TestProfileConfig.java
@@ -0,0 +1,4 @@
+package com.example.demo.config;
+
+public class TestProfileConfig {
+}
diff --git a/src/test/java/com/example/demo/controllers/TestChannelController.java b/src/test/java/com/example/demo/controllers/TestChannelController.java
new file mode 100644
index 000000000..ffc14aefa
--- /dev/null
+++ b/src/test/java/com/example/demo/controllers/TestChannelController.java
@@ -0,0 +1,4 @@
+package com.example.demo.controllers;
+
+public class TestChannelController {
+}
diff --git a/src/test/java/com/example/demo/controllers/TestMessageController.java b/src/test/java/com/example/demo/controllers/TestMessageController.java
new file mode 100644
index 000000000..ede1eb280
--- /dev/null
+++ b/src/test/java/com/example/demo/controllers/TestMessageController.java
@@ -0,0 +1,4 @@
+package com.example.demo.controllers;
+
+public class TestMessageController {
+}
diff --git a/src/test/java/com/example/demo/controllers/TestProfileController.java b/src/test/java/com/example/demo/controllers/TestProfileController.java
new file mode 100644
index 000000000..2af11d731
--- /dev/null
+++ b/src/test/java/com/example/demo/controllers/TestProfileController.java
@@ -0,0 +1,55 @@
+package com.example.demo.controllers;
+
+import com.example.demo.controller.ProfileController;
+import com.example.demo.models.Profile;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.mockito.Mockito;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
+import org.springframework.boot.test.mock.mockito.MockBean;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.test.context.junit.jupiter.SpringExtension;
+import org.springframework.test.web.servlet.MockMvc;
+
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
+
+@ExtendWith(SpringExtension.class)
+@WebMvcTest(controllers = ProfileController.class)
+public class TestProfileController {
+
+ @Autowired
+ private MockMvc mockMvc;
+
+ @Autowired
+ private ObjectMapper objectMapper;
+
+ @MockBean
+ private ProfileController controller;
+
+ @Before
+ public void setUp() throws Exception {
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
+ objectMapper = mapper;
+ }
+
+ private Profile profile = new Profile(2L, "", "Ben", "Smith", "Ben123", "secretpassword", "ben@gmail.com", true);
+ private Profile profile1 = new Profile("Ben123", "secretpassword");
+
+// @Test
+// public void registerTest() throws Exception {
+// Mockito.when(controller.createProfile(Mockito.any(Profile.class))).thenReturn(ResponseEntity.class);
+//
+// mockMvc.perform(post("/profile/register")
+// .contentType("application/json")
+// .content(objectMapper.writeValueAsString(profile)))
+// .andExpect(status().isOk());
+// }
+}
diff --git a/src/test/java/com/example/demo/models/TestChannel.java b/src/test/java/com/example/demo/models/TestChannel.java
new file mode 100644
index 000000000..43300ee9b
--- /dev/null
+++ b/src/test/java/com/example/demo/models/TestChannel.java
@@ -0,0 +1,5 @@
+package com.example.demo.models;
+
+public class TestChannel {
+
+}
diff --git a/src/test/java/com/example/demo/models/TestMessage.java b/src/test/java/com/example/demo/models/TestMessage.java
new file mode 100644
index 000000000..c04aa263d
--- /dev/null
+++ b/src/test/java/com/example/demo/models/TestMessage.java
@@ -0,0 +1,4 @@
+package com.example.demo.models;
+
+public class TestMessage {
+}
diff --git a/src/test/java/com/example/demo/models/TestProfile.java b/src/test/java/com/example/demo/models/TestProfile.java
new file mode 100644
index 000000000..7a9b119ac
--- /dev/null
+++ b/src/test/java/com/example/demo/models/TestProfile.java
@@ -0,0 +1,74 @@
+package com.example.demo.models;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+public class TestProfile {
+
+ @Test
+ public void nullableConstructorTest() {
+ // Given
+ Profile profile = new Profile();
+
+ // Then
+ Assert.assertNull(profile.getId()); Assert.assertNull(profile.getFirstName());
+ Assert.assertNull(profile.getLastName()); Assert.assertNull(profile.getUsername());
+ Assert.assertNull(profile.getPassword()); Assert.assertNull(profile.getEmail());
+// Assert.assertNull(profile.getChannels());
+ }
+
+ @Test
+ public void constructorTest() {
+ // Given
+ Long expectedId = 1L;
+ String expectedFirstName = "Ben";
+ String expectedLastName = "Smith";
+ String expectedUsername = "Batman";
+ String expectedPassword = "Secret";
+ String expectedEmail = "bens@gmail.com";
+ List expectedChannels = Stream.of(new Channel(), new Channel(), new Channel(), new Channel()).collect(Collectors.toList());
+ List expectedMessages = Stream.of(new Message(), new Message(), new Message(), new Message()).collect(Collectors.toList());
+
+ // When
+ Profile profile = new Profile(expectedId, "", expectedFirstName, expectedLastName, expectedUsername, expectedPassword, expectedEmail, true);
+
+ // Then
+ Assert.assertEquals(expectedId, profile.getId()); Assert.assertEquals(expectedFirstName, profile.getFirstName());
+ Assert.assertEquals(expectedLastName, profile.getLastName()); Assert.assertEquals(expectedUsername, profile.getUsername());
+ Assert.assertEquals(expectedPassword, profile.getPassword()); Assert.assertEquals(expectedEmail, profile.getEmail());
+// Assert.assertEquals(expectedChannels, profile.getChannels());
+ }
+
+ @Test
+ public void settersTest() {
+ // Given
+ Long expectedId = 1L;
+ String expectedFirstName = "Ben";
+ String expectedLastName = "Smith";
+ String expectedUsername = "Batman";
+ String expectedPassword = "Secret";
+ String expectedEmail = "bens@gmail.com";
+ List expectedChannels = Stream.of(new Channel(), new Channel(), new Channel(), new Channel()).collect(Collectors.toList());
+ List expectedMessages = Stream.of(new Message(), new Message(), new Message(), new Message()).collect(Collectors.toList());
+ Profile profile = new Profile();
+
+ // When
+ profile.setId(expectedId);
+ profile.setFirstName(expectedFirstName);
+ profile.setLastName(expectedLastName);
+ profile.setUsername(expectedUsername);
+ profile.setPassword(expectedPassword);
+ profile.setEmail(expectedEmail);
+// profile.setChannels(expectedChannels);
+
+ // Then
+ Assert.assertEquals(expectedId, profile.getId()); Assert.assertEquals(expectedFirstName, profile.getFirstName());
+ Assert.assertEquals(expectedLastName, profile.getLastName()); Assert.assertEquals(expectedUsername, profile.getUsername());
+ Assert.assertEquals(expectedPassword, profile.getPassword()); Assert.assertEquals(expectedEmail, profile.getEmail());
+// Assert.assertEquals(expectedChannels, profile.getChannels());
+ }
+}
diff --git a/src/test/java/com/example/demo/repositories/TestChannelRepo.java b/src/test/java/com/example/demo/repositories/TestChannelRepo.java
new file mode 100644
index 000000000..e90bb50af
--- /dev/null
+++ b/src/test/java/com/example/demo/repositories/TestChannelRepo.java
@@ -0,0 +1,4 @@
+package com.example.demo.repositories;
+
+public class TestChannelRepo {
+}
diff --git a/src/test/java/com/example/demo/repositories/TestMessageRepo.java b/src/test/java/com/example/demo/repositories/TestMessageRepo.java
new file mode 100644
index 000000000..5f6a204a3
--- /dev/null
+++ b/src/test/java/com/example/demo/repositories/TestMessageRepo.java
@@ -0,0 +1,4 @@
+package com.example.demo.repositories;
+
+public class TestMessageRepo {
+}
diff --git a/src/test/java/com/example/demo/repositories/TestProfileRepo.java b/src/test/java/com/example/demo/repositories/TestProfileRepo.java
new file mode 100644
index 000000000..dd4fd2ec2
--- /dev/null
+++ b/src/test/java/com/example/demo/repositories/TestProfileRepo.java
@@ -0,0 +1,4 @@
+package com.example.demo.repositories;
+
+public class TestProfileRepo {
+}
diff --git a/src/test/java/com/example/demo/services/TestChannelService.java b/src/test/java/com/example/demo/services/TestChannelService.java
new file mode 100644
index 000000000..07d8cae8b
--- /dev/null
+++ b/src/test/java/com/example/demo/services/TestChannelService.java
@@ -0,0 +1,4 @@
+package com.example.demo.services;
+
+public class TestChannelService {
+}
diff --git a/src/test/java/com/example/demo/services/TestMessageService.java b/src/test/java/com/example/demo/services/TestMessageService.java
new file mode 100644
index 000000000..10995a0f4
--- /dev/null
+++ b/src/test/java/com/example/demo/services/TestMessageService.java
@@ -0,0 +1,4 @@
+package com.example.demo.services;
+
+public class TestMessageService {
+}
diff --git a/src/test/java/com/example/demo/services/TestProfileService.java b/src/test/java/com/example/demo/services/TestProfileService.java
new file mode 100644
index 000000000..bafbcd09d
--- /dev/null
+++ b/src/test/java/com/example/demo/services/TestProfileService.java
@@ -0,0 +1,140 @@
+package com.example.demo.services;
+
+import com.example.demo.models.Profile;
+import com.example.demo.repository.ProfileRepo;
+import com.example.demo.service.ProfileService;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.junit.MockitoJUnitRunner;
+import org.springframework.boot.test.mock.mockito.MockBean;
+import org.springframework.context.annotation.Bean;
+import org.springframework.security.core.parameters.P;
+import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
+import org.springframework.security.crypto.password.PasswordEncoder;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+
+@RunWith(MockitoJUnitRunner.class)
+public class TestProfileService {
+
+ @Mock
+ ProfileRepo repository;
+
+ @InjectMocks
+ ProfileService service;
+
+ @Mock
+ PasswordEncoder passwordEncoder;
+
+ @Test
+ public void createProfileTest() {
+ Profile expectedProfile = new Profile();
+
+ service.createProfile(expectedProfile);
+ service.createProfile(expectedProfile);
+
+ Mockito.verify(repository, Mockito.times(2)).save(Mockito.any(Profile.class));
+ }
+
+ @Test
+ public void findByIdTest() {
+ Long id = 5L;
+ Profile expectedProfile = new Profile();
+ expectedProfile.setId(id);
+
+ Mockito.when(repository.findById(id)).thenReturn(Optional.of(expectedProfile));
+ Profile actualProfile = service.findById(id);
+
+ Assert.assertEquals(expectedProfile.getId(), actualProfile.getId());
+ }
+
+ @Test
+ public void findAllProfilesTest() {
+ List expectedProfiles = new ArrayList<>();
+ expectedProfiles.add(new Profile()); expectedProfiles.add(new Profile()); expectedProfiles.add(new Profile()); expectedProfiles.add(new Profile());
+
+ Mockito.when(repository.findAll()).thenReturn(expectedProfiles);
+ List actualProfiles = service.findAllProfiles();
+
+ Assert.assertEquals(expectedProfiles, actualProfiles);
+ }
+
+ @Test
+ public void updateTest() {
+ Profile expectedProfile = new Profile();
+ expectedProfile.setUsername("test username");
+ expectedProfile.setPassword("test password");
+
+ Mockito.when(repository.save(expectedProfile)).thenReturn(expectedProfile);
+ Profile actualProfile = service.update(expectedProfile);
+
+ Assert.assertEquals(expectedProfile.getFirstName(), actualProfile.getFirstName());
+ }
+
+ @Test
+ public void deleteByIdTest() {
+ Profile profile = new Profile();
+ Long id = 4L;
+ profile.setId(id);
+
+ service.deleteProfileById(id);
+ service.deleteProfileById(id);
+
+ Mockito.verify(repository, Mockito.times(2)).deleteById(id);
+ }
+
+ @Test
+ public void existsByUsernameTest() {
+ Profile profile = new Profile();
+ String username = "Ben";
+ profile.setUsername(username);
+
+ Mockito.when(repository.existsByUsername(username)).thenReturn(true);
+ boolean existsByUsername = service.existsByUsername(username);
+
+ Assert.assertTrue(existsByUsername);
+ }
+
+ @Test
+ public void existsByEmailTest() {
+ Profile profile = new Profile();
+ String email = "Ben@gmail.com";
+ profile.setEmail(email);
+
+ Mockito.when(repository.existsByEmail(email)).thenReturn(true);
+ boolean existsByEmail = service.existsByEmail(email);
+
+ Assert.assertTrue(existsByEmail);
+ }
+
+ @Test
+ public void findByUsernameTest() {
+ Profile expectedProfile = new Profile();
+ String username = "Ben";
+ expectedProfile.setUsername(username);
+
+ Mockito.when(repository.findByUsername(username)).thenReturn(expectedProfile);
+ Profile actualProfile = service.findByUsername(username);
+
+ Assert.assertEquals(expectedProfile, actualProfile);
+ }
+
+ @Test
+ public void loadByUsernameTest() {
+ Profile expectedProfile = new Profile();
+ String username = "Ben";
+ expectedProfile.setUsername(username);
+
+ Mockito.when(repository.findByUsername(username)).thenReturn(expectedProfile);
+ Profile actualProfile = (Profile) service.loadUserByUsername(username);
+
+ Assert.assertEquals(expectedProfile, actualProfile);
+ }
+}
diff --git a/target/classes/application.properties b/target/classes/application.properties
new file mode 100644
index 000000000..0c3e2ca8b
--- /dev/null
+++ b/target/classes/application.properties
@@ -0,0 +1,8 @@
+spring.datasource.url=jdbc:mysql://localhost:3306/chatter_box
+spring.datasource.username=root
+spring.datasource.password=zipcode0
+spring.jpa.hibernate.ddl-auto=update
+spring.jpa.show-sql=true
+spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
+chatter-box.app.jwtSecret=someSecretKey
+chatter-box.app.jwtExpirationMs=36000000
diff --git a/target/classes/com/example/demo/WebsocketApplication$1.class b/target/classes/com/example/demo/WebsocketApplication$1.class
new file mode 100644
index 000000000..b450d1d58
Binary files /dev/null and b/target/classes/com/example/demo/WebsocketApplication$1.class differ
diff --git a/target/classes/com/example/demo/WebsocketApplication.class b/target/classes/com/example/demo/WebsocketApplication.class
new file mode 100644
index 000000000..463f80fd0
Binary files /dev/null and b/target/classes/com/example/demo/WebsocketApplication.class differ
diff --git a/target/classes/com/example/demo/config/ChannelConfig.class b/target/classes/com/example/demo/config/ChannelConfig.class
new file mode 100644
index 000000000..c8ac03217
Binary files /dev/null and b/target/classes/com/example/demo/config/ChannelConfig.class differ
diff --git a/target/classes/com/example/demo/config/MessageConfig.class b/target/classes/com/example/demo/config/MessageConfig.class
new file mode 100644
index 000000000..de19b497b
Binary files /dev/null and b/target/classes/com/example/demo/config/MessageConfig.class differ
diff --git a/target/classes/com/example/demo/config/ProfileConfig.class b/target/classes/com/example/demo/config/ProfileConfig.class
new file mode 100644
index 000000000..bb215688e
Binary files /dev/null and b/target/classes/com/example/demo/config/ProfileConfig.class differ
diff --git a/target/classes/com/example/demo/config/WebSocketConfig.class b/target/classes/com/example/demo/config/WebSocketConfig.class
new file mode 100644
index 000000000..6ed97ef9b
Binary files /dev/null and b/target/classes/com/example/demo/config/WebSocketConfig.class differ
diff --git a/target/classes/com/example/demo/controller/ChannelController.class b/target/classes/com/example/demo/controller/ChannelController.class
new file mode 100644
index 000000000..a0573b504
Binary files /dev/null and b/target/classes/com/example/demo/controller/ChannelController.class differ
diff --git a/target/classes/com/example/demo/controller/MessageController.class b/target/classes/com/example/demo/controller/MessageController.class
new file mode 100644
index 000000000..ca43b96d8
Binary files /dev/null and b/target/classes/com/example/demo/controller/MessageController.class differ
diff --git a/target/classes/com/example/demo/controller/ProfileController.class b/target/classes/com/example/demo/controller/ProfileController.class
new file mode 100644
index 000000000..fe9ea9199
Binary files /dev/null and b/target/classes/com/example/demo/controller/ProfileController.class differ
diff --git a/target/classes/com/example/demo/controller/WebSocketController.class b/target/classes/com/example/demo/controller/WebSocketController.class
new file mode 100644
index 000000000..71d507a16
Binary files /dev/null and b/target/classes/com/example/demo/controller/WebSocketController.class differ
diff --git a/target/classes/com/example/demo/models/Channel.class b/target/classes/com/example/demo/models/Channel.class
new file mode 100644
index 000000000..68b7ff4ee
Binary files /dev/null and b/target/classes/com/example/demo/models/Channel.class differ
diff --git a/target/classes/com/example/demo/models/ChannelType.class b/target/classes/com/example/demo/models/ChannelType.class
new file mode 100644
index 000000000..015a40d74
Binary files /dev/null and b/target/classes/com/example/demo/models/ChannelType.class differ
diff --git a/target/classes/com/example/demo/models/Message.class b/target/classes/com/example/demo/models/Message.class
new file mode 100644
index 000000000..12ae9606d
Binary files /dev/null and b/target/classes/com/example/demo/models/Message.class differ
diff --git a/target/classes/com/example/demo/models/Profile.class b/target/classes/com/example/demo/models/Profile.class
new file mode 100644
index 000000000..7bb52ad81
Binary files /dev/null and b/target/classes/com/example/demo/models/Profile.class differ
diff --git a/target/classes/com/example/demo/repository/ChannelRepo.class b/target/classes/com/example/demo/repository/ChannelRepo.class
new file mode 100644
index 000000000..f0e82fb91
Binary files /dev/null and b/target/classes/com/example/demo/repository/ChannelRepo.class differ
diff --git a/target/classes/com/example/demo/repository/MessageRepo.class b/target/classes/com/example/demo/repository/MessageRepo.class
new file mode 100644
index 000000000..aa8a258cb
Binary files /dev/null and b/target/classes/com/example/demo/repository/MessageRepo.class differ
diff --git a/target/classes/com/example/demo/repository/ProfileRepo.class b/target/classes/com/example/demo/repository/ProfileRepo.class
new file mode 100644
index 000000000..4a994ea8a
Binary files /dev/null and b/target/classes/com/example/demo/repository/ProfileRepo.class differ
diff --git a/target/classes/com/example/demo/security/JwtAuthenticationEntryPoint.class b/target/classes/com/example/demo/security/JwtAuthenticationEntryPoint.class
new file mode 100644
index 000000000..0099235e3
Binary files /dev/null and b/target/classes/com/example/demo/security/JwtAuthenticationEntryPoint.class differ
diff --git a/target/classes/com/example/demo/security/JwtFilter.class b/target/classes/com/example/demo/security/JwtFilter.class
new file mode 100644
index 000000000..52c4f5f08
Binary files /dev/null and b/target/classes/com/example/demo/security/JwtFilter.class differ
diff --git a/target/classes/com/example/demo/security/JwtGenerator.class b/target/classes/com/example/demo/security/JwtGenerator.class
new file mode 100644
index 000000000..063daf804
Binary files /dev/null and b/target/classes/com/example/demo/security/JwtGenerator.class differ
diff --git a/target/classes/com/example/demo/security/LoginRequest.class b/target/classes/com/example/demo/security/LoginRequest.class
new file mode 100644
index 000000000..0d7aecc46
Binary files /dev/null and b/target/classes/com/example/demo/security/LoginRequest.class differ
diff --git a/target/classes/com/example/demo/security/LoginResponse.class b/target/classes/com/example/demo/security/LoginResponse.class
new file mode 100644
index 000000000..b584809ce
Binary files /dev/null and b/target/classes/com/example/demo/security/LoginResponse.class differ
diff --git a/target/classes/com/example/demo/security/WebSecurityConfiguration.class b/target/classes/com/example/demo/security/WebSecurityConfiguration.class
new file mode 100644
index 000000000..f8dffa446
Binary files /dev/null and b/target/classes/com/example/demo/security/WebSecurityConfiguration.class differ
diff --git a/target/classes/com/example/demo/service/ChannelService.class b/target/classes/com/example/demo/service/ChannelService.class
new file mode 100644
index 000000000..1ef2b9e34
Binary files /dev/null and b/target/classes/com/example/demo/service/ChannelService.class differ
diff --git a/target/classes/com/example/demo/service/MessageService.class b/target/classes/com/example/demo/service/MessageService.class
new file mode 100644
index 000000000..24797b584
Binary files /dev/null and b/target/classes/com/example/demo/service/MessageService.class differ
diff --git a/target/classes/com/example/demo/service/ProfileService.class b/target/classes/com/example/demo/service/ProfileService.class
new file mode 100644
index 000000000..dce92d078
Binary files /dev/null and b/target/classes/com/example/demo/service/ProfileService.class differ
diff --git a/target/test-classes/com/example/demo/DemoApplicationTests.class b/target/test-classes/com/example/demo/DemoApplicationTests.class
new file mode 100644
index 000000000..7e21efaa9
Binary files /dev/null and b/target/test-classes/com/example/demo/DemoApplicationTests.class differ
diff --git a/target/test-classes/com/example/demo/config/TestChannelConfig.class b/target/test-classes/com/example/demo/config/TestChannelConfig.class
new file mode 100644
index 000000000..20ae89798
Binary files /dev/null and b/target/test-classes/com/example/demo/config/TestChannelConfig.class differ
diff --git a/target/test-classes/com/example/demo/config/TestMessageConfig.class b/target/test-classes/com/example/demo/config/TestMessageConfig.class
new file mode 100644
index 000000000..3cff01262
Binary files /dev/null and b/target/test-classes/com/example/demo/config/TestMessageConfig.class differ
diff --git a/target/test-classes/com/example/demo/config/TestProfileConfig.class b/target/test-classes/com/example/demo/config/TestProfileConfig.class
new file mode 100644
index 000000000..e81974155
Binary files /dev/null and b/target/test-classes/com/example/demo/config/TestProfileConfig.class differ
diff --git a/target/test-classes/com/example/demo/controllers/TestChannelController.class b/target/test-classes/com/example/demo/controllers/TestChannelController.class
new file mode 100644
index 000000000..c7cb4ee57
Binary files /dev/null and b/target/test-classes/com/example/demo/controllers/TestChannelController.class differ
diff --git a/target/test-classes/com/example/demo/controllers/TestMessageController.class b/target/test-classes/com/example/demo/controllers/TestMessageController.class
new file mode 100644
index 000000000..0c30170cf
Binary files /dev/null and b/target/test-classes/com/example/demo/controllers/TestMessageController.class differ
diff --git a/target/test-classes/com/example/demo/controllers/TestProfileController.class b/target/test-classes/com/example/demo/controllers/TestProfileController.class
new file mode 100644
index 000000000..e1363f97c
Binary files /dev/null and b/target/test-classes/com/example/demo/controllers/TestProfileController.class differ
diff --git a/target/test-classes/com/example/demo/models/TestChannel.class b/target/test-classes/com/example/demo/models/TestChannel.class
new file mode 100644
index 000000000..9ee3d414d
Binary files /dev/null and b/target/test-classes/com/example/demo/models/TestChannel.class differ
diff --git a/target/test-classes/com/example/demo/models/TestMessage.class b/target/test-classes/com/example/demo/models/TestMessage.class
new file mode 100644
index 000000000..1bf48a94e
Binary files /dev/null and b/target/test-classes/com/example/demo/models/TestMessage.class differ
diff --git a/target/test-classes/com/example/demo/models/TestProfile.class b/target/test-classes/com/example/demo/models/TestProfile.class
new file mode 100644
index 000000000..2e8c2b2b0
Binary files /dev/null and b/target/test-classes/com/example/demo/models/TestProfile.class differ
diff --git a/target/test-classes/com/example/demo/repositories/TestChannelRepo.class b/target/test-classes/com/example/demo/repositories/TestChannelRepo.class
new file mode 100644
index 000000000..7224277b1
Binary files /dev/null and b/target/test-classes/com/example/demo/repositories/TestChannelRepo.class differ
diff --git a/target/test-classes/com/example/demo/repositories/TestMessageRepo.class b/target/test-classes/com/example/demo/repositories/TestMessageRepo.class
new file mode 100644
index 000000000..d861fb7d1
Binary files /dev/null and b/target/test-classes/com/example/demo/repositories/TestMessageRepo.class differ
diff --git a/target/test-classes/com/example/demo/repositories/TestProfileRepo.class b/target/test-classes/com/example/demo/repositories/TestProfileRepo.class
new file mode 100644
index 000000000..8a519520a
Binary files /dev/null and b/target/test-classes/com/example/demo/repositories/TestProfileRepo.class differ
diff --git a/target/test-classes/com/example/demo/services/TestChannelService.class b/target/test-classes/com/example/demo/services/TestChannelService.class
new file mode 100644
index 000000000..1f069309f
Binary files /dev/null and b/target/test-classes/com/example/demo/services/TestChannelService.class differ
diff --git a/target/test-classes/com/example/demo/services/TestMessageService.class b/target/test-classes/com/example/demo/services/TestMessageService.class
new file mode 100644
index 000000000..10d33fe70
Binary files /dev/null and b/target/test-classes/com/example/demo/services/TestMessageService.class differ
diff --git a/target/test-classes/com/example/demo/services/TestProfileService.class b/target/test-classes/com/example/demo/services/TestProfileService.class
new file mode 100644
index 000000000..e610ff590
Binary files /dev/null and b/target/test-classes/com/example/demo/services/TestProfileService.class differ