diff --git a/src/medicine/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_4_8.xml b/src/medicine/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_4_8.xml new file mode 100644 index 00000000..b75eb3ae --- /dev/null +++ b/src/medicine/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_4_8.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/medicine/.idea/libraries/Maven__com_google_code_gson_gson_2_10_1.xml b/src/medicine/.idea/libraries/Maven__com_google_code_gson_gson_2_10_1.xml new file mode 100644 index 00000000..cf0824c7 --- /dev/null +++ b/src/medicine/.idea/libraries/Maven__com_google_code_gson_gson_2_10_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/medicine/.idea/libraries/Maven__io_lettuce_lettuce_core_6_2_5_RELEASE.xml b/src/medicine/.idea/libraries/Maven__io_lettuce_lettuce_core_6_2_5_RELEASE.xml new file mode 100644 index 00000000..40b2d450 --- /dev/null +++ b/src/medicine/.idea/libraries/Maven__io_lettuce_lettuce_core_6_2_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/medicine/.idea/libraries/Maven__io_netty_netty_buffer_4_1_94_Final.xml b/src/medicine/.idea/libraries/Maven__io_netty_netty_buffer_4_1_94_Final.xml new file mode 100644 index 00000000..0eb52864 --- /dev/null +++ b/src/medicine/.idea/libraries/Maven__io_netty_netty_buffer_4_1_94_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/medicine/.idea/libraries/Maven__io_netty_netty_codec_4_1_94_Final.xml b/src/medicine/.idea/libraries/Maven__io_netty_netty_codec_4_1_94_Final.xml new file mode 100644 index 00000000..75f57a59 --- /dev/null +++ b/src/medicine/.idea/libraries/Maven__io_netty_netty_codec_4_1_94_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/medicine/.idea/libraries/Maven__io_netty_netty_common_4_1_94_Final.xml b/src/medicine/.idea/libraries/Maven__io_netty_netty_common_4_1_94_Final.xml new file mode 100644 index 00000000..811f2d4c --- /dev/null +++ b/src/medicine/.idea/libraries/Maven__io_netty_netty_common_4_1_94_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/medicine/.idea/libraries/Maven__io_netty_netty_handler_4_1_94_Final.xml b/src/medicine/.idea/libraries/Maven__io_netty_netty_handler_4_1_94_Final.xml new file mode 100644 index 00000000..37152525 --- /dev/null +++ b/src/medicine/.idea/libraries/Maven__io_netty_netty_handler_4_1_94_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/medicine/.idea/libraries/Maven__io_netty_netty_resolver_4_1_94_Final.xml b/src/medicine/.idea/libraries/Maven__io_netty_netty_resolver_4_1_94_Final.xml new file mode 100644 index 00000000..730b46ec --- /dev/null +++ b/src/medicine/.idea/libraries/Maven__io_netty_netty_resolver_4_1_94_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/medicine/.idea/libraries/Maven__io_netty_netty_transport_4_1_94_Final.xml b/src/medicine/.idea/libraries/Maven__io_netty_netty_transport_4_1_94_Final.xml new file mode 100644 index 00000000..a90bcd65 --- /dev/null +++ b/src/medicine/.idea/libraries/Maven__io_netty_netty_transport_4_1_94_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/medicine/.idea/libraries/Maven__io_netty_netty_transport_native_unix_common_4_1_94_Final.xml b/src/medicine/.idea/libraries/Maven__io_netty_netty_transport_native_unix_common_4_1_94_Final.xml new file mode 100644 index 00000000..5a544980 --- /dev/null +++ b/src/medicine/.idea/libraries/Maven__io_netty_netty_transport_native_unix_common_4_1_94_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/medicine/.idea/libraries/Maven__io_projectreactor_reactor_core_3_5_8.xml b/src/medicine/.idea/libraries/Maven__io_projectreactor_reactor_core_3_5_8.xml new file mode 100644 index 00000000..8b42a9db --- /dev/null +++ b/src/medicine/.idea/libraries/Maven__io_projectreactor_reactor_core_3_5_8.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/medicine/.idea/libraries/Maven__org_apache_commons_commons_pool2_2_11_1.xml b/src/medicine/.idea/libraries/Maven__org_apache_commons_commons_pool2_2_11_1.xml new file mode 100644 index 00000000..fe353d05 --- /dev/null +++ b/src/medicine/.idea/libraries/Maven__org_apache_commons_commons_pool2_2_11_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/medicine/.idea/libraries/Maven__org_aspectj_aspectjweaver_1_9_19.xml b/src/medicine/.idea/libraries/Maven__org_aspectj_aspectjweaver_1_9_19.xml new file mode 100644 index 00000000..0b626ce4 --- /dev/null +++ b/src/medicine/.idea/libraries/Maven__org_aspectj_aspectjweaver_1_9_19.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/medicine/.idea/libraries/Maven__org_json_json_20220320.xml b/src/medicine/.idea/libraries/Maven__org_json_json_20220320.xml new file mode 100644 index 00000000..e37f7fda --- /dev/null +++ b/src/medicine/.idea/libraries/Maven__org_json_json_20220320.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/medicine/.idea/libraries/Maven__org_reactivestreams_reactive_streams_1_0_4.xml b/src/medicine/.idea/libraries/Maven__org_reactivestreams_reactive_streams_1_0_4.xml new file mode 100644 index 00000000..949f0210 --- /dev/null +++ b/src/medicine/.idea/libraries/Maven__org_reactivestreams_reactive_streams_1_0_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/medicine/.idea/libraries/Maven__org_springframework_boot_spring_boot_configuration_processor_3_1_2.xml b/src/medicine/.idea/libraries/Maven__org_springframework_boot_spring_boot_configuration_processor_3_1_2.xml new file mode 100644 index 00000000..acaa3fe1 --- /dev/null +++ b/src/medicine/.idea/libraries/Maven__org_springframework_boot_spring_boot_configuration_processor_3_1_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/medicine/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_aop_3_1_2.xml b/src/medicine/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_aop_3_1_2.xml new file mode 100644 index 00000000..57ce2083 --- /dev/null +++ b/src/medicine/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_aop_3_1_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/medicine/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_cache_3_1_2.xml b/src/medicine/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_cache_3_1_2.xml new file mode 100644 index 00000000..c7b20a80 --- /dev/null +++ b/src/medicine/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_cache_3_1_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/medicine/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_data_redis_3_1_2.xml b/src/medicine/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_data_redis_3_1_2.xml new file mode 100644 index 00000000..aea1e789 --- /dev/null +++ b/src/medicine/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_data_redis_3_1_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/medicine/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_redis_1_4_7_RELEASE.xml b/src/medicine/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_redis_1_4_7_RELEASE.xml new file mode 100644 index 00000000..735af693 --- /dev/null +++ b/src/medicine/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_redis_1_4_7_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/medicine/.idea/libraries/Maven__org_springframework_data_spring_data_commons_3_1_2.xml b/src/medicine/.idea/libraries/Maven__org_springframework_data_spring_data_commons_3_1_2.xml new file mode 100644 index 00000000..c044eb4c --- /dev/null +++ b/src/medicine/.idea/libraries/Maven__org_springframework_data_spring_data_commons_3_1_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/medicine/.idea/libraries/Maven__org_springframework_data_spring_data_keyvalue_3_1_2.xml b/src/medicine/.idea/libraries/Maven__org_springframework_data_spring_data_keyvalue_3_1_2.xml new file mode 100644 index 00000000..c6ad9fc9 --- /dev/null +++ b/src/medicine/.idea/libraries/Maven__org_springframework_data_spring_data_keyvalue_3_1_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/medicine/.idea/libraries/Maven__org_springframework_data_spring_data_redis_3_1_2.xml b/src/medicine/.idea/libraries/Maven__org_springframework_data_spring_data_redis_3_1_2.xml new file mode 100644 index 00000000..23226fe6 --- /dev/null +++ b/src/medicine/.idea/libraries/Maven__org_springframework_data_spring_data_redis_3_1_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/medicine/.idea/libraries/Maven__org_springframework_spring_context_support_6_0_11.xml b/src/medicine/.idea/libraries/Maven__org_springframework_spring_context_support_6_0_11.xml new file mode 100644 index 00000000..048f057d --- /dev/null +++ b/src/medicine/.idea/libraries/Maven__org_springframework_spring_context_support_6_0_11.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/medicine/.idea/libraries/Maven__org_springframework_spring_oxm_6_0_11.xml b/src/medicine/.idea/libraries/Maven__org_springframework_spring_oxm_6_0_11.xml new file mode 100644 index 00000000..5b17fcec --- /dev/null +++ b/src/medicine/.idea/libraries/Maven__org_springframework_spring_oxm_6_0_11.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/medicine/.idea/libraries/Maven__redis_clients_jedis_4_3_2.xml b/src/medicine/.idea/libraries/Maven__redis_clients_jedis_4_3_2.xml new file mode 100644 index 00000000..0512bf76 --- /dev/null +++ b/src/medicine/.idea/libraries/Maven__redis_clients_jedis_4_3_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/medicine/.idea/sonarlint/issuestore/0/5/051eaf551b928a8ccf651611c070ebb2b8155264 b/src/medicine/.idea/sonarlint/issuestore/0/5/051eaf551b928a8ccf651611c070ebb2b8155264 index d0f8ba3c..6b732deb 100644 --- a/src/medicine/.idea/sonarlint/issuestore/0/5/051eaf551b928a8ccf651611c070ebb2b8155264 +++ b/src/medicine/.idea/sonarlint/issuestore/0/5/051eaf551b928a8ccf651611c070ebb2b8155264 @@ -1,2 +1,2 @@ -t java:S120"ZRename this package name to match the regular expression '^[a-z_]+(\.[a-z_][a-z0-9_]*)*$'.( \ No newline at end of file +{ java:S120"ZRename this package name to match the regular expression '^[a-z_]+(\.[a-z_][a-z0-9_]*)*$'.(8Ÿ1 \ No newline at end of file diff --git a/src/medicine/.idea/sonarlint/issuestore/0/b/0bf6f777ae20a7657065bc4a2b2a9f1f3b4876b1 b/src/medicine/.idea/sonarlint/issuestore/0/b/0bf6f777ae20a7657065bc4a2b2a9f1f3b4876b1 index 9dca1267..e69de29b 100644 --- a/src/medicine/.idea/sonarlint/issuestore/0/b/0bf6f777ae20a7657065bc4a2b2a9f1f3b4876b1 +++ b/src/medicine/.idea/sonarlint/issuestore/0/b/0bf6f777ae20a7657065bc4a2b2a9f1f3b4876b1 @@ -1,4 +0,0 @@ - -{ java:S120"ZRename this package name to match the regular expression '^[a-z_]+(\.[a-z_][a-z0-9_]*)*$'.(81 -M -java:S1128 "+Remove this unused import 'java.util.List'.(81 \ No newline at end of file diff --git a/src/medicine/.idea/sonarlint/issuestore/1/3/139a0da36daad8c438a5607ee212d1f38a505779 b/src/medicine/.idea/sonarlint/issuestore/1/3/139a0da36daad8c438a5607ee212d1f38a505779 index d215fe77..e69de29b 100644 --- a/src/medicine/.idea/sonarlint/issuestore/1/3/139a0da36daad8c438a5607ee212d1f38a505779 +++ b/src/medicine/.idea/sonarlint/issuestore/1/3/139a0da36daad8c438a5607ee212d1f38a505779 @@ -1,4 +0,0 @@ - -{ java:S120"ZRename this package name to match the regular expression '^[a-z_]+(\.[a-z_][a-z0-9_]*)*$'.(8Х1 -V -java:S1128"9Remove this unused import 'org.apache.ibatis.type.Alias'.(8ͻХ1 \ No newline at end of file diff --git a/src/medicine/.idea/sonarlint/issuestore/2/a/2ad2a1260dac6c01c8b352bb0e2ca62f513676a9 b/src/medicine/.idea/sonarlint/issuestore/2/a/2ad2a1260dac6c01c8b352bb0e2ca62f513676a9 index 98f95766..012df2cf 100644 --- a/src/medicine/.idea/sonarlint/issuestore/2/a/2ad2a1260dac6c01c8b352bb0e2ca62f513676a9 +++ b/src/medicine/.idea/sonarlint/issuestore/2/a/2ad2a1260dac6c01c8b352bb0e2ca62f513676a9 @@ -1,2 +1,2 @@ -{ java:S120"ZRename this package name to match the regular expression '^[a-z_]+(\.[a-z_][a-z0-9_]*)*$'.(8숩1 \ No newline at end of file +{ java:S120"ZRename this package name to match the regular expression '^[a-z_]+(\.[a-z_][a-z0-9_]*)*$'.(8ɳ1 \ No newline at end of file diff --git a/src/medicine/.idea/sonarlint/issuestore/4/0/40a2343a36c9747fa26c52f19f82c0a493b5c2e0 b/src/medicine/.idea/sonarlint/issuestore/4/0/40a2343a36c9747fa26c52f19f82c0a493b5c2e0 index d0f8ba3c..63eb8b75 100644 --- a/src/medicine/.idea/sonarlint/issuestore/4/0/40a2343a36c9747fa26c52f19f82c0a493b5c2e0 +++ b/src/medicine/.idea/sonarlint/issuestore/4/0/40a2343a36c9747fa26c52f19f82c0a493b5c2e0 @@ -1,2 +1,2 @@ -t java:S120"ZRename this package name to match the regular expression '^[a-z_]+(\.[a-z_][a-z0-9_]*)*$'.( \ No newline at end of file +{ java:S120"ZRename this package name to match the regular expression '^[a-z_]+(\.[a-z_][a-z0-9_]*)*$'.(81 \ No newline at end of file diff --git a/src/medicine/.idea/sonarlint/issuestore/5/a/5aa79857db1807fe40f0941af9e17d8a19d8bc97 b/src/medicine/.idea/sonarlint/issuestore/5/a/5aa79857db1807fe40f0941af9e17d8a19d8bc97 new file mode 100644 index 00000000..e69de29b diff --git a/src/medicine/.idea/sonarlint/issuestore/5/f/5feb9f75e1bc678660918562fd0ce2745899be29 b/src/medicine/.idea/sonarlint/issuestore/5/f/5feb9f75e1bc678660918562fd0ce2745899be29 index 024c1726..9dbd7a70 100644 --- a/src/medicine/.idea/sonarlint/issuestore/5/f/5feb9f75e1bc678660918562fd0ce2745899be29 +++ b/src/medicine/.idea/sonarlint/issuestore/5/f/5feb9f75e1bc678660918562fd0ce2745899be29 @@ -1,11 +1,21 @@ -{ java:S120"ZRename this package name to match the regular expression '^[a-z_]+(\.[a-z_][a-z0-9_]*)*$'.(81 -Z java:S106 "9Replace this use of System.out or System.err by a logger.(81 -U java:S106+"9Replace this use of System.out or System.err by a logger.(ވ81 -U java:S1066"9Replace this use of System.out or System.err by a logger.(81 -Z java:S106L"9Replace this use of System.out or System.err by a logger.(81 -Z java:S106W"9Replace this use of System.out or System.err by a logger.(㘘81 -U java:S106b"9Replace this use of System.out or System.err by a logger.(¼81 -T java:S106r"9Replace this use of System.out or System.err by a logger.(ܝ81 -U java:S106}"9Replace this use of System.out or System.err by a logger.(8𛺈1 -V java:S106"9Replace this use of System.out or System.err by a logger.(ɂ81 \ No newline at end of file +Q +java:S3740"/Provide the parametrized type for this generic.(8ɸ1 +{ java:S120"ZRename this package name to match the regular expression '^[a-z_]+(\.[a-z_][a-z0-9_]*)*$'.(8ɸ1 +Z java:S106,"9Replace this use of System.out or System.err by a logger.(8ɸ1 +Z java:S106-"9Replace this use of System.out or System.err by a logger.(˼8ɸ1 +U java:S106="9Replace this use of System.out or System.err by a logger.(ވ8ɸ1 +U java:S106K"9Replace this use of System.out or System.err by a logger.(8ɸ1 +Z java:S106b"9Replace this use of System.out or System.err by a logger.(8ɸ1 +T java:S106c"9Replace this use of System.out or System.err by a logger.(ƴ78ɸ1 +Z java:S106r"9Replace this use of System.out or System.err by a logger.(㘘8ɸ1 +U java:S106"9Replace this use of System.out or System.err by a logger.(¼8ɸ1 +U java:S106"9Replace this use of System.out or System.err by a logger.(ܝ8ɸ1 +[ java:S106"9Replace this use of System.out or System.err by a logger.(Я8ɸ1 +V java:S106"9Replace this use of System.out or System.err by a logger.(8ɸ1 +V java:S106"9Replace this use of System.out or System.err by a logger.(ɂ8ɸ1 +n +java:S1128 "LRemove this unused import 'org.springframework.cache.annotation.CacheEvict'.(8ɸ1 +l +java:S1128 +"JRemove this unused import 'org.springframework.cache.annotation.CachePut'.(≠8ɸ1 \ No newline at end of file diff --git a/src/medicine/.idea/sonarlint/issuestore/7/f/7f8771ebddaacf6a70143dc43243816aa7f7e066 b/src/medicine/.idea/sonarlint/issuestore/7/f/7f8771ebddaacf6a70143dc43243816aa7f7e066 new file mode 100644 index 00000000..1a0ddc9b --- /dev/null +++ b/src/medicine/.idea/sonarlint/issuestore/7/f/7f8771ebddaacf6a70143dc43243816aa7f7e066 @@ -0,0 +1,20 @@ + +` java:S112$"FDefine and throw a dedicated exception instead of using a generic one.(҂ +k java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(硾 +f java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ų +k java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.( +t +java:S2142#"^Either re-interrupt this method or rethrow the "InterruptedException" that can be caught here.(䠹 +N java:S106"9Replace this use of System.out or System.err by a logger.(̓ +R +java:S1128"7Remove this unused import 'org.python.core.PyFunction'.(忎 +P +java:S1128"5Remove this unused import 'org.python.core.PyObject'.( +P +java:S1128"5Remove this unused import 'org.python.core.PyString'.(ܔ +T +java:S1128">Remove this unused import 'org.python.util.PythonInterpreter'.( +M +java:S1128"7Remove this unused import 'javax.imageio.IIOException'.(ϒ +F +java:S1128 "0Remove this unused import 'java.util.ArrayList'.( \ No newline at end of file diff --git a/src/medicine/.idea/sonarlint/issuestore/9/3/932ae6b8f9f42f924c25e69e48dc30fddd63ec28 b/src/medicine/.idea/sonarlint/issuestore/9/3/932ae6b8f9f42f924c25e69e48dc30fddd63ec28 index 4d8c457a..9d0eb4a9 100644 --- a/src/medicine/.idea/sonarlint/issuestore/9/3/932ae6b8f9f42f924c25e69e48dc30fddd63ec28 +++ b/src/medicine/.idea/sonarlint/issuestore/9/3/932ae6b8f9f42f924c25e69e48dc30fddd63ec28 @@ -1,4 +1,4 @@ -t java:S120"ZRename this package name to match the regular expression '^[a-z_]+(\.[a-z_][a-z0-9_]*)*$'.( +{ java:S120"ZRename this package name to match the regular expression '^[a-z_]+(\.[a-z_][a-z0-9_]*)*$'.(8᪸1 M -java:S1128"+Remove this unused import 'java.util.List'.(8䂦1 \ No newline at end of file +java:S1128 "+Remove this unused import 'java.util.List'.(8᪸1 \ No newline at end of file diff --git a/src/medicine/.idea/sonarlint/issuestore/a/0/a027316d6320e979eb2d643acc8d7431b5899762 b/src/medicine/.idea/sonarlint/issuestore/a/0/a027316d6320e979eb2d643acc8d7431b5899762 new file mode 100644 index 00000000..e69de29b diff --git a/src/medicine/.idea/sonarlint/issuestore/b/7/b7cd5493e06e5fd9d49343a72ed251284cff7045 b/src/medicine/.idea/sonarlint/issuestore/b/7/b7cd5493e06e5fd9d49343a72ed251284cff7045 new file mode 100644 index 00000000..926c89b7 --- /dev/null +++ b/src/medicine/.idea/sonarlint/issuestore/b/7/b7cd5493e06e5fd9d49343a72ed251284cff7045 @@ -0,0 +1,8 @@ + +{ java:S120"ZRename this package name to match the regular expression '^[a-z_]+(\.[a-z_][a-z0-9_]*)*$'.(8Ҹ1 +l +java:S1128"ORemove this unused import 'org.springframework.beans.factory.annotation.Value'.(8Ҹ1 +r +java:S1128 "PRemove this unused import 'org.springframework.web.bind.annotation.RequestBody'.(⭽8Ҹ1 +F +java:S1128")Remove this unused import 'java.io.File'.(Х8Ҹ1 \ No newline at end of file diff --git a/src/medicine/.idea/sonarlint/issuestore/c/5/c5247f1a7a8da981f49c6fe2b5fc0ba5e9b426bb b/src/medicine/.idea/sonarlint/issuestore/c/5/c5247f1a7a8da981f49c6fe2b5fc0ba5e9b426bb new file mode 100644 index 00000000..e69de29b diff --git a/src/medicine/.idea/sonarlint/issuestore/e/d/edeacc9d294f3b307d4238fb3f381c6838218bb6 b/src/medicine/.idea/sonarlint/issuestore/e/d/edeacc9d294f3b307d4238fb3f381c6838218bb6 index 4f079292..d18aa71f 100644 --- a/src/medicine/.idea/sonarlint/issuestore/e/d/edeacc9d294f3b307d4238fb3f381c6838218bb6 +++ b/src/medicine/.idea/sonarlint/issuestore/e/d/edeacc9d294f3b307d4238fb3f381c6838218bb6 @@ -1,2 +1,7 @@ -{ java:S120"ZRename this package name to match the regular expression '^[a-z_]+(\.[a-z_][a-z0-9_]*)*$'.(8֝1 \ No newline at end of file +{ java:S120"ZRename this package name to match the regular expression '^[a-z_]+(\.[a-z_][a-z0-9_]*)*$'.(81 +h +java:S1128 "KRemove this unused import 'org.springframework.cache.annotation.Cacheable'.(ݺؓ8ฬ1 +p +java:S1128 +"NRemove this unused import 'org.springframework.data.redis.core.RedisTemplate'.(8ฬ1 \ No newline at end of file diff --git a/src/medicine/.idea/sonarlint/issuestore/index.pb b/src/medicine/.idea/sonarlint/issuestore/index.pb index 517a6b2f..a8e45a57 100644 --- a/src/medicine/.idea/sonarlint/issuestore/index.pb +++ b/src/medicine/.idea/sonarlint/issuestore/index.pb @@ -3,16 +3,8 @@ w Gspringboot/src/main/java/com/xht/springboot/Dao/PersonalHomeMapper.java,8\e\8ea61bcc473345da7a8363076b3ae562bc76fedc z Jspringboot/src/main/java/com/xht/springboot/pythonspider/PythonSpider.java,8\2\82d065e13dbb46b69838db763af0105eec47337f -p -@springboot/src/main/java/com/xht/springboot/Entity/UserHome.java,0\b\0bf6f777ae20a7657065bc4a2b2a9f1f3b4876b1 { Kspringboot/src/main/java/com/xht/springboot/Dao/LoginAndRegisterMapper.java,6\4\6455addaf8475c1ee66ddf019aba9934cde58b33 -q -Aspringboot/src/main/java/com/xht/springboot/Entity/UserLogin.java,1\3\139a0da36daad8c438a5607ee212d1f38a505779 -q -Aspringboot/src/main/java/com/xht/springboot/Entity/UserReply.java,0\5\051eaf551b928a8ccf651611c070ebb2b8155264 -| -Lspringboot/src/main/java/com/xht/springboot/Service/PersonalHomeService.java,7\6\762bc359bc75ba7b3073e784c826f31f6c989305 m =train_cancer/test_information/train_model_and_load_picture.py,b\c\bc14878c6e46b0ed0df34c90b21fc25660f0e1f1 W @@ -23,33 +15,45 @@ X -train_cancer/train_model/gpu_cpu/check_cpu.py,f\6\f61ac2808b4dc885ec9d8e0a2e3a842098bfb484 ` 0train_cancer/train_model/data_gen/data_output.py,6\9\69a341fae4073fedbb8b01a3b078c3012c70ce5f - -Ospringboot/src/main/java/com/xht/springboot/Control/PersonalHomeController.java,b\e\be5bf7d32cedc052850e2cc0c99f2cf7357cac12 -p -@springboot/src/main/java/com/xht/springboot/Entity/UserText.java,4\0\40a2343a36c9747fa26c52f19f82c0a493b5c2e0 -s -Cspringboot/src/main/java/com/xht/springboot/Entity/UserComment.java,9\3\932ae6b8f9f42f924c25e69e48dc30fddd63ec28 -r -Bspringboot/src/main/java/com/xht/springboot/Dao/WebHomeMapper.java,2\a\2ad2a1260dac6c01c8b352bb0e2ca62f513676a9 -z -Jspringboot/src/main/java/com/xht/springboot/Control/WebHomeController.java,e\d\edeacc9d294f3b307d4238fb3f381c6838218bb6 - -Sspringboot/src/main/java/com/xht/springboot/Control/LoginAndRegisterController.java,4\2\42d62ad23989879b1e669e84287f32b9ec3b7df5 -w -Gspringboot/src/main/java/com/xht/springboot/Service/WebHomeService.java,5\f\5feb9f75e1bc678660918562fd0ce2745899be29 } Mspringboot/src/main/java/com/xht/springboot/Control/GetSpiderInformation.java,6\a\6ae8bd6e0b13a9d9272e5cd44460d2d0a72091d9 -B -springboot/pom.xml,e\4\e46aee6c7c512a7b48980a296fca0acf004a1907 ^ .test_model/src/main/java/org/example/Main.java,7\f\7f8771ebddaacf6a70143dc43243816aa7f7e066 +r +Bspringboot/src/main/java/com/xht/springboot/Tip/RequestResult.java,8\a\8ac776bbbb6e77f29694ccc4476b533f9f4573da +| +Lspringboot/src/main/java/com/xht/springboot/Service/CancerDetectService.java,5\a\5aa79857db1807fe40f0941af9e17d8a19d8bc97 +C +springboot/mvnw.cmd,a\0\a027316d6320e979eb2d643acc8d7431b5899762 B test_model/pom.xml,c\5\c5247f1a7a8da981f49c6fe2b5fc0ba5e9b426bb +p +@springboot/src/main/java/com/xht/springboot/Entity/UserHome.java,0\b\0bf6f777ae20a7657065bc4a2b2a9f1f3b4876b1 +q +Aspringboot/src/main/java/com/xht/springboot/Entity/UserLogin.java,1\3\139a0da36daad8c438a5607ee212d1f38a505779 +B +springboot/pom.xml,e\4\e46aee6c7c512a7b48980a296fca0acf004a1907 r -Bspringboot/src/main/java/com/xht/springboot/Tip/RequestResult.java,8\a\8ac776bbbb6e77f29694ccc4476b533f9f4573da -v -Fspringboot/src/main/java/com/xht/springboot/SpringbootApplication.java,4\0\40324953a2003c0d6c6b3ceece38a620d48a0df7 +Bspringboot/src/main/java/com/xht/springboot/Dao/WebHomeMapper.java,2\a\2ad2a1260dac6c01c8b352bb0e2ca62f513676a9 +s +Cspringboot/src/main/java/com/xht/springboot/Config/RedisConfig.java,0\3\03febb48c6f14848416295ea77d17704b452f798 +p +@springboot/src/main/java/com/xht/springboot/Entity/UserText.java,4\0\40a2343a36c9747fa26c52f19f82c0a493b5c2e0 +s +Cspringboot/src/main/java/com/xht/springboot/Entity/UserComment.java,9\3\932ae6b8f9f42f924c25e69e48dc30fddd63ec28 +q +Aspringboot/src/main/java/com/xht/springboot/Entity/UserReply.java,0\5\051eaf551b928a8ccf651611c070ebb2b8155264 +w +Gspringboot/src/main/java/com/xht/springboot/Service/WebHomeService.java,5\f\5feb9f75e1bc678660918562fd0ce2745899be29  Ospringboot/src/main/java/com/xht/springboot/Control/CancerDetectController.java,b\7\b7cd5493e06e5fd9d49343a72ed251284cff7045 +z +Jspringboot/src/main/java/com/xht/springboot/Control/WebHomeController.java,e\d\edeacc9d294f3b307d4238fb3f381c6838218bb6 + +Ospringboot/src/main/java/com/xht/springboot/Control/PersonalHomeController.java,b\e\be5bf7d32cedc052850e2cc0c99f2cf7357cac12 | -Lspringboot/src/main/java/com/xht/springboot/Service/CancerDetectService.java,5\a\5aa79857db1807fe40f0941af9e17d8a19d8bc97 \ No newline at end of file +Lspringboot/src/main/java/com/xht/springboot/Service/PersonalHomeService.java,7\6\762bc359bc75ba7b3073e784c826f31f6c989305 +v +Fspringboot/src/main/java/com/xht/springboot/SpringbootApplication.java,4\0\40324953a2003c0d6c6b3ceece38a620d48a0df7 + +Sspringboot/src/main/java/com/xht/springboot/Control/LoginAndRegisterController.java,4\2\42d62ad23989879b1e669e84287f32b9ec3b7df5 \ No newline at end of file diff --git a/src/medicine/.idea/sonarlint/securityhotspotstore/5/a/5aa79857db1807fe40f0941af9e17d8a19d8bc97 b/src/medicine/.idea/sonarlint/securityhotspotstore/5/a/5aa79857db1807fe40f0941af9e17d8a19d8bc97 new file mode 100644 index 00000000..e69de29b diff --git a/src/medicine/.idea/sonarlint/securityhotspotstore/7/f/7f8771ebddaacf6a70143dc43243816aa7f7e066 b/src/medicine/.idea/sonarlint/securityhotspotstore/7/f/7f8771ebddaacf6a70143dc43243816aa7f7e066 new file mode 100644 index 00000000..e69de29b diff --git a/src/medicine/.idea/sonarlint/securityhotspotstore/a/0/a027316d6320e979eb2d643acc8d7431b5899762 b/src/medicine/.idea/sonarlint/securityhotspotstore/a/0/a027316d6320e979eb2d643acc8d7431b5899762 new file mode 100644 index 00000000..e69de29b diff --git a/src/medicine/.idea/sonarlint/securityhotspotstore/b/7/b7cd5493e06e5fd9d49343a72ed251284cff7045 b/src/medicine/.idea/sonarlint/securityhotspotstore/b/7/b7cd5493e06e5fd9d49343a72ed251284cff7045 new file mode 100644 index 00000000..e69de29b diff --git a/src/medicine/.idea/sonarlint/securityhotspotstore/c/5/c5247f1a7a8da981f49c6fe2b5fc0ba5e9b426bb b/src/medicine/.idea/sonarlint/securityhotspotstore/c/5/c5247f1a7a8da981f49c6fe2b5fc0ba5e9b426bb new file mode 100644 index 00000000..e69de29b diff --git a/src/medicine/.idea/sonarlint/securityhotspotstore/index.pb b/src/medicine/.idea/sonarlint/securityhotspotstore/index.pb index 5a2eaed0..6fd0f5c2 100644 --- a/src/medicine/.idea/sonarlint/securityhotspotstore/index.pb +++ b/src/medicine/.idea/sonarlint/securityhotspotstore/index.pb @@ -3,16 +3,8 @@ w Gspringboot/src/main/java/com/xht/springboot/Dao/PersonalHomeMapper.java,8\e\8ea61bcc473345da7a8363076b3ae562bc76fedc z Jspringboot/src/main/java/com/xht/springboot/pythonspider/PythonSpider.java,8\2\82d065e13dbb46b69838db763af0105eec47337f -p -@springboot/src/main/java/com/xht/springboot/Entity/UserHome.java,0\b\0bf6f777ae20a7657065bc4a2b2a9f1f3b4876b1 -q -Aspringboot/src/main/java/com/xht/springboot/Entity/UserLogin.java,1\3\139a0da36daad8c438a5607ee212d1f38a505779 { Kspringboot/src/main/java/com/xht/springboot/Dao/LoginAndRegisterMapper.java,6\4\6455addaf8475c1ee66ddf019aba9934cde58b33 -q -Aspringboot/src/main/java/com/xht/springboot/Entity/UserReply.java,0\5\051eaf551b928a8ccf651611c070ebb2b8155264 -| -Lspringboot/src/main/java/com/xht/springboot/Service/PersonalHomeService.java,7\6\762bc359bc75ba7b3073e784c826f31f6c989305 m =train_cancer/test_information/train_model_and_load_picture.py,b\c\bc14878c6e46b0ed0df34c90b21fc25660f0e1f1 W @@ -23,33 +15,45 @@ X -train_cancer/train_model/gpu_cpu/check_cpu.py,f\6\f61ac2808b4dc885ec9d8e0a2e3a842098bfb484 ` 0train_cancer/train_model/data_gen/data_output.py,6\9\69a341fae4073fedbb8b01a3b078c3012c70ce5f +} +Mspringboot/src/main/java/com/xht/springboot/Control/GetSpiderInformation.java,6\a\6ae8bd6e0b13a9d9272e5cd44460d2d0a72091d9 +^ +.test_model/src/main/java/org/example/Main.java,7\f\7f8771ebddaacf6a70143dc43243816aa7f7e066 +r +Bspringboot/src/main/java/com/xht/springboot/Tip/RequestResult.java,8\a\8ac776bbbb6e77f29694ccc4476b533f9f4573da +| +Lspringboot/src/main/java/com/xht/springboot/Service/CancerDetectService.java,5\a\5aa79857db1807fe40f0941af9e17d8a19d8bc97 +C +springboot/mvnw.cmd,a\0\a027316d6320e979eb2d643acc8d7431b5899762 +B +test_model/pom.xml,c\5\c5247f1a7a8da981f49c6fe2b5fc0ba5e9b426bb +v +Fspringboot/src/main/java/com/xht/springboot/SpringbootApplication.java,4\0\40324953a2003c0d6c6b3ceece38a620d48a0df7 +p +@springboot/src/main/java/com/xht/springboot/Entity/UserHome.java,0\b\0bf6f777ae20a7657065bc4a2b2a9f1f3b4876b1 +q +Aspringboot/src/main/java/com/xht/springboot/Entity/UserLogin.java,1\3\139a0da36daad8c438a5607ee212d1f38a505779 +B +springboot/pom.xml,e\4\e46aee6c7c512a7b48980a296fca0acf004a1907 r Bspringboot/src/main/java/com/xht/springboot/Dao/WebHomeMapper.java,2\a\2ad2a1260dac6c01c8b352bb0e2ca62f513676a9 - -Ospringboot/src/main/java/com/xht/springboot/Control/PersonalHomeController.java,b\e\be5bf7d32cedc052850e2cc0c99f2cf7357cac12 s -Cspringboot/src/main/java/com/xht/springboot/Entity/UserComment.java,9\3\932ae6b8f9f42f924c25e69e48dc30fddd63ec28 +Cspringboot/src/main/java/com/xht/springboot/Config/RedisConfig.java,0\3\03febb48c6f14848416295ea77d17704b452f798 p @springboot/src/main/java/com/xht/springboot/Entity/UserText.java,4\0\40a2343a36c9747fa26c52f19f82c0a493b5c2e0 -z -Jspringboot/src/main/java/com/xht/springboot/Control/WebHomeController.java,e\d\edeacc9d294f3b307d4238fb3f381c6838218bb6 +s +Cspringboot/src/main/java/com/xht/springboot/Entity/UserComment.java,9\3\932ae6b8f9f42f924c25e69e48dc30fddd63ec28 +q +Aspringboot/src/main/java/com/xht/springboot/Entity/UserReply.java,0\5\051eaf551b928a8ccf651611c070ebb2b8155264 w Gspringboot/src/main/java/com/xht/springboot/Service/WebHomeService.java,5\f\5feb9f75e1bc678660918562fd0ce2745899be29 - -Sspringboot/src/main/java/com/xht/springboot/Control/LoginAndRegisterController.java,4\2\42d62ad23989879b1e669e84287f32b9ec3b7df5 -} -Mspringboot/src/main/java/com/xht/springboot/Control/GetSpiderInformation.java,6\a\6ae8bd6e0b13a9d9272e5cd44460d2d0a72091d9 -B -springboot/pom.xml,e\4\e46aee6c7c512a7b48980a296fca0acf004a1907 -^ -.test_model/src/main/java/org/example/Main.java,7\f\7f8771ebddaacf6a70143dc43243816aa7f7e066 -B -test_model/pom.xml,c\5\c5247f1a7a8da981f49c6fe2b5fc0ba5e9b426bb  Ospringboot/src/main/java/com/xht/springboot/Control/CancerDetectController.java,b\7\b7cd5493e06e5fd9d49343a72ed251284cff7045 -r -Bspringboot/src/main/java/com/xht/springboot/Tip/RequestResult.java,8\a\8ac776bbbb6e77f29694ccc4476b533f9f4573da -v -Fspringboot/src/main/java/com/xht/springboot/SpringbootApplication.java,4\0\40324953a2003c0d6c6b3ceece38a620d48a0df7 | -Lspringboot/src/main/java/com/xht/springboot/Service/CancerDetectService.java,5\a\5aa79857db1807fe40f0941af9e17d8a19d8bc97 \ No newline at end of file +Lspringboot/src/main/java/com/xht/springboot/Service/PersonalHomeService.java,7\6\762bc359bc75ba7b3073e784c826f31f6c989305 +z +Jspringboot/src/main/java/com/xht/springboot/Control/WebHomeController.java,e\d\edeacc9d294f3b307d4238fb3f381c6838218bb6 + +Ospringboot/src/main/java/com/xht/springboot/Control/PersonalHomeController.java,b\e\be5bf7d32cedc052850e2cc0c99f2cf7357cac12 + +Sspringboot/src/main/java/com/xht/springboot/Control/LoginAndRegisterController.java,4\2\42d62ad23989879b1e669e84287f32b9ec3b7df5 \ No newline at end of file diff --git a/src/medicine/springboot/pom.xml b/src/medicine/springboot/pom.xml index 10cddd05..59d51f66 100644 --- a/src/medicine/springboot/pom.xml +++ b/src/medicine/springboot/pom.xml @@ -35,6 +35,37 @@ 8.0.31 + + org.springframework.boot + spring-boot-starter-data-redis + + + + org.springframework.boot + spring-boot-starter-redis + 1.4.7.RELEASE + + + + org.apache.commons + commons-pool2 + + + + org.springframework.boot + spring-boot-starter-cache + + + + org.springframework.boot + spring-boot-starter-aop + + + + org.springframework.boot + spring-boot-configuration-processor + + org.projectlombok lombok diff --git a/src/medicine/springboot/src/main/java/com/xht/springboot/Config/RedisConfig.java b/src/medicine/springboot/src/main/java/com/xht/springboot/Config/RedisConfig.java new file mode 100644 index 00000000..86f8bc7d --- /dev/null +++ b/src/medicine/springboot/src/main/java/com/xht/springboot/Config/RedisConfig.java @@ -0,0 +1,40 @@ +package com.xht.springboot.Config; + + +import org.springframework.boot.autoconfigure.cache.CacheProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.data.redis.cache.RedisCacheConfiguration; +import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.data.redis.serializer.*; + +import java.util.Collection; + +@Configuration +public class RedisConfig { + + @Bean + public RedisCacheConfiguration redisCacheConfiguration(){ + RedisCacheConfiguration config = RedisCacheConfiguration.defaultCacheConfig(); + config = config.serializeKeysWith(RedisSerializationContext.SerializationPair.fromSerializer(new StringRedisSerializer())); + config = config.serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(new GenericJackson2JsonRedisSerializer())); + + return config; + } + + @Bean + public RedisTemplate redisTemplate(LettuceConnectionFactory lettuceConnectionFactory){ + RedisTemplate redisTemplate = new RedisTemplate(); + redisTemplate.setConnectionFactory(lettuceConnectionFactory); + + redisTemplate.setKeySerializer(RedisSerializer.string()); + redisTemplate.setValueSerializer(RedisSerializer.json()); + redisTemplate.setHashKeySerializer(RedisSerializer.string()); + redisTemplate.setHashValueSerializer(RedisSerializer.json()); + + redisTemplate.afterPropertiesSet(); + return redisTemplate; + } + +} diff --git a/src/medicine/springboot/src/main/java/com/xht/springboot/Control/PersonalHomeController.java b/src/medicine/springboot/src/main/java/com/xht/springboot/Control/PersonalHomeController.java index 98317a5d..2c31426a 100644 --- a/src/medicine/springboot/src/main/java/com/xht/springboot/Control/PersonalHomeController.java +++ b/src/medicine/springboot/src/main/java/com/xht/springboot/Control/PersonalHomeController.java @@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.ResponseBody; import java.util.List; @Controller +@RequestMapping("user") public class PersonalHomeController { @Autowired PersonalHomeService personalHomeService; @@ -20,7 +21,7 @@ public class PersonalHomeController { @Autowired RequestResult requestResult; - @RequestMapping("/getpersonahomedata") + @RequestMapping("/getuserhomedata") @ResponseBody public UserHome getPersonalHomeData(int uid){ return personalHomeService.getUserHomeData(uid); diff --git a/src/medicine/springboot/src/main/java/com/xht/springboot/Control/WebHomeController.java b/src/medicine/springboot/src/main/java/com/xht/springboot/Control/WebHomeController.java index 86c7896c..277c038a 100644 --- a/src/medicine/springboot/src/main/java/com/xht/springboot/Control/WebHomeController.java +++ b/src/medicine/springboot/src/main/java/com/xht/springboot/Control/WebHomeController.java @@ -6,6 +6,8 @@ import com.xht.springboot.Entity.UserText; import com.xht.springboot.Service.WebHomeService; import com.xht.springboot.Tip.RequestResult; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -148,7 +150,7 @@ public class WebHomeController { @PostMapping("/findreply") @ResponseBody - public List selectReply(@RequestBody UserReply userReply){ - return webHomeService.selectUserReply(userReply); + public UserReply selectReply(@RequestParam("id") int replyId){ + return webHomeService.selectUserReply(replyId); } } diff --git a/src/medicine/springboot/src/main/java/com/xht/springboot/Dao/WebHomeMapper.java b/src/medicine/springboot/src/main/java/com/xht/springboot/Dao/WebHomeMapper.java index 1dc2afa5..5e29f46b 100644 --- a/src/medicine/springboot/src/main/java/com/xht/springboot/Dao/WebHomeMapper.java +++ b/src/medicine/springboot/src/main/java/com/xht/springboot/Dao/WebHomeMapper.java @@ -54,7 +54,7 @@ public interface WebHomeMapper { public int updateUserReply(UserReply userReply); - public List selectUserReply(UserReply userReply); + public UserReply selectUserReply(int id); diff --git a/src/medicine/springboot/src/main/java/com/xht/springboot/Entity/UserComment.java b/src/medicine/springboot/src/main/java/com/xht/springboot/Entity/UserComment.java index 5f77c796..e4d5652a 100644 --- a/src/medicine/springboot/src/main/java/com/xht/springboot/Entity/UserComment.java +++ b/src/medicine/springboot/src/main/java/com/xht/springboot/Entity/UserComment.java @@ -5,11 +5,12 @@ import lombok.Data; import lombok.ToString; import org.springframework.stereotype.Component; +import java.io.Serializable; import java.util.List; @Data @ToString @Component -public class UserComment { +public class UserComment implements Serializable { private int commentid; private int textid; diff --git a/src/medicine/springboot/src/main/java/com/xht/springboot/Entity/UserHome.java b/src/medicine/springboot/src/main/java/com/xht/springboot/Entity/UserHome.java index 7ba32cdd..ce66b17f 100644 --- a/src/medicine/springboot/src/main/java/com/xht/springboot/Entity/UserHome.java +++ b/src/medicine/springboot/src/main/java/com/xht/springboot/Entity/UserHome.java @@ -5,13 +5,14 @@ import lombok.Data; import lombok.ToString; import org.springframework.stereotype.Component; +import java.io.Serializable; import java.util.Date; import java.util.List; @Data @ToString @Component -public class UserHome { +public class UserHome implements Serializable { private int uid; //用户累计使用网站时间 diff --git a/src/medicine/springboot/src/main/java/com/xht/springboot/Entity/UserLogin.java b/src/medicine/springboot/src/main/java/com/xht/springboot/Entity/UserLogin.java index d79609e2..b392bf5a 100644 --- a/src/medicine/springboot/src/main/java/com/xht/springboot/Entity/UserLogin.java +++ b/src/medicine/springboot/src/main/java/com/xht/springboot/Entity/UserLogin.java @@ -6,10 +6,12 @@ import lombok.ToString; import org.apache.ibatis.type.Alias; import org.springframework.stereotype.Component; +import java.io.Serializable; + @Component @Data @ToString -public class UserLogin { +public class UserLogin implements Serializable { private int uid; private String uname; private String upassword; diff --git a/src/medicine/springboot/src/main/java/com/xht/springboot/Entity/UserReply.java b/src/medicine/springboot/src/main/java/com/xht/springboot/Entity/UserReply.java index c4747249..394854e1 100644 --- a/src/medicine/springboot/src/main/java/com/xht/springboot/Entity/UserReply.java +++ b/src/medicine/springboot/src/main/java/com/xht/springboot/Entity/UserReply.java @@ -5,10 +5,12 @@ import lombok.Data; import lombok.ToString; import org.springframework.stereotype.Component; +import java.io.Serializable; + @Component @Data @ToString -public class UserReply { +public class UserReply implements Serializable { private int replyid; private int commentid; diff --git a/src/medicine/springboot/src/main/java/com/xht/springboot/Entity/UserText.java b/src/medicine/springboot/src/main/java/com/xht/springboot/Entity/UserText.java index 3e839cd0..42ebaba3 100644 --- a/src/medicine/springboot/src/main/java/com/xht/springboot/Entity/UserText.java +++ b/src/medicine/springboot/src/main/java/com/xht/springboot/Entity/UserText.java @@ -5,13 +5,14 @@ import lombok.Data; import lombok.ToString; import org.springframework.stereotype.Component; +import java.io.Serializable; import java.util.Date; import java.util.List; @Data @ToString @Component -public class UserText { +public class UserText implements Serializable { private int textid; private int uid; diff --git a/src/medicine/springboot/src/main/java/com/xht/springboot/Service/PersonalHomeService.java b/src/medicine/springboot/src/main/java/com/xht/springboot/Service/PersonalHomeService.java index 77204a64..7ba777e2 100644 --- a/src/medicine/springboot/src/main/java/com/xht/springboot/Service/PersonalHomeService.java +++ b/src/medicine/springboot/src/main/java/com/xht/springboot/Service/PersonalHomeService.java @@ -5,6 +5,7 @@ import com.xht.springboot.Dao.PersonalHomeMapper; import com.xht.springboot.Entity.UserHome; import com.xht.springboot.Entity.UserText; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Service; import java.util.List; @@ -14,11 +15,14 @@ public class PersonalHomeService { @Autowired PersonalHomeMapper personalHomeMapper; + //获得用户主页数据 + @Cacheable(cacheNames = "userData",key = "#p0") public UserHome getUserHomeData(int uid){ return personalHomeMapper.findById(uid); } + @Cacheable(cacheNames = "userTxtByUid",key = "#p0") public List getUserTexts(int uid){ return personalHomeMapper.findTexts(uid); } diff --git a/src/medicine/springboot/src/main/java/com/xht/springboot/Service/WebHomeService.java b/src/medicine/springboot/src/main/java/com/xht/springboot/Service/WebHomeService.java index ab9f04e7..127d8ef3 100644 --- a/src/medicine/springboot/src/main/java/com/xht/springboot/Service/WebHomeService.java +++ b/src/medicine/springboot/src/main/java/com/xht/springboot/Service/WebHomeService.java @@ -6,6 +6,10 @@ import com.xht.springboot.Entity.UserComment; import com.xht.springboot.Entity.UserReply; import com.xht.springboot.Entity.UserText; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -15,28 +19,42 @@ import java.util.List; public class WebHomeService { @Autowired WebHomeMapper webHomeMapper; + @Autowired + RedisTemplate redisTemplate; + String userTxtCacheName = "userTxt::"; + String userCmtCacheName = "userCmt::"; + String userReplyCacheName = "userReply::"; //获得所有文章除了评论的回复 + @Cacheable(cacheNames = "userTxt&Cmt") public List getWebHomeData(){ return webHomeMapper.findAllTextAndComments(); } + @Cacheable(cacheNames = "userRepliesOfCmt",key = "#p0") public List getUserReplies(int commentid){ return webHomeMapper.findRepliesByCommentId(commentid); } + public boolean postUserText(UserText userText){ int rows=0; rows = webHomeMapper.insertUserText(userText); if(rows >= 1){ System.out.println("insert text OK "+rows); + System.out.println("textid "+userText.getTextid()); + + redisTemplate.opsForValue().set(userTxtCacheName+userText.getTextid(),userText);//写入缓存 return true; }else{ return false; } } + public boolean deleteUserText(UserText userText){ + redisTemplate.opsForValue().getAndDelete(userTxtCacheName+userText.getTextid());//先删除缓存中数据 + int rows=0; rows = webHomeMapper.deleteUserText(userText); if(rows >= 1){ @@ -47,7 +65,10 @@ public class WebHomeService { } } + public boolean updateUserText(UserText userText){ + redisTemplate.opsForValue().getAndDelete(userTxtCacheName+userText.getTextid());//先删除缓存中数据 + int rows=0; rows = webHomeMapper.updateUserText(userText); if(rows >= 1){ @@ -59,6 +80,7 @@ public class WebHomeService { } @Transactional + @Cacheable(cacheNames = "userFindTxt",key = "#p0") public List findUserText(String token){ List results = null; results = webHomeMapper.findOfTextContains(token);//查询文本中是否包含 @@ -74,6 +96,9 @@ public class WebHomeService { rows = webHomeMapper.insertUserComment(userComment); if(rows >= 1){ System.out.println("insert comment OK "+rows); + System.out.println("commentid "+userComment.getCommentid()); + + redisTemplate.opsForValue().set(userCmtCacheName+userComment.getCommentid(),userComment); return true; }else{ return false; @@ -81,6 +106,8 @@ public class WebHomeService { } public boolean deleteUserComment(UserComment userComment){ + redisTemplate.opsForValue().getAndDelete(userCmtCacheName+userComment.getCommentid()); + int rows=0; rows = webHomeMapper.deleteUserComment(userComment); if(rows >= 1){ @@ -92,6 +119,8 @@ public class WebHomeService { } public boolean updateUserComment(UserComment userComment){ + redisTemplate.opsForValue().getAndDelete(userCmtCacheName+userComment.getCommentid()); + int rows=0; rows = webHomeMapper.updateUserComment(userComment); if(rows >= 1){ @@ -112,6 +141,9 @@ public class WebHomeService { rows = webHomeMapper.insertUserReply(userReply); if(rows >= 1){ System.out.println("insert reply OK "+rows); + System.out.println("replyid "+userReply.getReplyid()); + + redisTemplate.opsForValue().set(userReplyCacheName+userReply.getReplyid(),userReply); return true; }else{ return false; @@ -119,6 +151,8 @@ public class WebHomeService { } public boolean deleteUserReply(UserReply userReply){ + redisTemplate.opsForValue().getAndDelete(userReplyCacheName+userReply.getReplyid()); + int rows=0; rows = webHomeMapper.deleteUserReply(userReply); if(rows >= 1){ @@ -130,6 +164,8 @@ public class WebHomeService { } public boolean updateUserReply(UserReply userReply){ + redisTemplate.opsForValue().getAndDelete(userReplyCacheName+userReply.getReplyid()); + int rows=0; rows = webHomeMapper.updateUserReply(userReply); if(rows >= 1){ @@ -140,7 +176,8 @@ public class WebHomeService { } } - public List selectUserReply(UserReply userReply){ - return webHomeMapper.selectUserReply(userReply); + @Cacheable(cacheNames = "userReply",key = "#p0") + public UserReply selectUserReply(int id){ + return webHomeMapper.selectUserReply(id); } } diff --git a/src/medicine/springboot/src/main/java/com/xht/springboot/SpringbootApplication.java b/src/medicine/springboot/src/main/java/com/xht/springboot/SpringbootApplication.java index 783d46ee..0c9057d7 100644 --- a/src/medicine/springboot/src/main/java/com/xht/springboot/SpringbootApplication.java +++ b/src/medicine/springboot/src/main/java/com/xht/springboot/SpringbootApplication.java @@ -3,10 +3,12 @@ package com.xht.springboot; import com.xht.springboot.pythonspider.PythonSpider; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cache.annotation.EnableCaching; import java.util.ArrayList; @SpringBootApplication +@EnableCaching public class SpringbootApplication { public static void main(String[] args) { diff --git a/src/medicine/springboot/src/main/resources/application.yaml b/src/medicine/springboot/src/main/resources/application.yaml index a1859131..bca3ad0e 100644 --- a/src/medicine/springboot/src/main/resources/application.yaml +++ b/src/medicine/springboot/src/main/resources/application.yaml @@ -1,13 +1,23 @@ -mybatis: - config-location: classpath:mybatis/db1/mybatis_config.xml - mapper-locations: - - classpath:mybatis/db1/*Mapper.xml - - spring: datasource: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://localhost:3306/medicine_web username: root password: molong + data: + redis: + password: molong + port: 6390 + host: 192.168.225.128 + lettuce: + pool: + max-wait: -1 + min-idle: 0 + max-active: 8 + max-idle: 8 + +mybatis: + config-location: classpath:mybatis/db1/mybatis_config.xml + mapper-locations: + - classpath:mybatis/db1/*Mapper.xml diff --git a/src/medicine/springboot/src/main/resources/mybatis/db1/WebHomeMapper.xml b/src/medicine/springboot/src/main/resources/mybatis/db1/WebHomeMapper.xml index 26e39461..7f5c5ed1 100644 --- a/src/medicine/springboot/src/main/resources/mybatis/db1/WebHomeMapper.xml +++ b/src/medicine/springboot/src/main/resources/mybatis/db1/WebHomeMapper.xml @@ -21,7 +21,7 @@ - select *,t.uid tuid,c.uid cuid from usertexts t,usercomments c where t.textid = c.textid @@ -33,7 +33,7 @@ - + insert into usertexts(uid,title,text,createtime) values(#{uid},#{title},#{text},#{createtime}) @@ -72,7 +72,7 @@ - + insert into usercomments(textid,uid,comment) values(#{textid},#{uid},#{comment}) @@ -97,7 +97,7 @@ - + insert into userreplies(commentid,text) values(#{commentid},#{text}) @@ -118,7 +118,7 @@ where replyid=#{replyid} - + select * from userreplies where replyid=#{int} \ No newline at end of file