├── .gitignore ├── .idea ├── .gitignore ├── codeStyles │ └── Project.xml ├── compiler.xml ├── dbnavigator.xml ├── encodings.xml ├── inspectionProfiles │ └── Project_Default.xml ├── libraries │ ├── Maven__ch_qos_logback_logback_classic_1_2_3.xml │ ├── Maven__ch_qos_logback_logback_core_1_2_3.xml │ ├── Maven__com_alibaba_fastjson_1_2_73.xml │ ├── Maven__com_auth0_java_jwt_3_4_0.xml │ ├── Maven__com_beust_jcommander_1_12.xml │ ├── Maven__com_carrotsearch_hppc_0_7_1.xml │ ├── Maven__com_fasterxml_classmate_1_5_1.xml │ ├── Maven__com_fasterxml_jackson_core_jackson_annotations_2_10_2.xml │ ├── Maven__com_fasterxml_jackson_core_jackson_core_2_10_2.xml │ ├── Maven__com_fasterxml_jackson_core_jackson_databind_2_10_2.xml │ ├── Maven__com_fasterxml_jackson_dataformat_jackson_dataformat_cbor_2_10_2.xml │ ├── Maven__com_fasterxml_jackson_dataformat_jackson_dataformat_smile_2_10_2.xml │ ├── Maven__com_fasterxml_jackson_dataformat_jackson_dataformat_yaml_2_10_2.xml │ ├── Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_10_2.xml │ ├── Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_10_2.xml │ ├── Maven__com_fasterxml_jackson_module_jackson_module_parameter_names_2_10_2.xml │ ├── Maven__com_github_ben_manes_caffeine_caffeine_2_7_0.xml │ ├── Maven__com_github_spullara_mustache_java_compiler_0_9_3.xml │ ├── Maven__com_google_code_gson_gson_2_8_6.xml │ ├── Maven__com_google_errorprone_error_prone_annotations_2_3_3.xml │ ├── Maven__com_jayway_jsonpath_json_path_2_4_0.xml │ ├── Maven__com_mchange_mchange_commons_java_0_2_15.xml │ ├── Maven__com_qiniu_qiniu_java_sdk_7_2_23.xml │ ├── Maven__com_squareup_okhttp3_okhttp_3_14_6.xml │ ├── Maven__com_squareup_okio_okio_1_17_2.xml │ ├── Maven__com_sun_mail_javax_mail_1_6_2.xml │ ├── Maven__com_tdunning_t_digest_3_2.xml │ ├── Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml │ ├── Maven__com_zaxxer_HikariCP_3_4_2.xml │ ├── Maven__commons_beanutils_commons_beanutils_1_9_3.xml │ ├── Maven__commons_codec_commons_codec_1_13.xml │ ├── Maven__commons_collections_commons_collections_3_2_2.xml │ ├── Maven__io_lettuce_lettuce_core_5_2_1_RELEASE.xml │ ├── Maven__io_netty_netty_buffer_4_1_45_Final.xml │ ├── Maven__io_netty_netty_codec_4_1_45_Final.xml │ ├── Maven__io_netty_netty_codec_http_4_1_45_Final.xml │ ├── Maven__io_netty_netty_common_4_1_45_Final.xml │ ├── Maven__io_netty_netty_handler_4_1_45_Final.xml │ ├── Maven__io_netty_netty_resolver_4_1_45_Final.xml │ ├── Maven__io_netty_netty_transport_4_1_45_Final.xml │ ├── Maven__io_projectreactor_reactor_core_3_3_2_RELEASE.xml │ ├── Maven__jakarta_activation_jakarta_activation_api_1_2_1.xml │ ├── Maven__jakarta_annotation_jakarta_annotation_api_1_3_5.xml │ ├── Maven__jakarta_validation_jakarta_validation_api_2_0_2.xml │ ├── Maven__jakarta_xml_bind_jakarta_xml_bind_api_2_3_2.xml │ ├── Maven__javax_activation_activation_1_1.xml │ ├── Maven__joda_time_joda_time_2_10_5.xml │ ├── Maven__junit_junit_4_12.xml │ ├── Maven__mysql_mysql_connector_java_8_0_19.xml │ ├── Maven__net_bytebuddy_byte_buddy_1_10_6.xml │ ├── Maven__net_bytebuddy_byte_buddy_agent_1_10_6.xml │ ├── Maven__net_minidev_accessors_smart_1_2.xml │ ├── Maven__net_minidev_json_smart_2_3.xml │ ├── Maven__net_sf_jopt_simple_jopt_simple_5_0_2.xml │ ├── Maven__org_apache_httpcomponents_httpasyncclient_4_1_4.xml │ ├── Maven__org_apache_httpcomponents_httpclient_4_5_10.xml │ ├── Maven__org_apache_httpcomponents_httpcore_4_4_13.xml │ ├── Maven__org_apache_httpcomponents_httpcore_nio_4_4_13.xml │ ├── Maven__org_apache_logging_log4j_log4j_api_2_12_1.xml │ ├── Maven__org_apache_logging_log4j_log4j_to_slf4j_2_12_1.xml │ ├── Maven__org_apache_lucene_lucene_analyzers_common_7_7_2.xml │ ├── Maven__org_apache_lucene_lucene_backward_codecs_7_7_2.xml │ ├── Maven__org_apache_lucene_lucene_core_7_7_2.xml │ ├── Maven__org_apache_lucene_lucene_grouping_7_7_2.xml │ ├── Maven__org_apache_lucene_lucene_highlighter_7_7_2.xml │ ├── Maven__org_apache_lucene_lucene_join_7_7_2.xml │ ├── Maven__org_apache_lucene_lucene_memory_7_7_2.xml │ ├── Maven__org_apache_lucene_lucene_misc_7_7_2.xml │ ├── Maven__org_apache_lucene_lucene_queries_7_7_2.xml │ ├── Maven__org_apache_lucene_lucene_queryparser_7_7_2.xml │ ├── Maven__org_apache_lucene_lucene_sandbox_7_7_2.xml │ ├── Maven__org_apache_lucene_lucene_spatial3d_7_7_2.xml │ ├── Maven__org_apache_lucene_lucene_spatial_7_7_2.xml │ ├── Maven__org_apache_lucene_lucene_spatial_extras_7_7_2.xml │ ├── Maven__org_apache_lucene_lucene_suggest_7_7_2.xml │ ├── Maven__org_apache_shiro_shiro_cache_1_4_1.xml │ ├── Maven__org_apache_shiro_shiro_config_core_1_4_1.xml │ ├── Maven__org_apache_shiro_shiro_config_ogdl_1_4_1.xml │ ├── Maven__org_apache_shiro_shiro_core_1_4_1.xml │ ├── Maven__org_apache_shiro_shiro_crypto_cipher_1_4_1.xml │ ├── Maven__org_apache_shiro_shiro_crypto_core_1_4_1.xml │ ├── Maven__org_apache_shiro_shiro_crypto_hash_1_4_1.xml │ ├── Maven__org_apache_shiro_shiro_event_1_4_1.xml │ ├── Maven__org_apache_shiro_shiro_lang_1_4_1.xml │ ├── Maven__org_apache_shiro_shiro_spring_1_4_1.xml │ ├── Maven__org_apache_shiro_shiro_web_1_4_1.xml │ ├── Maven__org_apache_tomcat_embed_tomcat_embed_core_9_0_30.xml │ ├── Maven__org_apache_tomcat_embed_tomcat_embed_el_9_0_30.xml │ ├── Maven__org_apache_tomcat_embed_tomcat_embed_websocket_9_0_30.xml │ ├── Maven__org_apiguardian_apiguardian_api_1_1_0.xml │ ├── Maven__org_assertj_assertj_core_3_13_2.xml │ ├── Maven__org_beanshell_bsh_2_0b4.xml │ ├── Maven__org_checkerframework_checker_qual_2_6_0.xml │ ├── Maven__org_elasticsearch_client_elasticsearch_rest_client_6_8_6.xml │ ├── Maven__org_elasticsearch_client_elasticsearch_rest_high_level_client_6_8_6.xml │ ├── Maven__org_elasticsearch_client_transport_6_8_6.xml │ ├── Maven__org_elasticsearch_elasticsearch_6_8_6.xml │ ├── Maven__org_elasticsearch_elasticsearch_cli_6_8_6.xml │ ├── Maven__org_elasticsearch_elasticsearch_core_6_8_6.xml │ ├── Maven__org_elasticsearch_elasticsearch_secure_sm_6_8_6.xml │ ├── Maven__org_elasticsearch_elasticsearch_ssl_config_6_8_6.xml │ ├── Maven__org_elasticsearch_elasticsearch_x_content_6_8_6.xml │ ├── Maven__org_elasticsearch_jna_4_5_1.xml │ ├── Maven__org_elasticsearch_plugin_aggs_matrix_stats_client_6_8_6.xml │ ├── Maven__org_elasticsearch_plugin_lang_mustache_client_6_8_6.xml │ ├── Maven__org_elasticsearch_plugin_parent_join_client_6_8_6.xml │ ├── Maven__org_elasticsearch_plugin_percolator_client_6_8_6.xml │ ├── Maven__org_elasticsearch_plugin_rank_eval_client_6_8_6.xml │ ├── Maven__org_elasticsearch_plugin_reindex_client_6_8_6.xml │ ├── Maven__org_elasticsearch_plugin_transport_netty4_client_6_8_6.xml │ ├── Maven__org_hamcrest_hamcrest_2_1.xml │ ├── Maven__org_hamcrest_hamcrest_core_2_1.xml │ ├── Maven__org_hdrhistogram_HdrHistogram_2_1_9.xml │ ├── Maven__org_hibernate_validator_hibernate_validator_6_0_18_Final.xml │ ├── Maven__org_jboss_logging_jboss_logging_3_4_1_Final.xml │ ├── Maven__org_junit_jupiter_junit_jupiter_5_5_2.xml │ ├── Maven__org_junit_jupiter_junit_jupiter_api_5_5_2.xml │ ├── Maven__org_junit_jupiter_junit_jupiter_engine_5_5_2.xml │ ├── Maven__org_junit_jupiter_junit_jupiter_params_5_5_2.xml │ ├── Maven__org_junit_platform_junit_platform_commons_1_5_2.xml │ ├── Maven__org_junit_platform_junit_platform_engine_1_5_2.xml │ ├── Maven__org_junit_vintage_junit_vintage_engine_5_5_2.xml │ ├── Maven__org_mockito_mockito_core_3_1_0.xml │ ├── Maven__org_mockito_mockito_junit_jupiter_3_1_0.xml │ ├── Maven__org_mybatis_mybatis_3_4_6.xml │ ├── Maven__org_mybatis_mybatis_spring_1_3_2.xml │ ├── Maven__org_mybatis_spring_boot_mybatis_spring_boot_autoconfigure_1_3_2.xml │ ├── Maven__org_mybatis_spring_boot_mybatis_spring_boot_starter_1_3_2.xml │ ├── Maven__org_objenesis_objenesis_2_6.xml │ ├── Maven__org_opentest4j_opentest4j_1_2_0.xml │ ├── Maven__org_ow2_asm_asm_5_0_4.xml │ ├── Maven__org_projectlombok_lombok_1_18_10.xml │ ├── Maven__org_quartz_scheduler_quartz_2_3_2.xml │ ├── Maven__org_reactivestreams_reactive_streams_1_0_3.xml │ ├── Maven__org_skyscreamer_jsonassert_1_5_0.xml │ ├── Maven__org_slf4j_jul_to_slf4j_1_7_30.xml │ ├── Maven__org_slf4j_slf4j_api_1_7_30.xml │ ├── Maven__org_springframework_boot_spring_boot_2_2_4_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_autoconfigure_2_2_4_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_devtools_2_2_4_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_2_2_4_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_data_elasticsearch_2_1_1_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_data_redis_2_2_4_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_jdbc_2_2_4_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_json_2_2_4_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_logging_2_2_4_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_mail_2_1_5_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_quartz_2_2_4_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_test_2_2_4_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_tomcat_2_2_4_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_validation_2_2_4_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_web_2_2_4_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_websocket_2_2_4_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_test_2_2_4_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_test_autoconfigure_2_2_4_RELEASE.xml │ ├── Maven__org_springframework_data_spring_data_commons_2_2_4_RELEASE.xml │ ├── Maven__org_springframework_data_spring_data_elasticsearch_3_2_4_RELEASE.xml │ ├── Maven__org_springframework_data_spring_data_keyvalue_2_2_4_RELEASE.xml │ ├── Maven__org_springframework_data_spring_data_redis_2_2_4_RELEASE.xml │ ├── Maven__org_springframework_spring_aop_5_2_3_RELEASE.xml │ ├── Maven__org_springframework_spring_beans_5_2_3_RELEASE.xml │ ├── Maven__org_springframework_spring_context_5_2_3_RELEASE.xml │ ├── Maven__org_springframework_spring_context_support_5_2_3_RELEASE.xml │ ├── Maven__org_springframework_spring_core_5_2_3_RELEASE.xml │ ├── Maven__org_springframework_spring_expression_5_2_3_RELEASE.xml │ ├── Maven__org_springframework_spring_jcl_5_2_3_RELEASE.xml │ ├── Maven__org_springframework_spring_jdbc_5_2_3_RELEASE.xml │ ├── Maven__org_springframework_spring_messaging_5_2_3_RELEASE.xml │ ├── Maven__org_springframework_spring_oxm_5_2_3_RELEASE.xml │ ├── Maven__org_springframework_spring_test_5_2_3_RELEASE.xml │ ├── Maven__org_springframework_spring_tx_5_2_3_RELEASE.xml │ ├── Maven__org_springframework_spring_web_5_2_3_RELEASE.xml │ ├── Maven__org_springframework_spring_webmvc_5_2_3_RELEASE.xml │ ├── Maven__org_springframework_spring_websocket_5_2_3_RELEASE.xml │ ├── Maven__org_testng_testng_6_2.xml │ ├── Maven__org_xmlunit_xmlunit_core_2_6_3.xml │ └── Maven__org_yaml_snakeyaml_1_25.xml ├── misc.xml ├── modules.xml ├── uiDesigner.xml └── vcs.xml ├── .mvn └── wrapper │ ├── MavenWrapperDownloader.java │ ├── maven-wrapper.jar │ └── maven-wrapper.properties ├── LICENSE ├── README.md ├── forum_server.iml ├── forum_server.sql ├── mvnw ├── mvnw.cmd ├── pom.xml └── src ├── main ├── java │ └── com │ │ └── ken │ │ └── forum_server │ │ ├── ForumServerApplication.java │ │ ├── annotation │ │ └── TokenFree.java │ │ ├── async │ │ ├── EmailTask.java │ │ ├── EsTask.java │ │ ├── EventHandler.java │ │ └── MessageTask.java │ │ ├── chat │ │ └── ChatEndpoint.java │ │ ├── common │ │ ├── GlobalExceptionHandler.java │ │ └── Result.java │ │ ├── config │ │ ├── MybatisConfig.java │ │ ├── QuartzConfig.java │ │ ├── RedisConfig.java │ │ ├── ShiroConfig.java │ │ ├── WebConfig.java │ │ └── WebSocketConfig.java │ │ ├── controller │ │ ├── AdminController.java │ │ ├── BaseController.java │ │ ├── CollectController.java │ │ ├── CommentController.java │ │ ├── DataController.java │ │ ├── FollowController.java │ │ ├── LikeController.java │ │ ├── MessageController.java │ │ ├── PostController.java │ │ ├── SearchController.java │ │ └── UserController.java │ │ ├── dao │ │ ├── CommentDao.java │ │ ├── MessageDao.java │ │ ├── PostDao.java │ │ ├── RoleDao.java │ │ └── UserDao.java │ │ ├── dto │ │ ├── ChatDto.java │ │ ├── CollectDto.java │ │ ├── CommentDto.java │ │ ├── DataDto.java │ │ ├── FollowDto.java │ │ ├── LetterDto.java │ │ ├── LikeDto.java │ │ ├── MessageDto.java │ │ ├── NewPassDto.java │ │ └── ReplyDto.java │ │ ├── es │ │ └── PostRepository.java │ │ ├── event │ │ ├── EventConsumer.java │ │ └── EventProducer.java │ │ ├── exception │ │ ├── CustomException.java │ │ ├── CustomExceptionCode.java │ │ └── ICustomExceptionCode.java │ │ ├── interceptor │ │ ├── DataInterceptor.java │ │ └── TokenInterceptor.java │ │ ├── pojo │ │ ├── Comment.java │ │ ├── Event.java │ │ ├── Message.java │ │ ├── Post.java │ │ ├── Role.java │ │ └── User.java │ │ ├── quartz │ │ └── PostScoreRefreshJob.java │ │ ├── service │ │ ├── CollectService.java │ │ ├── CommentService.java │ │ ├── DataService.java │ │ ├── ElasticSearchService.java │ │ ├── FollowService.java │ │ ├── LikeService.java │ │ ├── MessageService.java │ │ ├── PictureService.java │ │ ├── PostService.java │ │ ├── UserService.java │ │ └── impl │ │ │ ├── CollectServiceImpl.java │ │ │ ├── CommentServiceImpl.java │ │ │ ├── DataserviceImpl.java │ │ │ ├── ElasticSearchServiceImpl.java │ │ │ ├── FollowServiceImpl.java │ │ │ ├── LikeServiceImpl.java │ │ │ ├── MessageServiceImpl.java │ │ │ ├── PostServiceImpl.java │ │ │ └── UserServiceImpl.java │ │ ├── shiro │ │ ├── JWToken.java │ │ └── UserRealm.java │ │ ├── util │ │ ├── ConstantUtil.java │ │ ├── JsonUtil.java │ │ ├── JwtUtil.java │ │ ├── MD5Util.java │ │ ├── MailUtil.java │ │ └── RedisKeyUtil.java │ │ └── vo │ │ ├── CommentVo.java │ │ ├── LetterVo.java │ │ ├── MessageVo.java │ │ ├── MsgVo.java │ │ ├── PaginationVo.java │ │ ├── PostDetailVo.java │ │ ├── PostVo.java │ │ ├── ReplyVo.java │ │ ├── UploadData.java │ │ └── UserInfo.java └── resources │ ├── fake-application.yml │ └── mapper │ ├── message-mapper.xml │ └── user-mapper.xml └── test └── java └── com └── ken └── forum_server ├── EsTest.java ├── KafkaTest.java ├── MDTest.java └── MailTests.java /.gitignore: -------------------------------------------------------------------------------- 1 | avatar/ 2 | photo/ 3 | target/ 4 | **/resources/**/application.yml 5 | 6 | 7 | -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /workspace.xml -------------------------------------------------------------------------------- /.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 11 | 12 | 13 | 14 | 15 | 21 | 22 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | 21 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 36 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__ch_qos_logback_logback_classic_1_2_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__ch_qos_logback_logback_core_1_2_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_alibaba_fastjson_1_2_73.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_auth0_java_jwt_3_4_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_beust_jcommander_1_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_carrotsearch_hppc_0_7_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_fasterxml_classmate_1_5_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_10_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_10_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_10_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_fasterxml_jackson_dataformat_jackson_dataformat_cbor_2_10_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_fasterxml_jackson_dataformat_jackson_dataformat_smile_2_10_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_fasterxml_jackson_dataformat_jackson_dataformat_yaml_2_10_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_10_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_10_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_fasterxml_jackson_module_jackson_module_parameter_names_2_10_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_github_ben_manes_caffeine_caffeine_2_7_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_github_spullara_mustache_java_compiler_0_9_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_google_code_gson_gson_2_8_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_google_errorprone_error_prone_annotations_2_3_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_4_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_mchange_mchange_commons_java_0_2_15.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_qiniu_qiniu_java_sdk_7_2_23.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_squareup_okhttp3_okhttp_3_14_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_squareup_okio_okio_1_17_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_sun_mail_javax_mail_1_6_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_tdunning_t_digest_3_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_zaxxer_HikariCP_3_4_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_beanutils_commons_beanutils_1_9_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_codec_commons_codec_1_13.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_collections_commons_collections_3_2_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__io_lettuce_lettuce_core_5_2_1_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__io_netty_netty_buffer_4_1_45_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__io_netty_netty_codec_4_1_45_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__io_netty_netty_codec_http_4_1_45_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__io_netty_netty_common_4_1_45_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__io_netty_netty_handler_4_1_45_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__io_netty_netty_resolver_4_1_45_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__io_netty_netty_transport_4_1_45_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__io_projectreactor_reactor_core_3_3_2_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__jakarta_activation_jakarta_activation_api_1_2_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__jakarta_annotation_jakarta_annotation_api_1_3_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__jakarta_validation_jakarta_validation_api_2_0_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__jakarta_xml_bind_jakarta_xml_bind_api_2_3_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__javax_activation_activation_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__joda_time_joda_time_2_10_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__junit_junit_4_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__mysql_mysql_connector_java_8_0_19.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_10_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__net_bytebuddy_byte_buddy_agent_1_10_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__net_minidev_accessors_smart_1_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__net_minidev_json_smart_2_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__net_sf_jopt_simple_jopt_simple_5_0_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_httpcomponents_httpasyncclient_4_1_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_5_10.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_4_13.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_httpcomponents_httpcore_nio_4_4_13.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_logging_log4j_log4j_api_2_12_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_logging_log4j_log4j_to_slf4j_2_12_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_lucene_lucene_analyzers_common_7_7_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_lucene_lucene_backward_codecs_7_7_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_lucene_lucene_core_7_7_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_lucene_lucene_grouping_7_7_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_lucene_lucene_highlighter_7_7_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_lucene_lucene_join_7_7_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_lucene_lucene_memory_7_7_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_lucene_lucene_misc_7_7_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_lucene_lucene_queries_7_7_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_lucene_lucene_queryparser_7_7_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_lucene_lucene_sandbox_7_7_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_lucene_lucene_spatial3d_7_7_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_lucene_lucene_spatial_7_7_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_lucene_lucene_spatial_extras_7_7_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_lucene_lucene_suggest_7_7_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_shiro_shiro_cache_1_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_shiro_shiro_config_core_1_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_shiro_shiro_config_ogdl_1_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_shiro_shiro_core_1_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_shiro_shiro_crypto_cipher_1_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_shiro_shiro_crypto_core_1_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_shiro_shiro_crypto_hash_1_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_shiro_shiro_event_1_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_shiro_shiro_lang_1_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_shiro_shiro_spring_1_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_shiro_shiro_web_1_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_9_0_30.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_el_9_0_30.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_websocket_9_0_30.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apiguardian_apiguardian_api_1_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_assertj_assertj_core_3_13_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_beanshell_bsh_2_0b4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_checkerframework_checker_qual_2_6_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_elasticsearch_client_elasticsearch_rest_client_6_8_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_elasticsearch_client_elasticsearch_rest_high_level_client_6_8_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_elasticsearch_client_transport_6_8_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_elasticsearch_elasticsearch_6_8_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_elasticsearch_elasticsearch_cli_6_8_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_elasticsearch_elasticsearch_core_6_8_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_elasticsearch_elasticsearch_secure_sm_6_8_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_elasticsearch_elasticsearch_ssl_config_6_8_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_elasticsearch_elasticsearch_x_content_6_8_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_elasticsearch_jna_4_5_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_elasticsearch_plugin_aggs_matrix_stats_client_6_8_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_elasticsearch_plugin_lang_mustache_client_6_8_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_elasticsearch_plugin_parent_join_client_6_8_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_elasticsearch_plugin_percolator_client_6_8_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_elasticsearch_plugin_rank_eval_client_6_8_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_elasticsearch_plugin_reindex_client_6_8_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_elasticsearch_plugin_transport_netty4_client_6_8_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_hamcrest_hamcrest_2_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_hamcrest_hamcrest_core_2_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_hdrhistogram_HdrHistogram_2_1_9.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_hibernate_validator_hibernate_validator_6_0_18_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_4_1_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_5_5_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_api_5_5_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_engine_5_5_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_params_5_5_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_junit_platform_junit_platform_commons_1_5_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_junit_platform_junit_platform_engine_1_5_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_junit_vintage_junit_vintage_engine_5_5_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_mockito_mockito_core_3_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_mockito_mockito_junit_jupiter_3_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_mybatis_mybatis_3_4_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_mybatis_mybatis_spring_1_3_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_autoconfigure_1_3_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_starter_1_3_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_objenesis_objenesis_2_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_opentest4j_opentest4j_1_2_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_ow2_asm_asm_5_0_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_projectlombok_lombok_1_18_10.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_quartz_scheduler_quartz_2_3_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_reactivestreams_reactive_streams_1_0_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_skyscreamer_jsonassert_1_5_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_30.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_30.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_2_2_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_2_2_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_devtools_2_2_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_2_2_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_data_elasticsearch_2_1_1_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_data_redis_2_2_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_jdbc_2_2_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_json_2_2_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_2_2_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_mail_2_1_5_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_quartz_2_2_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_2_2_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_tomcat_2_2_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_validation_2_2_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_web_2_2_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_websocket_2_2_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_test_2_2_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_2_2_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_data_spring_data_commons_2_2_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_data_spring_data_elasticsearch_3_2_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_data_spring_data_keyvalue_2_2_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_data_spring_data_redis_2_2_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_aop_5_2_3_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_beans_5_2_3_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_context_5_2_3_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_context_support_5_2_3_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_core_5_2_3_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_expression_5_2_3_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_jcl_5_2_3_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_jdbc_5_2_3_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_messaging_5_2_3_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_oxm_5_2_3_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_test_5_2_3_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_tx_5_2_3_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_web_5_2_3_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_webmvc_5_2_3_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_websocket_5_2_3_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_testng_testng_6_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_xmlunit_xmlunit_core_2_6_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_yaml_snakeyaml_1_25.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenLoong/forum_server/64dbae0e58f8a55c1834cc72b47efdd0cb5625eb/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 warson.Loong 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/ForumServerApplication.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server; 2 | 3 | import org.mybatis.spring.annotation.MapperScan; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | import org.springframework.scheduling.annotation.EnableAsync; 7 | 8 | import javax.annotation.PostConstruct; 9 | 10 | /** 11 | * 启动项目条件: mysql 12 | * redis 13 | * elasticsearch 14 | * 15 | */ 16 | @EnableAsync 17 | @SpringBootApplication 18 | @MapperScan(basePackages = "com.ken.forum_server.dao") 19 | public class ForumServerApplication { 20 | 21 | @PostConstruct 22 | public void init() { 23 | // 解决netty启动冲突问题 24 | // see Netty4Utils.setAvailableProcessors() 25 | System.setProperty("es.set.netty.runtime.available.processors", "false"); 26 | } 27 | 28 | public static void main(String[] args) { 29 | SpringApplication.run(ForumServerApplication.class, args); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/annotation/TokenFree.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.annotation; 2 | 3 | import java.lang.annotation.*; 4 | 5 | /** 6 | * 带有此注解的方法无需token验证 7 | */ 8 | @Target({ElementType.METHOD}) 9 | @Retention(RetentionPolicy.RUNTIME) 10 | @Documented 11 | public @interface TokenFree { 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/async/EmailTask.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.async; 2 | 3 | import com.alibaba.fastjson.JSONObject; 4 | import com.ken.forum_server.pojo.Event; 5 | import com.ken.forum_server.pojo.User; 6 | import com.ken.forum_server.util.ConstantUtil; 7 | import com.ken.forum_server.util.MailUtil; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.context.annotation.Scope; 10 | import org.springframework.stereotype.Component; 11 | 12 | import javax.mail.MessagingException; 13 | import java.util.Map; 14 | 15 | /** 16 | * 发送邮件的线程 17 | */ 18 | @Component 19 | @Scope("prototype") 20 | public class EmailTask implements Runnable { 21 | 22 | private Event event; 23 | 24 | @Autowired 25 | private MailUtil mailUtil; 26 | 27 | public void setEvent(Event event){ 28 | this.event = event; 29 | } 30 | 31 | /** 32 | * 注册 33 | */ 34 | private void register() { 35 | Map data = event.getData(); 36 | User user = (User)data.get("user"); 37 | 38 | System.out.println(mailUtil); 39 | //发送邮件 40 | try { 41 | mailUtil.registerMail(user.getEmail(),"欢迎来到ken社区",user.getCode(),user.getUsername()); 42 | } catch (MessagingException e) { 43 | e.printStackTrace(); 44 | } 45 | } 46 | 47 | /** 48 | * 忘记密码 49 | */ 50 | private void forget() { 51 | Map data = event.getData(); 52 | User user = (User)data.get("user"); 53 | //发送邮件 54 | try { 55 | mailUtil.forgetMail(user.getEmail(),"忘记密码",user); 56 | } catch (MessagingException e) { 57 | e.printStackTrace(); 58 | } 59 | } 60 | 61 | 62 | @Override 63 | public void run() { 64 | if (ConstantUtil.TOPIC_REGISTER.equals(event.getTopic())){ 65 | register(); 66 | }else if (ConstantUtil.TOPIC_FORGET.equals(event.getTopic())){ 67 | forget(); 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/async/EventHandler.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.async; 2 | 3 | import com.ken.forum_server.pojo.Event; 4 | import com.ken.forum_server.util.ConstantUtil; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.context.ApplicationContext; 7 | import org.springframework.stereotype.Component; 8 | 9 | import java.util.HashSet; 10 | import java.util.Set; 11 | import java.util.concurrent.ExecutorService; 12 | import java.util.concurrent.Executors; 13 | 14 | /** 15 | * 异步处理任务 16 | */ 17 | @Component 18 | public class EventHandler { 19 | 20 | @Autowired 21 | private ApplicationContext applicationContext; 22 | 23 | private static ExecutorService executorService; 24 | 25 | private static Set messageTopics = new HashSet<>(); 26 | private static Set esTopics = new HashSet<>(); 27 | private static Set emailTopics = new HashSet<>(); 28 | 29 | static { 30 | executorService = Executors.newFixedThreadPool(4); 31 | //通知任务 32 | messageTopics.add(ConstantUtil.TOPIC_COMMENT); 33 | messageTopics.add(ConstantUtil.TOPIC_LIKE); 34 | messageTopics.add(ConstantUtil.TOPIC_FOLLOW); 35 | //操作es库的任务 36 | esTopics.add(ConstantUtil.TOPIC_PUBLISH); 37 | esTopics.add(ConstantUtil.TOPIC_DELETE); 38 | esTopics.add(ConstantUtil.TOPIC_RESET_ES); 39 | //发送邮件的任务 40 | emailTopics.add(ConstantUtil.TOPIC_REGISTER); 41 | emailTopics.add(ConstantUtil.TOPIC_FORGET); 42 | 43 | } 44 | 45 | public void handleTask(Event event){ 46 | if (messageTopics.contains(event.getTopic())){ 47 | //通知任务 48 | MessageTask task = applicationContext.getBean(MessageTask.class); 49 | task.setEvent(event); 50 | executorService.submit(task); 51 | }else if (esTopics.contains(event.getTopic())){ 52 | //有关es库的任务 53 | EsTask task = applicationContext.getBean(EsTask.class); 54 | task.setEvent(event); 55 | executorService.submit(task); 56 | }else if (emailTopics.contains(event.getTopic())){ 57 | //邮件任务 58 | EmailTask task = applicationContext.getBean(EmailTask.class); 59 | task.setEvent(event); 60 | executorService.execute(task); 61 | } 62 | } 63 | 64 | 65 | } 66 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/async/MessageTask.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.async; 2 | 3 | import com.alibaba.fastjson.JSONObject; 4 | import com.ken.forum_server.pojo.Event; 5 | import com.ken.forum_server.pojo.Message; 6 | import com.ken.forum_server.service.MessageService; 7 | import org.slf4j.Logger; 8 | import org.slf4j.LoggerFactory; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.context.annotation.Scope; 11 | import org.springframework.stereotype.Component; 12 | 13 | import java.util.Date; 14 | import java.util.HashMap; 15 | import java.util.Map; 16 | 17 | import static com.ken.forum_server.util.ConstantUtil.SYSTEM_USER_ID; 18 | 19 | /** 20 | * 发送通知的线程 21 | */ 22 | @Component 23 | @Scope("prototype") 24 | public class MessageTask implements Runnable { 25 | 26 | private Event event; 27 | private static final Logger logger = LoggerFactory.getLogger(MessageTask.class); 28 | 29 | @Autowired 30 | private MessageService messageService; 31 | 32 | public void setEvent(Event event){ 33 | this.event = event; 34 | } 35 | 36 | @Override 37 | public void run() { 38 | logger.info("任务主题:"+event.getTopic()); 39 | 40 | //自己不通知自己 41 | if (event.getUserId() == event.getEntityUserId())return; 42 | 43 | // 发送站内通知 44 | Message message = new Message(); 45 | message.setFromId(SYSTEM_USER_ID); 46 | message.setToId(event.getEntityUserId()); 47 | message.setConversationId(event.getTopic()); 48 | message.setCreateTime(new Date()); 49 | 50 | //通知内容 51 | Map content = new HashMap<>(); 52 | content.put("userId", event.getUserId()); 53 | content.put("entityType", event.getEntityType()); 54 | content.put("entityId", event.getEntityId()); 55 | 56 | //把data的数据放入消息内容 57 | if (!event.getData().isEmpty()) { 58 | for (Map.Entry entry : event.getData().entrySet()) { 59 | content.put(entry.getKey(), entry.getValue()); 60 | } 61 | } 62 | 63 | message.setContent(JSONObject.toJSONString(content)); 64 | //存入数据库 65 | messageService.addMessage(message); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/common/Result.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.common; 2 | 3 | import com.ken.forum_server.exception.CustomException; 4 | import com.ken.forum_server.exception.CustomExceptionCode; 5 | import lombok.Data; 6 | import lombok.NoArgsConstructor; 7 | 8 | import java.io.Serializable; 9 | 10 | @Data 11 | @NoArgsConstructor 12 | public class Result implements Serializable { 13 | 14 | private int code; 15 | private String msg; 16 | private T data; 17 | 18 | public Result(int code,String msg){ 19 | this.code = code; 20 | this.msg = msg; 21 | } 22 | 23 | public Result(int code,String msg,T data){ 24 | this.code = code; 25 | this.msg = msg; 26 | this.data = data; 27 | } 28 | 29 | public Result(CustomException e) { 30 | this.code = e.getCode(); 31 | this.msg = e.getMessage(); 32 | } 33 | 34 | public Result(CustomExceptionCode e) { 35 | this.code = e.getCode(); 36 | this.msg = e.getMessage(); 37 | } 38 | 39 | public Result success(String msg,T data){ 40 | return new Result(200,msg,data); 41 | } 42 | 43 | public Result success(String msg,String data){ 44 | return new Result(200,msg,data); 45 | } 46 | 47 | public Result success(String msg){ 48 | return new Result(200,msg); 49 | } 50 | 51 | public Result success(T data){ 52 | return new Result(200,"",data); 53 | } 54 | 55 | public Result success(Integer data){ 56 | return new Result(200,"",data); 57 | } 58 | 59 | public Result fail(String msg){ 60 | return new Result(105,msg); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/config/MybatisConfig.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.config; 2 | 3 | import org.mybatis.spring.annotation.MapperScan; 4 | import org.springframework.context.annotation.Configuration; 5 | 6 | @Configuration 7 | @MapperScan("com.ken.forum_server.dao") 8 | public class MybatisConfig { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/config/QuartzConfig.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.config; 2 | 3 | import com.ken.forum_server.quartz.PostScoreRefreshJob; 4 | import org.quartz.JobDataMap; 5 | import org.quartz.JobDetail; 6 | import org.springframework.context.annotation.Bean; 7 | import org.springframework.context.annotation.Configuration; 8 | import org.springframework.scheduling.quartz.JobDetailFactoryBean; 9 | import org.springframework.scheduling.quartz.SimpleTriggerFactoryBean; 10 | 11 | 12 | // 配置 -> 数据库 -> 调用 13 | //只在第一次读取配置,把配置写入数据库 14 | //后续只读取数据库来调度任务 15 | @Configuration 16 | public class QuartzConfig { 17 | 18 | // FactoryBean可简化Bean的实例化过程: 19 | // 1.通过FactoryBean封装Bean的实例化过程. 20 | // 2.将FactoryBean装配到Spring容器里. 21 | // 3.将FactoryBean注入给其他的Bean. 22 | // 4.该Bean得到的是FactoryBean所管理的对象实例. 23 | 24 | 25 | // 刷新帖子分数任务 26 | @Bean 27 | public JobDetailFactoryBean postScoreRefreshJobDetail() { 28 | JobDetailFactoryBean factoryBean = new JobDetailFactoryBean(); 29 | factoryBean.setJobClass(PostScoreRefreshJob.class); 30 | factoryBean.setName("postScoreRefreshJob"); 31 | factoryBean.setGroup("forumJobGroup"); 32 | factoryBean.setDurability(true); //任务长久保存 33 | factoryBean.setRequestsRecovery(true); //任务可恢复 34 | return factoryBean; 35 | } 36 | 37 | @Bean 38 | public SimpleTriggerFactoryBean postScoreRefreshTrigger(JobDetail postScoreRefreshJobDetail) { 39 | SimpleTriggerFactoryBean factoryBean = new SimpleTriggerFactoryBean(); 40 | factoryBean.setJobDetail(postScoreRefreshJobDetail); 41 | factoryBean.setName("postScoreRefreshTrigger"); 42 | factoryBean.setGroup("forumTriggerGroup"); 43 | //设置任务间隔时间:30分钟 44 | factoryBean.setRepeatInterval(1000 * 60 * 30); 45 | factoryBean.setJobDataMap(new JobDataMap()); 46 | return factoryBean; 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/config/RedisConfig.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.config; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.data.redis.connection.RedisConnectionFactory; 6 | import org.springframework.data.redis.core.RedisTemplate; 7 | import org.springframework.data.redis.serializer.RedisSerializer; 8 | 9 | @Configuration 10 | public class RedisConfig { 11 | 12 | @Bean 13 | public RedisTemplate redisTemplate(RedisConnectionFactory factory) { 14 | RedisTemplate template = new RedisTemplate<>(); 15 | template.setConnectionFactory(factory); 16 | 17 | // 设置key的序列化方式 18 | template.setKeySerializer(RedisSerializer.string()); 19 | // 设置value的序列化方式 20 | template.setValueSerializer(RedisSerializer.json()); 21 | // 设置hash的key的序列化方式 22 | template.setHashKeySerializer(RedisSerializer.string()); 23 | // 设置hash的value的序列化方式 24 | template.setHashValueSerializer(RedisSerializer.json()); 25 | 26 | template.afterPropertiesSet(); 27 | return template; 28 | } 29 | 30 | } -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/config/ShiroConfig.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.config; 2 | 3 | import com.ken.forum_server.shiro.UserRealm; 4 | import org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor; 5 | import org.apache.shiro.spring.web.ShiroFilterFactoryBean; 6 | import org.apache.shiro.web.mgt.DefaultWebSecurityManager; 7 | import org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator; 8 | import org.springframework.boot.web.servlet.FilterRegistrationBean; 9 | import org.springframework.context.annotation.Bean; 10 | import org.springframework.context.annotation.Configuration; 11 | 12 | import javax.servlet.DispatcherType; 13 | 14 | import static org.springframework.boot.web.servlet.DispatcherType.REQUEST; 15 | 16 | @Configuration 17 | public class ShiroConfig { 18 | 19 | 20 | //自定义Realm 21 | @Bean 22 | public UserRealm getUserRealm(){ 23 | UserRealm myRealm = new UserRealm(); 24 | return myRealm; 25 | } 26 | 27 | @Bean 28 | public DefaultWebSecurityManager getDefaultWebSecurityManager(UserRealm userRealm){ 29 | DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager(); 30 | securityManager.setRealm(userRealm); 31 | return securityManager; 32 | } 33 | 34 | @Bean 35 | public ShiroFilterFactoryBean shiroFilter(DefaultWebSecurityManager securityManager){ 36 | ShiroFilterFactoryBean filter = new ShiroFilterFactoryBean(); 37 | //过滤器就是shiro就行权限校验的核心,进行认证和授权是需要SecurityManager的 38 | filter.setSecurityManager(securityManager); 39 | return filter; 40 | } 41 | 42 | //配置对shiro注解的支持 43 | @Bean 44 | public DefaultAdvisorAutoProxyCreator getDefaultAdvisorAutoProxyCreator(){ 45 | DefaultAdvisorAutoProxyCreator autoProxyCreator = new DefaultAdvisorAutoProxyCreator(); 46 | autoProxyCreator.setProxyTargetClass(true); 47 | return autoProxyCreator; 48 | } 49 | 50 | //配置对shiro注解的支持 51 | @Bean 52 | public AuthorizationAttributeSourceAdvisor getAuthorizationAttributeSourceAdvisor(DefaultWebSecurityManager securityManager){ 53 | AuthorizationAttributeSourceAdvisor advisor = new AuthorizationAttributeSourceAdvisor(); 54 | advisor.setSecurityManager(securityManager); 55 | return advisor; 56 | } 57 | 58 | 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/config/WebSocketConfig.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.config; 2 | 3 | import com.ken.forum_server.chat.ChatEndpoint; 4 | import com.ken.forum_server.pojo.Message; 5 | import com.ken.forum_server.service.MessageService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.context.annotation.Bean; 8 | import org.springframework.context.annotation.Configuration; 9 | import org.springframework.web.socket.server.standard.ServerEndpointExporter; 10 | 11 | @Configuration 12 | public class WebSocketConfig { 13 | 14 | @Bean 15 | //注入ServerEndpointExporter,自动注册使用@ServerEndpoint注解的 16 | public ServerEndpointExporter serverEndpointExporter() { 17 | return new ServerEndpointExporter(); 18 | } 19 | 20 | //解决websocket注入问题 21 | @Autowired 22 | public void setMessageService(MessageService messageService){ 23 | ChatEndpoint.messageService = messageService; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/controller/AdminController.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.controller; 2 | 3 | import com.ken.forum_server.common.Result; 4 | import com.ken.forum_server.pojo.Event; 5 | import com.ken.forum_server.service.ElasticSearchService; 6 | import com.ken.forum_server.service.UserService; 7 | import org.apache.shiro.authz.annotation.RequiresRoles; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.web.bind.annotation.GetMapping; 10 | import org.springframework.web.bind.annotation.RequestMapping; 11 | import org.springframework.web.bind.annotation.RequestParam; 12 | import org.springframework.web.bind.annotation.RestController; 13 | 14 | import static com.ken.forum_server.util.ConstantUtil.TOPIC_RESET_ES; 15 | 16 | @RequestMapping("/admin") 17 | @RestController 18 | public class AdminController extends BaseController{ 19 | 20 | 21 | @Autowired 22 | private UserService userService; 23 | 24 | @Autowired 25 | private ElasticSearchService elasticSearchService; 26 | 27 | @RequiresRoles({"admin"}) 28 | @RequestMapping("/clearEs") 29 | public Result clearEs(){ 30 | elasticSearchService.deleteAll(); 31 | return new Result().success("es库清空成功"); 32 | } 33 | 34 | @RequiresRoles({"admin"}) 35 | @GetMapping("/deleteUser") 36 | public Result deleteUser(@RequestParam("uid") int uid ){ 37 | userService.deleteUserById(uid); 38 | return new Result().success("删除用户成功"); 39 | } 40 | 41 | @RequiresRoles({"admin"}) 42 | @GetMapping("/resetEs") 43 | public Result resetEs(@RequestParam("uid") int uid){ 44 | if (uid <= 0){ 45 | return new Result().fail("uid需大于0"); 46 | } 47 | 48 | //触发es重置事件 49 | Event event = new Event() 50 | .setTopic(TOPIC_RESET_ES) 51 | .setEntityId(uid); 52 | //用kafka异步处理 53 | // eventProducer.fireEvent(event); 54 | 55 | //用线程池异步处理 56 | // EventHandler 57 | return new Result().success("重置成功"); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/controller/BaseController.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.controller; 2 | 3 | import com.auth0.jwt.exceptions.AlgorithmMismatchException; 4 | import com.auth0.jwt.exceptions.InvalidClaimException; 5 | import com.auth0.jwt.exceptions.SignatureVerificationException; 6 | import com.auth0.jwt.exceptions.TokenExpiredException; 7 | import com.auth0.jwt.interfaces.Claim; 8 | import com.auth0.jwt.interfaces.DecodedJWT; 9 | import com.ken.forum_server.exception.CustomException; 10 | import com.ken.forum_server.exception.CustomExceptionCode; 11 | import com.ken.forum_server.shiro.JWToken; 12 | import com.ken.forum_server.util.JwtUtil; 13 | import org.apache.shiro.SecurityUtils; 14 | import org.springframework.beans.factory.annotation.Autowired; 15 | import org.springframework.stereotype.Controller; 16 | import org.springframework.util.StringUtils; 17 | 18 | import javax.servlet.http.HttpServletRequest; 19 | 20 | @Controller 21 | public class BaseController { 22 | 23 | @Autowired 24 | public HttpServletRequest request; 25 | 26 | public int getUserId(HttpServletRequest request){ 27 | String token = request.getHeader(JwtUtil.HEADER_TOKEN_KEY); 28 | return Integer.parseInt(JwtUtil.getToken(token).getClaim("id").asString()); 29 | } 30 | 31 | public String getUsername(){ 32 | String token = request.getHeader(JwtUtil.HEADER_TOKEN_KEY); 33 | return JwtUtil.getToken(token).getClaim("username").asString(); 34 | } 35 | 36 | public boolean isLogin(HttpServletRequest request){ 37 | //获取请求头里的token 38 | String token = request.getHeader(JwtUtil.HEADER_TOKEN_KEY); 39 | 40 | if (StringUtils.isEmpty(token)){ 41 | return false; 42 | } 43 | 44 | //验证token 45 | try { 46 | JwtUtil.verify(token); 47 | }catch (Exception e){ 48 | return false; 49 | } 50 | return true; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/dao/CommentDao.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.dao; 2 | 3 | import com.ken.forum_server.pojo.Comment; 4 | import org.apache.ibatis.annotations.*; 5 | import org.springframework.stereotype.Repository; 6 | 7 | import java.util.List; 8 | 9 | @Repository 10 | public interface CommentDao { 11 | 12 | @Select("select id, user_id, entity_type, entity_id, target_id, content, status, create_time from comment " + 13 | " where status = 0 " + 14 | " and entity_type = #{entityType}" + 15 | " and entity_id = #{entityId}" + 16 | " order by create_time asc" + 17 | " limit #{offset}, #{limit}") 18 | @Results(id = "comment",value = { 19 | @Result(property = "id",column = "id"), 20 | @Result(property = "userId",column = "user_id"), 21 | @Result(property = "entityType",column = "entity_type"), 22 | @Result(property = "entityId",column = "entity_id"), 23 | @Result(property = "targetId",column = "target_id"), 24 | @Result(property = "createTime",column = "create_time") 25 | }) 26 | List selectCommentsByEntity(int entityType, int entityId, int offset, int limit); 27 | 28 | @Select("select count(id)" + 29 | " from comment" + 30 | " where status = 0" + 31 | " and entity_type = #{entityType}" + 32 | " and entity_id = #{entityId}") 33 | int selectCountByEntity(int entityType, int entityId); 34 | 35 | 36 | @Insert("insert into comment (user_id,entity_type,entity_id,target_id,content,status,create_time)"+ 37 | " values(#{userId},#{entityType},#{entityId},#{targetId},#{content},#{status},#{createTime})") 38 | int insertComment(Comment comment); 39 | 40 | /** 41 | * 根据id查询评论 42 | * @param entityId 43 | * @return 44 | */ 45 | @Select("select * from comment where id = #{entityId}") 46 | @ResultMap("comment") 47 | Comment findCommentById(int entityId); 48 | 49 | /** 50 | * 查找评论的内容 51 | * @param entityType 52 | * @param entityId 53 | * @return 54 | */ 55 | @Select("select content from comment where = #{entityId} and") 56 | @ResultMap("comment") 57 | String findCommentByIdAndType(int entityType, int entityId); 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/dao/RoleDao.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.dao; 2 | 3 | import org.apache.ibatis.annotations.Select; 4 | import org.springframework.stereotype.Repository; 5 | 6 | import java.util.Set; 7 | 8 | @Repository 9 | public interface RoleDao { 10 | 11 | @Select("select r.name from role r, user u where u.id = #{id} and r.id = u.rid ") 12 | Set queryRoleNamesByUserId(int id); 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/dao/UserDao.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.dao; 2 | 3 | import com.ken.forum_server.pojo.User; 4 | import org.apache.ibatis.annotations.*; 5 | import org.springframework.stereotype.Repository; 6 | 7 | import java.util.List; 8 | 9 | @Repository 10 | public interface UserDao { 11 | 12 | @Select("select * from user where username = #{username} ") 13 | User findUserByUsername(String username); 14 | 15 | @Insert("insert into user (username,password,email,gender,create_time,state,code,avatar) values(#{username},#{password},#{email},#{gender},#{createTime},#{state},#{code},#{avatar})") 16 | void addUser(User user); 17 | 18 | @Select("select id , username , gender , create_time , avatar , state , rid from user where id = #{id} ") 19 | @Results(id = "user",value = { 20 | @Result(property = "id",column = "id"), 21 | @Result(property = "createTime",column = "create_time") 22 | }) 23 | User findUserById(Integer id); 24 | 25 | @Select("select id,username,email from user where email = #{email} ") 26 | @ResultMap("user") 27 | User findUserByEmail(String email); 28 | 29 | @Update("update user set state = 1 where id = #{id}") 30 | void activeUser(int id); 31 | 32 | @Update("update user set avatar = #{s} where id = #{userId}") 33 | void upadteAvatar(int userId, String s); 34 | 35 | @Select("select * from user where username = #{toName} ") 36 | User findUserByName(String toName); 37 | 38 | @Update("update user set state = 0 , code = #{code} where id = #{id}") 39 | void deleteUserById(int uid , String code); 40 | 41 | @Update("update user set password = #{password} where id = #{id}") 42 | void updatePassword(User user); 43 | 44 | @Select("select password from user where id = #{userId} ") 45 | String getPasswordById(int userId); 46 | 47 | List findUserByIds(@Param("ids") List ids); 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/dto/ChatDto.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.dto; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class ChatDto { 7 | private int fromId; 8 | private int toId; 9 | private String content; 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/dto/CollectDto.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.dto; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class CollectDto { 7 | 8 | private int entityId;//被收藏的文章ID 9 | private int entityUserId; //被收藏的文章作者ID 10 | 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/dto/CommentDto.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.dto; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class CommentDto { 7 | private int pid; 8 | private int currentPage = 1; 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/dto/DataDto.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.dto; 2 | 3 | import lombok.Data; 4 | import org.springframework.format.annotation.DateTimeFormat; 5 | 6 | import java.util.Date; 7 | 8 | @Data 9 | public class DataDto { 10 | 11 | @DateTimeFormat(pattern = "yyyy-MM-dd") 12 | private Date start; 13 | @DateTimeFormat(pattern = "yyyy-MM-dd") 14 | private Date end; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/dto/FollowDto.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.dto; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class FollowDto { 7 | private int entityType; 8 | private int entityId; 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/dto/LetterDto.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.dto; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class LetterDto { 7 | private String toName; 8 | private String content; 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/dto/LikeDto.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.dto; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class LikeDto { 7 | 8 | private int entityType; //被点赞实体的类型 1-文章 2-评论 9 | private int entityId; //被点赞实体的ID 10 | private int entityUserId; //被点赞人的ID 11 | //冗余属性 12 | private int postId; 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/dto/MessageDto.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.dto; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.Date; 6 | 7 | @Data 8 | public class MessageDto { 9 | private String fromId; 10 | private String toId; 11 | private String content; 12 | private Date createTime; 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/dto/NewPassDto.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.dto; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class NewPassDto { 7 | private String oldpass; 8 | private String pass; 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/dto/ReplyDto.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.dto; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class ReplyDto { 7 | private Integer replyId ; 8 | private Integer replyUid ; 9 | private String replyContent; 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/es/PostRepository.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.es; 2 | 3 | import com.ken.forum_server.pojo.Post; 4 | import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; 5 | import org.springframework.stereotype.Repository; 6 | 7 | @Repository 8 | public interface PostRepository extends ElasticsearchRepository { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/event/EventProducer.java: -------------------------------------------------------------------------------- 1 | //package com.ken.forum_server.event; 2 | // 3 | //import com.alibaba.fastjson.JSONObject; 4 | //import com.ken.forum_server.pojo.Event; 5 | //import org.springframework.beans.factory.annotation.Autowired; 6 | //import org.springframework.kafka.core.KafkaTemplate; 7 | //import org.springframework.stereotype.Component; 8 | // 9 | //@Component 10 | //public class EventProducer { 11 | // 12 | // @Autowired 13 | // private KafkaTemplate kafkaTemplate; 14 | // 15 | // // 处理事件 16 | // public void fireEvent(Event event) { 17 | // // 将事件发布到指定的主题 18 | // kafkaTemplate.send(event.getTopic(), JSONObject.toJSONString(event)); 19 | // } 20 | // 21 | //} 22 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/exception/CustomException.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.exception; 2 | 3 | public class CustomException extends RuntimeException { 4 | 5 | private String message; 6 | private Integer code ; 7 | 8 | public CustomException(final ICustomExceptionCode customExceptionCode) { 9 | this.code = customExceptionCode.getCode(); 10 | this.message = customExceptionCode.getMessage(); 11 | } 12 | 13 | public CustomException(String message) { 14 | super(message); 15 | this.code = 1; 16 | } 17 | 18 | @Override 19 | public String getMessage() { 20 | return message; 21 | } 22 | 23 | public Integer getCode() { 24 | return code; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/exception/CustomExceptionCode.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.exception; 2 | 3 | public enum CustomExceptionCode implements ICustomExceptionCode { 4 | 5 | SYSTEM_ERROR(100,"系统故障,请稍后再试..."), 6 | TOKEN_ERROR(201,"你的账户信息有问题,请重新登录"), 7 | TOKNE_EXPIRED(202,"你的令牌已过期,请重新登录"), 8 | PATH_ERROR(301,"你放问的页面不存在"), 9 | COMMENT_ERROR(302,"评论内容不可为空"), 10 | USER_NOT_EXIST(303,"用户不存在"), 11 | SEND_REPEAT(304,"不可以发给自己私信!"), 12 | PERMISSION_ERROR(305,"没有权限进行此操作!") 13 | ; 14 | 15 | private final int code; 16 | private final String message; 17 | 18 | CustomExceptionCode(int code , String message){ 19 | this.code = code; 20 | this.message = message; 21 | } 22 | 23 | @Override 24 | public Integer getCode() { 25 | return code; 26 | } 27 | 28 | @Override 29 | public String getMessage() { 30 | return message; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/exception/ICustomExceptionCode.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.exception; 2 | 3 | public interface ICustomExceptionCode { 4 | 5 | Integer getCode(); 6 | String getMessage(); 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/interceptor/DataInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.interceptor; 2 | 3 | import com.ken.forum_server.controller.BaseController; 4 | import com.ken.forum_server.pojo.User; 5 | import com.ken.forum_server.service.DataService; 6 | import com.ken.forum_server.service.UserService; 7 | import com.ken.forum_server.util.JwtUtil; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Component; 10 | import org.springframework.web.servlet.HandlerInterceptor; 11 | 12 | import javax.servlet.http.HttpServletRequest; 13 | import javax.servlet.http.HttpServletResponse; 14 | 15 | @Component 16 | public class DataInterceptor implements HandlerInterceptor { 17 | 18 | @Autowired 19 | private DataService dataService; 20 | @Autowired 21 | private UserService userService; 22 | 23 | @Override 24 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { 25 | 26 | // 统计UV 27 | String ip = request.getRemoteHost(); 28 | dataService.recordUV(ip); 29 | 30 | // 统计DAU 31 | String token = request.getHeader(JwtUtil.HEADER_TOKEN_KEY); 32 | if (token != null && !"null".equals(token)){ 33 | int uid = Integer.parseInt(JwtUtil.getToken(token).getClaim("id").asString()); 34 | User user = userService.findUserById(uid); 35 | dataService.recordDAU(user.getId()); 36 | } 37 | 38 | return true; 39 | 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/interceptor/TokenInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.interceptor; 2 | 3 | import com.ken.forum_server.annotation.TokenFree; 4 | import com.ken.forum_server.exception.CustomException; 5 | import com.ken.forum_server.shiro.JWToken; 6 | import com.ken.forum_server.util.JwtUtil; 7 | import org.apache.shiro.SecurityUtils; 8 | import org.springframework.util.StringUtils; 9 | import org.springframework.web.method.HandlerMethod; 10 | import org.springframework.web.servlet.HandlerInterceptor; 11 | 12 | import javax.servlet.http.HttpServletRequest; 13 | import javax.servlet.http.HttpServletResponse; 14 | 15 | /** 16 | * 拦截器,检查被访问资源是否需要验证token 17 | */ 18 | public class TokenInterceptor implements HandlerInterceptor { 19 | 20 | /** 21 | * @param request 22 | * @param response 23 | * @param handler 24 | * @return 25 | * @throws CustomException 26 | * @throws Exception 27 | */ 28 | @Override 29 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) 30 | throws CustomException { 31 | 32 | //访问头像是 ResourceHttpRequestHandler,故会被直接放行 33 | if (handler instanceof HandlerMethod) { 34 | HandlerMethod handlerMethod = (HandlerMethod) handler; 35 | System.out.println("拦截了 : " + ((HandlerMethod) handler).getMethod().getName()); 36 | TokenFree tokenFree = handlerMethod.getMethodAnnotation(TokenFree.class); 37 | //无需token验证,直接放行 38 | if (tokenFree != null) { 39 | return true; 40 | } 41 | 42 | //获取请求头里的token 43 | String token = request.getHeader(JwtUtil.HEADER_TOKEN_KEY); 44 | 45 | if (StringUtils.isEmpty(token)) { 46 | throw new CustomException("请先登录"); 47 | } 48 | //交给shiro验证token是否正确 49 | try { 50 | SecurityUtils.getSubject().login(new JWToken(token)); 51 | } catch (CustomException e) { 52 | throw e; 53 | } 54 | 55 | return true; 56 | } 57 | 58 | return true; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/pojo/Comment.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.pojo; 2 | 3 | import com.fasterxml.jackson.annotation.JsonFormat; 4 | import lombok.Data; 5 | 6 | import java.io.Serializable; 7 | import java.util.Date; 8 | 9 | @Data 10 | public class Comment implements Serializable { 11 | 12 | private int id; 13 | private int userId; 14 | private int entityType; //被评论实体的类型 1-帖子 2-评论 15 | private int entityId; 16 | private int targetId; 17 | private String content; 18 | private int status; 19 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") 20 | private Date createTime; 21 | private long likeCount; 22 | private int likeStatus; 23 | 24 | private int postId;//冗余属性,方便通知而已 25 | 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/pojo/Event.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.pojo; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.HashMap; 6 | import java.util.Map; 7 | 8 | 9 | public class Event { 10 | 11 | private String topic;//通知主题 12 | private int userId;//通知触发人ID 13 | private int entityType;//通知类型:点赞、评论、关注 14 | private int entityId;//通知的实体ID,如被点赞的的帖子ID 15 | private int entityUserId;//被通知人ID 16 | private Map data = new HashMap<>(); 17 | 18 | public String getTopic() { 19 | return topic; 20 | } 21 | 22 | public Event setTopic(String topic) { 23 | this.topic = topic; 24 | return this; 25 | } 26 | 27 | public int getUserId() { 28 | return userId; 29 | } 30 | 31 | public Event setUserId(int userId) { 32 | this.userId = userId; 33 | return this; 34 | } 35 | 36 | public int getEntityType() { 37 | return entityType; 38 | } 39 | 40 | public Event setEntityType(int entityType) { 41 | this.entityType = entityType; 42 | return this; 43 | } 44 | 45 | public int getEntityId() { 46 | return entityId; 47 | } 48 | 49 | public Event setEntityId(int entityId) { 50 | this.entityId = entityId; 51 | return this; 52 | } 53 | 54 | public int getEntityUserId() { 55 | return entityUserId; 56 | } 57 | 58 | public Event setEntityUserId(int entityUserId) { 59 | this.entityUserId = entityUserId; 60 | return this; 61 | } 62 | 63 | public Map getData() { 64 | return data; 65 | } 66 | 67 | public Event setData(String key, Object value) { 68 | this.data.put(key, value); 69 | return this; 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/pojo/Message.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.pojo; 2 | 3 | import com.fasterxml.jackson.annotation.JsonFormat; 4 | import lombok.Data; 5 | 6 | import java.util.Date; 7 | 8 | @Data 9 | public class Message { 10 | 11 | private int id; 12 | private int fromId; 13 | private int toId; 14 | private String conversationId; 15 | private String content; 16 | private int status; //消息状态 0-未读 1-已读 17 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") 18 | private Date createTime; 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/pojo/Post.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.pojo; 2 | 3 | import lombok.Data; 4 | import org.springframework.data.annotation.Id; 5 | import org.springframework.data.elasticsearch.annotations.Document; 6 | import org.springframework.data.elasticsearch.annotations.Field; 7 | import org.springframework.data.elasticsearch.annotations.FieldType; 8 | 9 | import java.io.Serializable; 10 | import java.util.Date; 11 | 12 | 13 | @Data 14 | @Document(indexName = "post", type = "_doc", shards = 6, replicas = 3) //建立索引 15 | public class Post implements Serializable { 16 | @Id 17 | private Integer id; 18 | 19 | @Field(type = FieldType.Integer) 20 | private Integer userId; 21 | 22 | @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_smart") 23 | private String title; 24 | 25 | @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_smart") 26 | private String content; 27 | 28 | @Field(type = FieldType.Integer) 29 | private int type; 30 | 31 | @Field(type = FieldType.Integer) 32 | private int tag; 33 | 34 | @Field(type = FieldType.Date) 35 | // @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") 36 | // JsonFormat注解会使es的Field转换不了(它是需要整数的,format后会变成字符串?) 37 | // private LocalDateTime createTime; 38 | private Date createTime; 39 | 40 | private String createTimeStr; 41 | 42 | @Field(type = FieldType.Integer) 43 | private int commentCount; 44 | 45 | @Field(type = FieldType.Integer) 46 | private long likeCount; 47 | 48 | @Field(type = FieldType.Integer) 49 | private long collectCount; 50 | 51 | @Field(type = FieldType.Double) 52 | private double score; 53 | 54 | @Field(type = FieldType.Integer) 55 | private int status; 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/pojo/Role.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.pojo; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class Role { 7 | private int id; 8 | private String name; 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/pojo/User.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.pojo; 2 | 3 | import com.fasterxml.jackson.annotation.JsonFormat; 4 | import lombok.Data; 5 | 6 | import java.io.Serializable; 7 | import java.util.Date; 8 | 9 | @Data 10 | public class User implements Serializable { 11 | private Integer id; 12 | private String username; 13 | private String password; 14 | private String avatar; 15 | private String email; 16 | private Integer gender; // 0代表男 1代表女 17 | @JsonFormat(pattern = "yyyy-MM-dd") 18 | private Date createTime; 19 | private String code; //激活码 20 | private int state; //状态 0代表未激活 1代表已激活 21 | 22 | public Integer getId() { 23 | return id; 24 | } 25 | 26 | public void setId(Integer id) { 27 | this.id = id; 28 | } 29 | 30 | public String getUsername() { 31 | return username; 32 | } 33 | 34 | public void setUsername(String username) { 35 | this.username = username; 36 | } 37 | 38 | public String getPassword() { 39 | return password; 40 | } 41 | 42 | public void setPassword(String password) { 43 | this.password = password; 44 | } 45 | 46 | public String getAvatar() { 47 | return avatar; 48 | } 49 | 50 | public void setAvatar(String avatar) { 51 | this.avatar = avatar; 52 | } 53 | 54 | public String getEmail() { 55 | return email; 56 | } 57 | 58 | public void setEmail(String email) { 59 | this.email = email; 60 | } 61 | 62 | public Integer getGender() { 63 | return gender; 64 | } 65 | 66 | public void setGender(Integer gender) { 67 | this.gender = gender; 68 | } 69 | 70 | public Date getCreateTime() { 71 | return createTime; 72 | } 73 | 74 | public void setCreateTime(Date createTime) { 75 | this.createTime = createTime; 76 | } 77 | 78 | public String getCode() { 79 | return code; 80 | } 81 | 82 | public void setCode(String code) { 83 | this.code = code; 84 | } 85 | 86 | public int getState() { 87 | return state; 88 | } 89 | 90 | public void setState(int state) { 91 | this.state = state; 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/service/CollectService.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.service; 2 | 3 | import com.ken.forum_server.util.RedisKeyUtil; 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | public interface CollectService { 9 | 10 | /** 11 | * 收藏方法 12 | * @param userId:收藏人ID 13 | * @param entityId:实体ID 14 | * @param entityUserId:被收藏人ID 15 | */ 16 | void collect(int userId,int entityId, int entityUserId); 17 | 18 | void unCollect(int userId,int entityId, int entityUserId); 19 | 20 | //查询某文章被收藏的数量 21 | long findEntityCollectCount(int entityId) ; 22 | 23 | //查询用户收藏的文章数量 24 | long findUserCollectCount(int uid) ; 25 | 26 | // 查询某人对某实体的收藏状态 27 | int findEntityCollectStatus(int userId, int pid); 28 | 29 | //查询用户收藏的文章 30 | List> findCollections(int userId, int offset, int limit); 31 | 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/service/CommentService.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.service; 2 | 3 | import com.ken.forum_server.pojo.Comment; 4 | 5 | import java.util.List; 6 | 7 | public interface CommentService { 8 | 9 | public List findCommentsByEntity(int entityType, int entityId, int offset, int limit); 10 | 11 | public int findCommentCount(int entityType, int entityId) ; 12 | 13 | public int addComment(Comment comment); 14 | 15 | Comment findCommentById(int entityId); 16 | 17 | String findCommentByIdAndType(int entityType, int entityId); 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/service/DataService.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.service; 2 | 3 | import java.util.Date; 4 | 5 | public interface DataService { 6 | 7 | // 将指定的IP计入UV 8 | void recordUV(String ip) ; 9 | 10 | // 统计指定日期范围内的UV 11 | long calculateUV(Date start, Date end) ; 12 | 13 | // 将指定用户计入DAU 14 | void recordDAU(int userId) ; 15 | 16 | // 统计指定日期范围内的DAU 17 | long calculateDAU(Date start, Date end) ; 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/service/ElasticSearchService.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.service; 2 | 3 | import com.ken.forum_server.pojo.Post; 4 | import org.springframework.data.domain.Page; 5 | 6 | import java.util.List; 7 | 8 | public interface ElasticSearchService { 9 | 10 | public void savePost(Post post); 11 | 12 | public void deletePost(int id); 13 | 14 | public Page searchPost(String keyword, int current, int limit) ; 15 | 16 | void deleteAll(); 17 | 18 | void saveAllPost(List posts); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/service/FollowService.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.service; 2 | 3 | import org.springframework.dao.DataAccessException; 4 | import org.springframework.data.redis.core.RedisOperations; 5 | import org.springframework.data.redis.core.SessionCallback; 6 | 7 | import java.util.*; 8 | 9 | public interface FollowService { 10 | 11 | public void follow(int userId, int entityType, int entityId) ; 12 | 13 | public void unfollow(int userId, int entityType, int entityId); 14 | 15 | // 查询关注的实体的数量 16 | public long findFolloweeCount(int userId, int entityType) ; 17 | 18 | // 查询实体的粉丝的数量 19 | public long findFollowerCount(int entityType, int entityId) ; 20 | 21 | // 查询当前用户是否已关注该实体 22 | public boolean hasFollowed(int userId, int entityType, int entityId) ; 23 | 24 | 25 | // 查询某用户关注的人 26 | public List> findFollowees(int userId, int offset, int limit) ; 27 | 28 | // 查询某用户的粉丝 29 | public List> findFollowers(int userId, int offset, int limit) ; 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/service/LikeService.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.service; 2 | 3 | public interface LikeService { 4 | 5 | // 点赞 6 | /** 7 | * 8 | * @param userId:点赞人ID 9 | * @param entityType:点赞类型:1是帖子,2是评论 10 | * @param entityId:被点赞实体ID 11 | * @param entityUserId:被点赞实体所属人ID 12 | */ 13 | public void like(int userId, int entityType, int entityId , int entityUserId); 14 | 15 | // 查询某实体点赞的数量 16 | public long findEntityLikeCount(int entityType, int entityId); 17 | 18 | // 查询某人对某实体的点赞状态 19 | public int findEntityLikeStatus(int userId, int entityType, int entityId); 20 | 21 | // 查询某个用户获得的赞 22 | public int findUserLikeCount(int userId) ; 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/service/MessageService.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.service; 2 | 3 | import com.ken.forum_server.pojo.Message; 4 | 5 | import java.util.List; 6 | import java.util.Set; 7 | 8 | public interface MessageService { 9 | 10 | public List findConversations(int userId, int offset, int limit); 11 | 12 | public int findConversationCount(int userId); 13 | 14 | public List findLetters(String conversationId, int offset, int limit); 15 | 16 | public int findLetterCount(String conversationId); 17 | 18 | public int findLetterUnreadCount(int userId, String conversationId); 19 | 20 | public int findLetterUnreadCount(int userId); 21 | 22 | //添加消息 23 | public int addMessage(Message message); 24 | 25 | //读消息 26 | public int readMessage(List ids); 27 | 28 | public Message findLatestNotice(int userId, String topic); 29 | 30 | public int findNoticeCount(int userId, String topic); 31 | 32 | public int findNoticeUnreadCount(int userId, String topic); 33 | 34 | public List findNotices(int userId, String topic, int offset, int limit) ; 35 | 36 | List findAllMessage(Integer id, String topicComment, int offset, int limit); 37 | 38 | Set findChatToMeIds(int userId); 39 | 40 | /** 41 | * 查找聊天记录 42 | * @param userId 43 | * @param currentId 44 | * @return 45 | */ 46 | List findChatList(int userId, int currentId); 47 | 48 | /** 49 | * 查询我向对方发过消息的用户ids 50 | * @param userId 51 | * @return 52 | */ 53 | Set findIChatToids(int userId); 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/service/PictureService.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.service; 2 | 3 | import java.util.List; 4 | 5 | public interface PictureService { 6 | 7 | 8 | void addPicture(int pid, String fileName); 9 | 10 | List findByPid(Integer id); 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/service/PostService.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.service; 2 | 3 | import com.ken.forum_server.common.Result; 4 | import com.ken.forum_server.pojo.Post; 5 | import com.ken.forum_server.vo.PaginationVo; 6 | import com.ken.forum_server.vo.PostVo; 7 | 8 | public interface PostService { 9 | Result publish(Post post); 10 | 11 | PaginationVo list(int currentPage , int listMode); 12 | 13 | Post findPostById(int pid); 14 | 15 | void updateCommentCount(int id, int commentCount); 16 | 17 | int updateType(int id, int type); 18 | 19 | int updateStatus(int id, int status); 20 | 21 | int updateScore(int postId, double score); 22 | 23 | PaginationVo listByUserId(int currentPage, int uid); 24 | 25 | void deteteById(int entityId); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/service/UserService.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.service; 2 | 3 | import com.ken.forum_server.common.Result; 4 | import com.ken.forum_server.pojo.User; 5 | 6 | import java.util.List; 7 | import java.util.Map; 8 | 9 | public interface UserService { 10 | 11 | Map login(User user); 12 | 13 | Result register(User user); 14 | 15 | Result getInfo(int id); 16 | 17 | Result active(String username , String code); 18 | 19 | void upadteAvatar(int userId, String s); 20 | 21 | User findUserById(Integer userId); 22 | 23 | User findUserByName(String toName); 24 | 25 | void deleteUserById(int uid); 26 | 27 | User findUserByEmail(String eamil); 28 | 29 | void updatePassword(User user); 30 | 31 | String getUserPasswordById(int userId); 32 | 33 | List findUserByIds(List ids); 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/service/impl/CommentServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.service.impl; 2 | 3 | import com.ken.forum_server.dao.CommentDao; 4 | import com.ken.forum_server.dao.PostDao; 5 | import com.ken.forum_server.exception.CustomException; 6 | import com.ken.forum_server.exception.CustomExceptionCode; 7 | import com.ken.forum_server.pojo.Comment; 8 | import com.ken.forum_server.service.CommentService; 9 | import com.ken.forum_server.util.ConstantUtil; 10 | import com.ken.forum_server.vo.CommentVo; 11 | import org.springframework.beans.factory.annotation.Autowired; 12 | import org.springframework.stereotype.Service; 13 | import org.springframework.transaction.annotation.Isolation; 14 | import org.springframework.transaction.annotation.Propagation; 15 | import org.springframework.transaction.annotation.Transactional; 16 | 17 | import java.util.List; 18 | 19 | @Service 20 | public class CommentServiceImpl implements CommentService { 21 | @Autowired 22 | private CommentDao commentDao; 23 | @Autowired 24 | private PostDao postDao; 25 | 26 | @Override 27 | public List findCommentsByEntity(int entityType, int entityId, int offset, int limit) { 28 | return commentDao.selectCommentsByEntity(entityType,entityId,offset,limit); 29 | } 30 | 31 | @Override 32 | public int findCommentCount(int entityType, int entityId) { 33 | return commentDao.selectCountByEntity(entityType,entityId); 34 | } 35 | 36 | @Transactional(isolation = Isolation.REPEATABLE_READ,propagation = Propagation.REQUIRED) 37 | @Override 38 | public int addComment(Comment comment) { 39 | if (comment == null){ 40 | throw new CustomException(CustomExceptionCode.COMMENT_ERROR); 41 | } 42 | 43 | int rows = commentDao.insertComment(comment); 44 | 45 | if (comment.getEntityType() == ConstantUtil.ENTITY_TYPE_POST){ 46 | int count = commentDao.selectCountByEntity(comment.getEntityType(),comment.getEntityId()); 47 | postDao.updateCommentCount(comment.getEntityId(),count); 48 | } 49 | 50 | return rows; 51 | } 52 | 53 | @Override 54 | public Comment findCommentById(int entityId) { 55 | return commentDao.findCommentById(entityId); 56 | } 57 | 58 | @Override 59 | public String findCommentByIdAndType(int entityType, int entityId) { 60 | return commentDao.findCommentByIdAndType(entityType,entityId); 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/shiro/JWToken.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.shiro; 2 | 3 | import org.apache.shiro.authc.AuthenticationToken; 4 | 5 | /** 6 | * 实现AuthenticationToken,结合shiro验证 7 | */ 8 | public class JWToken implements AuthenticationToken { 9 | 10 | private String token; 11 | 12 | public JWToken(String token) { 13 | this.token = token; 14 | } 15 | 16 | @Override 17 | public String getPrincipal() { 18 | return token; 19 | } 20 | 21 | @Override 22 | public String getCredentials() { 23 | return token; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/util/ConstantUtil.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.util; 2 | 3 | public class ConstantUtil { 4 | 5 | /** 6 | * 实体类型: 帖子 7 | */ 8 | public static int ENTITY_TYPE_POST = 1; 9 | 10 | /** 11 | * 实体类型: 评论 12 | */ 13 | public static int ENTITY_TYPE_COMMENT = 2; 14 | 15 | /** 16 | * 实体类型: 用户 17 | */ 18 | public static int ENTITY_TYPE_USER = 3; 19 | 20 | /** 21 | * 主题: 评论 22 | */ 23 | public static final String TOPIC_COMMENT = "comment"; 24 | 25 | /** 26 | * 主题: 点赞 27 | */ 28 | public static final String TOPIC_LIKE = "like"; 29 | 30 | /** 31 | * 主题: 关注 32 | */ 33 | public static final String TOPIC_FOLLOW = "follow"; 34 | 35 | /** 36 | * 系统通知 37 | */ 38 | public static final String TOPIC_SYSTEM = "system"; 39 | 40 | /** 41 | * 主题: 发帖 42 | */ 43 | public static final String TOPIC_PUBLISH = "publish"; 44 | 45 | /** 46 | * 主题: 删帖 47 | */ 48 | public static final String TOPIC_DELETE = "delete"; 49 | 50 | /** 51 | * 主题: 删帖 52 | */ 53 | public static final String TOPIC_RESET_ES = "resetEs"; 54 | 55 | /** 56 | * 主题:注册 57 | */ 58 | public static final String TOPIC_REGISTER = "register"; 59 | 60 | /** 61 | * 主题:忘记密码 62 | */ 63 | public static final String TOPIC_FORGET = "forget"; 64 | 65 | /** 66 | * 系统用户ID 67 | */ 68 | public static final int SYSTEM_USER_ID = 1; 69 | 70 | } 71 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/util/JsonUtil.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.util; 2 | 3 | import com.alibaba.fastjson.JSONObject; 4 | 5 | import java.util.Map; 6 | 7 | public class JsonUtil { 8 | 9 | public static String getJSONString(int code) { 10 | return getJSONString(code, null, null); 11 | } 12 | 13 | public static String getJSONString(int code, String msg, Map map) { 14 | JSONObject json = new JSONObject(); 15 | json.put("code", code); 16 | json.put("msg", msg); 17 | if (map != null) { 18 | for (String key : map.keySet()) { 19 | json.put(key, map.get(key)); 20 | } 21 | } 22 | return json.toJSONString(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/util/JwtUtil.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.util; 2 | 3 | import com.auth0.jwt.JWT; 4 | import com.auth0.jwt.JWTCreator; 5 | import com.auth0.jwt.algorithms.Algorithm; 6 | import com.auth0.jwt.interfaces.Claim; 7 | import com.auth0.jwt.interfaces.DecodedJWT; 8 | import org.springframework.beans.factory.annotation.Value; 9 | 10 | import java.util.Calendar; 11 | import java.util.Map; 12 | 13 | public class JwtUtil { 14 | public static final String HEADER_TOKEN_KEY = "Authorization"; 15 | 16 | /** 17 | *生成token 18 | * @param map :playload信息 19 | * @param secret : 加密签名的key 20 | * @return 21 | */ 22 | public static String getToken(Map map,String secret){ 23 | JWTCreator.Builder builder = JWT.create(); 24 | //放入负载信息 25 | map.forEach((k,v)->{ 26 | System.out.println(k+"==========="); 27 | System.out.println(v+"==========="); 28 | builder.withClaim(k,v); 29 | }); 30 | Calendar instance = Calendar.getInstance(); 31 | //过期时间为2小时 32 | instance.add(Calendar.SECOND,60*60*2); 33 | builder.withExpiresAt(instance.getTime()); 34 | return builder.sign(Algorithm.HMAC256(secret)); 35 | } 36 | 37 | 38 | /** 39 | * 验证token 40 | * @param token 41 | * @return 42 | */ 43 | public static void verify(String token){ 44 | String secret= getToken(token).getClaim("username").asString(); 45 | if (secret == null){ 46 | secret = "as"; 47 | } 48 | JWT.require(Algorithm.HMAC256(secret)).build().verify(token); 49 | } 50 | 51 | 52 | /** 53 | * 获取token中payload,无需解密也可获得 54 | * @param token 55 | * @return 56 | */ 57 | public static DecodedJWT getToken(String token){ 58 | return JWT.decode(token); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/util/MD5Util.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.util; 2 | 3 | import org.apache.shiro.crypto.hash.SimpleHash; 4 | import org.junit.Test; 5 | 6 | public class MD5Util { 7 | 8 | //加密盐值 9 | private static String SALT = "daskodakfap*!"; 10 | 11 | /** 12 | * 密码加密 13 | * @return 14 | */ 15 | public static String md5Encryption(String originPassword){ 16 | System.out.println("加密的盐值是!!"+SALT); 17 | String algorithmName = "MD5";//加密算法 18 | int hashIterations = 2;//加密次数 19 | SimpleHash simpleHash = new SimpleHash(algorithmName,originPassword,SALT,hashIterations); 20 | return simpleHash+""; 21 | } 22 | 23 | @Test 24 | public void t(){ 25 | System.out.println(MD5Util.md5Encryption("123456789")); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/vo/CommentVo.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.vo; 2 | 3 | import com.ken.forum_server.pojo.Comment; 4 | import com.ken.forum_server.pojo.User; 5 | import lombok.Data; 6 | 7 | import java.util.List; 8 | 9 | @Data 10 | public class CommentVo { 11 | Comment comment; 12 | User user; 13 | List replies; 14 | int replyCount; 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/vo/LetterVo.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.vo; 2 | 3 | import com.ken.forum_server.pojo.Message; 4 | import com.ken.forum_server.pojo.User; 5 | import lombok.Data; 6 | 7 | @Data 8 | public class LetterVo { 9 | private Message letter; 10 | private User fromUser; 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/vo/MessageVo.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.vo; 2 | 3 | import com.ken.forum_server.pojo.Message; 4 | import com.ken.forum_server.pojo.User; 5 | import lombok.Data; 6 | 7 | @Data 8 | public class MessageVo { 9 | private Message conversation; 10 | private int letterCount; 11 | private int unreadCount; 12 | private User target; 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/vo/MsgVo.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.vo; 2 | 3 | import com.fasterxml.jackson.annotation.JsonFormat; 4 | import com.ken.forum_server.pojo.User; 5 | import lombok.Data; 6 | 7 | import java.util.Date; 8 | 9 | @Data 10 | public class MsgVo { 11 | private User fromUser; //消息是来自谁 12 | private int msgType; //消息针对的实体类型 1-帖子 2-评论 13 | private int entityId; //消息针对的实体ID 14 | private String content; //消息具体的内容 15 | private int postId; 16 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") 17 | private Date createTime; 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/vo/PaginationVo.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.vo; 2 | 3 | import com.ken.forum_server.pojo.User; 4 | import lombok.Data; 5 | 6 | import java.io.Serializable; 7 | import java.util.List; 8 | 9 | @Data 10 | public class PaginationVo implements Serializable { 11 | 12 | private List records; 13 | private int total; 14 | private int currentPage; 15 | private int pageSize; 16 | private int letterUnreadCount; 17 | private int noticeUnreadCount; 18 | private User target; 19 | 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/vo/PostDetailVo.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.vo; 2 | 3 | import lombok.Data; 4 | import java.util.List; 5 | 6 | @Data 7 | public class PostDetailVo { 8 | PostVo postVo; 9 | List comments; 10 | List pictures; 11 | private int likeStatus; 12 | private int collectStatus; 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/vo/PostVo.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.vo; 2 | 3 | import com.ken.forum_server.pojo.Post; 4 | import com.ken.forum_server.pojo.User; 5 | import lombok.Data; 6 | 7 | import java.io.Serializable; 8 | 9 | @Data 10 | public class PostVo implements Serializable { 11 | private Post post; 12 | private User user; 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/vo/ReplyVo.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.vo; 2 | 3 | import com.ken.forum_server.pojo.Comment; 4 | import com.ken.forum_server.pojo.User; 5 | import lombok.Data; 6 | 7 | @Data 8 | public class ReplyVo { 9 | Comment reply; 10 | User user; 11 | User target; 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/vo/UploadData.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.vo; 2 | 3 | import lombok.Data; 4 | 5 | import java.io.Serializable; 6 | 7 | @Data 8 | public class UploadData implements Serializable { 9 | 10 | private int pid; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/com/ken/forum_server/vo/UserInfo.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server.vo; 2 | 3 | import java.io.Serializable; 4 | 5 | public class UserInfo implements Serializable { 6 | 7 | private Integer id; 8 | private String username; 9 | private boolean state = true; 10 | } 11 | -------------------------------------------------------------------------------- /src/main/resources/mapper/user-mapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | id , username , avatar 11 | 12 | 13 | 14 | 21 | 22 | -------------------------------------------------------------------------------- /src/test/java/com/ken/forum_server/KafkaTest.java: -------------------------------------------------------------------------------- 1 | //package com.ken.forum_server; 2 | // 3 | //import org.apache.kafka.clients.consumer.ConsumerRecord; 4 | //import org.junit.Test; 5 | //import org.junit.runner.RunWith; 6 | //import org.springframework.beans.factory.annotation.Autowired; 7 | //import org.springframework.boot.test.context.SpringBootTest; 8 | //import org.springframework.kafka.annotation.KafkaListener; 9 | //import org.springframework.kafka.core.KafkaTemplate; 10 | //import org.springframework.stereotype.Component; 11 | //import org.springframework.test.context.ContextConfiguration; 12 | //import org.springframework.test.context.junit4.SpringRunner; 13 | // 14 | //@RunWith(SpringRunner.class) 15 | //@SpringBootTest 16 | //@ContextConfiguration(classes = ForumServerApplication.class) 17 | //public class KafkaTest { 18 | // 19 | // @Autowired 20 | // private KafkaProducer kafkaProducer; 21 | // 22 | // @Test 23 | // public void testKafka() { 24 | // kafkaProducer.sendMessage("test", "你好"); 25 | // kafkaProducer.sendMessage("test", "在吗"); 26 | // 27 | // try { 28 | // Thread.sleep(1000 * 10); 29 | // } catch (InterruptedException e) { 30 | // e.printStackTrace(); 31 | // } 32 | // } 33 | // 34 | //} 35 | // 36 | //@Component 37 | //class KafkaProducer { 38 | // 39 | // @Autowired 40 | // private KafkaTemplate kafkaTemplate; 41 | // 42 | // public void sendMessage(String topic, String content) { 43 | // kafkaTemplate.send(topic, content); 44 | // } 45 | // 46 | //} 47 | // 48 | //@Component 49 | //class KafkaConsumer { 50 | // 51 | // @KafkaListener(topics = {"test"}) 52 | // public void handleMessage(ConsumerRecord record) { 53 | // System.out.println(record.value()); 54 | // } 55 | // 56 | // 57 | //} -------------------------------------------------------------------------------- /src/test/java/com/ken/forum_server/MDTest.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server; 2 | 3 | import com.ken.forum_server.pojo.Post; 4 | import com.ken.forum_server.util.MD5Util; 5 | import org.junit.Test; 6 | import org.junit.runner.RunWith; 7 | import org.springframework.boot.test.context.SpringBootTest; 8 | import org.springframework.test.context.ContextConfiguration; 9 | import org.springframework.test.context.junit4.SpringRunner; 10 | 11 | @RunWith(SpringRunner.class) 12 | @SpringBootTest 13 | @ContextConfiguration(classes = ForumServerApplication.class) 14 | public class MDTest { 15 | 16 | @Test 17 | public void T() { 18 | String password = "123456"; 19 | System.out.println(MD5Util.md5Encryption(password)); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/test/java/com/ken/forum_server/MailTests.java: -------------------------------------------------------------------------------- 1 | package com.ken.forum_server; 2 | 3 | import com.ken.forum_server.dao.PostDao; 4 | import com.ken.forum_server.pojo.Post; 5 | import com.ken.forum_server.util.MailUtil; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.boot.test.context.SpringBootTest; 11 | import org.springframework.test.context.ContextConfiguration; 12 | import org.springframework.test.context.junit4.SpringRunner; 13 | 14 | import java.time.LocalDateTime; 15 | import java.util.Date; 16 | 17 | @RunWith(SpringRunner.class) 18 | @SpringBootTest 19 | @ContextConfiguration(classes = ForumServerApplication.class) 20 | public class MailTests { 21 | 22 | @Autowired 23 | private MailUtil mailUtil; 24 | 25 | @Autowired 26 | private PostDao postDao; 27 | 28 | 29 | @Test 30 | public void testTextMail() { 31 | // mailUtil.sendSimpleMail("1067408710@qq.com","开会通知","ssssssdddd"); 32 | // mailUtil.sendMail("1067408710@qq.com","开会通知","ssssssdddd"); 33 | } 34 | 35 | 36 | @Test 37 | public void T() { 38 | Post post = new Post(); 39 | post.setScore(0); 40 | post.setCommentCount(0); 41 | post.setType(0); 42 | post.setTag(1); 43 | // post.setCreateTime(LocalDateTime.now()); 44 | post.setUserId(3); 45 | for (int i = 50; i < 100; i++) { 46 | post.setTitle("推文"+i); 47 | post.setContent("内容"+i); 48 | postDao.addPost(post); 49 | 50 | } 51 | } 52 | } --------------------------------------------------------------------------------