springboot集成websocket和定时任务实现日志推送

上传者: 35062384 | 上传时间: 2021-09-22 08:29:51 | 文件大小: 114KB | 文件类型: ZIP
通过修改logback.xml文件,实现自定义获取日志方式,并放入阻塞队列中,定时任务获取队列内容并通过websocket发送到客户端,实现日志在前台的展示

文件下载

资源详情

[{"title":"( 97 个子文件 114KB ) springboot集成websocket和定时任务实现日志推送","children":[{"title":"log2client","children":[{"title":"log2client.iml <span style='color:#111;'> 7.88KB </span>","children":null,"spread":false},{"title":"pom.xml <span style='color:#111;'> 1.75KB </span>","children":null,"spread":false},{"title":"target","children":[{"title":"test-classes","children":[{"title":"com","children":[{"title":"maochd","children":[{"title":"log2client","children":[{"title":"Log2clientApplicationTests.class <span style='color:#111;'> 650B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"generated-test-sources","children":[{"title":"test-annotations","children":null,"spread":false}],"spread":true},{"title":"classes","children":[{"title":"logback.xml <span style='color:#111;'> 843B </span>","children":null,"spread":false},{"title":"META-INF","children":[{"title":"log2client.kotlin_module <span style='color:#111;'> 16B </span>","children":null,"spread":false}],"spread":true},{"title":"application.yml <span style='color:#111;'> 62B </span>","children":null,"spread":false},{"title":"com","children":[{"title":"maochd","children":[{"title":"log2client","children":[{"title":"config","children":[{"title":"logback","children":[{"title":"WebsocketAppender.class <span style='color:#111;'> 1.90KB </span>","children":null,"spread":false}],"spread":false},{"title":"websocket","children":[{"title":"WebsocketConfig.class <span style='color:#111;'> 738B </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"domain","children":[{"title":"LoggerMessage.class <span style='color:#111;'> 1.21KB </span>","children":null,"spread":false}],"spread":false},{"title":"Log2clientApplication.class <span style='color:#111;'> 828B </span>","children":null,"spread":false},{"title":"controller","children":[{"title":"GenerateLogController.class <span style='color:#111;'> 1.25KB </span>","children":null,"spread":false}],"spread":false},{"title":"service","children":[{"title":"WebsocketServer.class <span style='color:#111;'> 2.41KB </span>","children":null,"spread":false}],"spread":false},{"title":"task","children":[{"title":"LogTask.class <span style='color:#111;'> 1.41KB </span>","children":null,"spread":false}],"spread":false},{"title":"util","children":[{"title":"LoggerQueue.class <span style='color:#111;'> 1.43KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"generated-sources","children":[{"title":"annotations","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"mvnw <span style='color:#111;'> 9.83KB </span>","children":null,"spread":false},{"title":"src","children":[{"title":"test","children":[{"title":"java","children":[{"title":"com","children":[{"title":"maochd","children":[{"title":"log2client","children":[{"title":"Log2clientApplicationTests.java <span style='color:#111;'> 351B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"main","children":[{"title":"resources","children":[{"title":"logback.xml <span style='color:#111;'> 843B </span>","children":null,"spread":false},{"title":"application.yml <span style='color:#111;'> 62B </span>","children":null,"spread":false},{"title":"templates","children":null,"spread":false},{"title":"static","children":null,"spread":false}],"spread":true},{"title":"java","children":[{"title":"com","children":[{"title":"maochd","children":[{"title":"log2client","children":[{"title":"config","children":[{"title":"logback","children":[{"title":"WebsocketAppender.java <span style='color:#111;'> 977B </span>","children":null,"spread":false}],"spread":false},{"title":"websocket","children":[{"title":"WebsocketConfig.java <span style='color:#111;'> 462B </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"domain","children":[{"title":"LoggerMessage.java <span style='color:#111;'> 915B </span>","children":null,"spread":false}],"spread":false},{"title":"controller","children":[{"title":"GenerateLogController.java <span style='color:#111;'> 690B </span>","children":null,"spread":false}],"spread":false},{"title":"service","children":[{"title":"WebsocketServer.java <span style='color:#111;'> 1.30KB </span>","children":null,"spread":false}],"spread":false},{"title":"task","children":[{"title":"LogTask.java <span style='color:#111;'> 929B </span>","children":null,"spread":false}],"spread":false},{"title":"util","children":[{"title":"LoggerQueue.java <span style='color:#111;'> 1.19KB </span>","children":null,"spread":false}],"spread":false},{"title":"Log2clientApplication.java <span style='color:#111;'> 419B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":".idea","children":[{"title":"uiDesigner.xml <span style='color:#111;'> 8.71KB </span>","children":null,"spread":false},{"title":"misc.xml <span style='color:#111;'> 451B </span>","children":null,"spread":false},{"title":"modules.xml <span style='color:#111;'> 267B </span>","children":null,"spread":false},{"title":"encodings.xml <span style='color:#111;'> 209B </span>","children":null,"spread":false},{"title":"compiler.xml <span style='color:#111;'> 821B </span>","children":null,"spread":false},{"title":"workspace.xml <span style='color:#111;'> 23.05KB </span>","children":null,"spread":false},{"title":"libraries","children":[{"title":"Maven__org_apache_tomcat_embed_tomcat_embed_websocket_9_0_17.xml <span style='color:#111;'> 660B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_spring_websocket_5_1_6_RELEASE.xml <span style='color:#111;'> 651B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_spring_context_5_1_6_RELEASE.xml <span style='color:#111;'> 637B </span>","children":null,"spread":false},{"title":"Maven__ch_qos_logback_logback_classic_1_2_3.xml <span style='color:#111;'> 568B </span>","children":null,"spread":false},{"title":"Maven__org_ow2_asm_asm_5_0_4.xml <span style='color:#111;'> 472B </span>","children":null,"spread":false},{"title":"Maven__org_objenesis_objenesis_2_6.xml <span style='color:#111;'> 508B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_spring_messaging_5_1_6_RELEASE.xml <span style='color:#111;'> 651B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_spring_web_5_1_6_RELEASE.xml <span style='color:#111;'> 609B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_spring_jcl_5_1_6_RELEASE.xml <span style='color:#111;'> 609B </span>","children":null,"spread":false},{"title":"Maven__javax_annotation_javax_annotation_api_1_3_2.xml <span style='color:#111;'> 611B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_boot_spring_boot_starter_tomcat_2_1_4_RELEASE.xml <span style='color:#111;'> 741B </span>","children":null,"spread":false},{"title":"Maven__junit_junit_4_12.xml <span style='color:#111;'> 455B </span>","children":null,"spread":false},{"title":"Maven__com_fasterxml_classmate_1_4_0.xml <span style='color:#111;'> 522B </span>","children":null,"spread":false},{"title":"Maven__org_yaml_snakeyaml_1_23.xml <span style='color:#111;'> 495B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_boot_spring_boot_starter_test_2_1_4_RELEASE.xml <span style='color:#111;'> 727B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_boot_spring_boot_starter_logging_2_1_4_RELEASE.xml <span style='color:#111;'> 748B </span>","children":null,"spread":false},{"title":"Maven__org_hibernate_validator_hibernate_validator_6_0_16_Final.xml <span style='color:#111;'> 681B </span>","children":null,"spread":false},{"title":"Maven__org_hamcrest_hamcrest_library_1_3.xml <span style='color:#111;'> 553B </span>","children":null,"spread":false},{"title":"Maven__com_fasterxml_jackson_core_jackson_databind_2_9_8.xml <span style='color:#111;'> 623B </span>","children":null,"spread":false},{"title":"Maven__org_apache_logging_log4j_log4j_api_2_11_2.xml <span style='color:#111;'> 573B </span>","children":null,"spread":false},{"title":"Maven__ch_qos_logback_logback_core_1_2_3.xml <span style='color:#111;'> 547B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_spring_webmvc_5_1_6_RELEASE.xml <span style='color:#111;'> 630B </span>","children":null,"spread":false},{"title":"Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_9_8.xml <span style='color:#111;'> 688B </span>","children":null,"spread":false},{"title":"Maven__com_fasterxml_jackson_core_jackson_annotations_2_9_0.xml <span style='color:#111;'> 644B </span>","children":null,"spread":false},{"title":"Maven__org_assertj_assertj_core_3_11_1.xml <span style='color:#111;'> 542B </span>","children":null,"spread":false},{"title":"Maven__org_slf4j_slf4j_api_1_7_26.xml <span style='color:#111;'> 513B </span>","children":null,"spread":false},{"title":"Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_9_8.xml <span style='color:#111;'> 674B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_boot_spring_boot_2_1_4_RELEASE.xml <span style='color:#111;'> 636B </span>","children":null,"spread":false},{"title":"Maven__net_bytebuddy_byte_buddy_agent_1_9_12.xml <span style='color:#111;'> 578B </span>","children":null,"spread":false},{"title":"Maven__org_hamcrest_hamcrest_core_1_3.xml <span style='color:#111;'> 532B </span>","children":null,"spread":false},{"title":"Maven__com_jayway_jsonpath_json_path_2_4_0.xml <span style='color:#111;'> 546B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_boot_spring_boot_autoconfigure_2_1_4_RELEASE.xml <span style='color:#111;'> 734B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_spring_beans_5_1_6_RELEASE.xml <span style='color:#111;'> 623B </span>","children":null,"spread":false},{"title":"Maven__org_mockito_mockito_core_2_23_4.xml <span style='color:#111;'> 542B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_boot_spring_boot_starter_2_1_4_RELEASE.xml <span style='color:#111;'> 692B </span>","children":null,"spread":false},{"title":"Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml <span style='color:#111;'> 700B </span>","children":null,"spread":false},{"title":"Maven__org_jboss_logging_jboss_logging_3_3_2_Final.xml <span style='color:#111;'> 608B </span>","children":null,"spread":false},{"title":"Maven__org_slf4j_jul_to_slf4j_1_7_26.xml <span style='color:#111;'> 534B </span>","children":null,"spread":false},{"title":"Maven__org_projectlombok_lombok_1_18_6.xml <span style='color:#111;'> 524B </span>","children":null,"spread":false},{"title":"Maven__org_skyscreamer_jsonassert_1_5_0.xml <span style='color:#111;'> 537B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_boot_spring_boot_test_2_1_4_RELEASE.xml <span style='color:#111;'> 671B </span>","children":null,"spread":false},{"title":"Maven__com_fasterxml_jackson_core_jackson_core_2_9_8.xml <span style='color:#111;'> 595B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_spring_aop_5_1_6_RELEASE.xml <span style='color:#111;'> 609B </span>","children":null,"spread":false},{"title":"Maven__javax_validation_validation_api_2_0_1_Final.xml <span style='color:#111;'> 611B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_boot_spring_boot_test_autoconfigure_2_1_4_RELEASE.xml <span style='color:#111;'> 769B </span>","children":null,"spread":false},{"title":"Maven__com_fasterxml_jackson_module_jackson_module_parameter_names_2_9_8.xml <span style='color:#111;'> 729B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_spring_core_5_1_6_RELEASE.xml <span style='color:#111;'> 616B </span>","children":null,"spread":false},{"title":"Maven__org_xmlunit_xmlunit_core_2_6_2.xml <span style='color:#111;'> 535B </span>","children":null,"spread":false},{"title":"Maven__org_apache_tomcat_embed_tomcat_embed_el_9_0_17.xml <span style='color:#111;'> 611B </span>","children":null,"spread":false},{"title":"Maven__net_minidev_json_smart_2_3.xml <span style='color:#111;'> 507B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_spring_expression_5_1_6_RELEASE.xml <span style='color:#111;'> 658B </span>","children":null,"spread":false},{"title":"Maven__org_apache_logging_log4j_log4j_to_slf4j_2_11_2.xml <span style='color:#111;'> 608B </span>","children":null,"spread":false},{"title":"Maven__net_bytebuddy_byte_buddy_1_9_12.xml <span style='color:#111;'> 536B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_spring_test_5_1_6_RELEASE.xml <span style='color:#111;'> 616B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_boot_spring_boot_starter_web_2_1_4_RELEASE.xml <span style='color:#111;'> 720B </span>","children":null,"spread":false},{"title":"Maven__net_minidev_accessors_smart_1_2.xml <span style='color:#111;'> 542B </span>","children":null,"spread":false},{"title":"Maven__org_apache_tomcat_embed_tomcat_embed_core_9_0_17.xml <span style='color:#111;'> 625B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_boot_spring_boot_starter_websocket_2_1_4_RELEASE.xml <span style='color:#111;'> 762B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_boot_spring_boot_starter_json_2_1_4_RELEASE.xml <span style='color:#111;'> 727B </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":".gitignore <span style='color:#111;'> 333B </span>","children":null,"spread":false},{"title":".mvn","children":[{"title":"wrapper","children":[{"title":"maven-wrapper.jar <span style='color:#111;'> 49.52KB </span>","children":null,"spread":false},{"title":"MavenWrapperDownloader.java <span style='color:#111;'> 4.83KB </span>","children":null,"spread":false},{"title":"maven-wrapper.properties <span style='color:#111;'> 218B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"mvnw.cmd <span style='color:#111;'> 6.45KB </span>","children":null,"spread":false},{"title":"HELP.md <span style='color:#111;'> 1013B </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明