spring boot+websocket前后端简单demo

上传者: 31201781 | 上传时间: 2019-12-21 18:53:15 | 文件大小: 98KB | 文件类型: zip
使用spring boot+websocket实现一个websocket连接,使用IDEA打开项目,运行Application.java运行后台,然后打开localhost:8080打开前端即可测试

文件下载

资源详情

[{"title":"( 88 个子文件 98KB ) spring boot+websocket前后端简单demo","children":[{"title":"spring_websocket","children":[{"title":".gitignore <span style='color:#111;'> 268B </span>","children":null,"spread":false},{"title":".mvn","children":[{"title":"wrapper","children":[{"title":"maven-wrapper.jar <span style='color:#111;'> 46.49KB </span>","children":null,"spread":false},{"title":"maven-wrapper.properties <span style='color:#111;'> 110B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"src","children":[{"title":"main","children":[{"title":"resources","children":[{"title":"static","children":[{"title":"index.html <span style='color:#111;'> 4.11KB </span>","children":null,"spread":false}],"spread":true},{"title":"application.properties <span style='color:#111;'> 0B </span>","children":null,"spread":false}],"spread":true},{"title":"java","children":[{"title":"hello","children":[{"title":"HelloMessage.java <span style='color:#111;'> 330B </span>","children":null,"spread":false},{"title":"GreetingController.java <span style='color:#111;'> 604B </span>","children":null,"spread":false},{"title":"WebSocketConfig.java <span style='color:#111;'> 905B </span>","children":null,"spread":false},{"title":"Greeting.java <span style='color:#111;'> 262B </span>","children":null,"spread":false},{"title":"Application.java <span style='color:#111;'> 309B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"test","children":[{"title":"java","children":[{"title":"com","children":[{"title":"example","children":null,"spread":false}],"spread":true},{"title":"test","children":[{"title":"SpringWebsocketApplicationTests.java <span style='color:#111;'> 339B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"mvnw <span style='color:#111;'> 6.32KB </span>","children":null,"spread":false},{"title":"pom.xml <span style='color:#111;'> 1.62KB </span>","children":null,"spread":false},{"title":"mvnw.cmd <span style='color:#111;'> 4.88KB </span>","children":null,"spread":false},{"title":"target","children":[{"title":"classes","children":[{"title":"static","children":[{"title":"index.html <span style='color:#111;'> 4.11KB </span>","children":null,"spread":false}],"spread":true},{"title":"application.properties <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"hello","children":[{"title":"HelloMessage.class <span style='color:#111;'> 611B </span>","children":null,"spread":false},{"title":"WebSocketConfig.class <span style='color:#111;'> 1.86KB </span>","children":null,"spread":false},{"title":"Application.class <span style='color:#111;'> 669B </span>","children":null,"spread":false},{"title":"Greeting.class <span style='color:#111;'> 519B </span>","children":null,"spread":false},{"title":"GreetingController.class <span style='color:#111;'> 1.31KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"generated-test-sources","children":[{"title":"test-annotations","children":null,"spread":false}],"spread":true},{"title":"generated-sources","children":[{"title":"annotations","children":null,"spread":false}],"spread":true},{"title":"test-classes","children":[{"title":"test","children":[{"title":"SpringWebsocketApplicationTests.class <span style='color:#111;'> 631B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":".idea","children":[{"title":"misc.xml <span style='color:#111;'> 439B </span>","children":null,"spread":false},{"title":"encodings.xml <span style='color:#111;'> 172B </span>","children":null,"spread":false},{"title":"libraries","children":[{"title":"Maven__junit_junit_4_12.xml <span style='color:#111;'> 455B </span>","children":null,"spread":false},{"title":"Maven__org_apache_tomcat_embed_tomcat_embed_core_8_5_31.xml <span style='color:#111;'> 625B </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__net_bytebuddy_byte_buddy_agent_1_7_11.xml <span style='color:#111;'> 578B </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__net_minidev_accessors_smart_1_2.xml <span style='color:#111;'> 542B </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_apache_logging_log4j_log4j_to_slf4j_2_10_0.xml <span style='color:#111;'> 608B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_boot_spring_boot_starter_json_2_0_3_RELEASE.xml <span style='color:#111;'> 727B </span>","children":null,"spread":false},{"title":"Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_9_6.xml <span style='color:#111;'> 674B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_spring_web_5_0_7_RELEASE.xml <span style='color:#111;'> 609B </span>","children":null,"spread":false},{"title":"Maven__org_apache_tomcat_embed_tomcat_embed_websocket_8_5_31.xml <span style='color:#111;'> 660B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_boot_spring_boot_starter_logging_2_0_3_RELEASE.xml <span style='color:#111;'> 748B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_spring_websocket_5_0_7_RELEASE.xml <span style='color:#111;'> 651B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_spring_jcl_5_0_7_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_yaml_snakeyaml_1_19.xml <span style='color:#111;'> 495B </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_expression_5_0_7_RELEASE.xml <span style='color:#111;'> 658B </span>","children":null,"spread":false},{"title":"Maven__org_mockito_mockito_core_2_15_0.xml <span style='color:#111;'> 542B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_boot_spring_boot_starter_websocket_2_0_3_RELEASE.xml <span style='color:#111;'> 762B </span>","children":null,"spread":false},{"title":"Maven__com_fasterxml_classmate_1_3_4.xml <span style='color:#111;'> 522B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_spring_core_5_0_7_RELEASE.xml <span style='color:#111;'> 616B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_boot_spring_boot_test_2_0_3_RELEASE.xml <span style='color:#111;'> 671B </span>","children":null,"spread":false},{"title":"Maven__org_xmlunit_xmlunit_core_2_5_1.xml <span style='color:#111;'> 535B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_spring_webmvc_5_0_7_RELEASE.xml <span style='color:#111;'> 630B </span>","children":null,"spread":false},{"title":"Maven__org_hibernate_validator_hibernate_validator_6_0_10_Final.xml <span style='color:#111;'> 681B </span>","children":null,"spread":false},{"title":"Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_9_6.xml <span style='color:#111;'> 688B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_spring_test_5_0_7_RELEASE.xml <span style='color:#111;'> 616B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_spring_beans_5_0_7_RELEASE.xml <span style='color:#111;'> 623B </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_objenesis_objenesis_2_6.xml <span style='color:#111;'> 508B </span>","children":null,"spread":false},{"title":"Maven__org_apache_tomcat_embed_tomcat_embed_el_8_5_31.xml <span style='color:#111;'> 611B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_boot_spring_boot_starter_test_2_0_3_RELEASE.xml <span style='color:#111;'> 727B </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_boot_spring_boot_starter_2_0_3_RELEASE.xml <span style='color:#111;'> 692B </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__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml <span style='color:#111;'> 700B </span>","children":null,"spread":false},{"title":"Maven__com_fasterxml_jackson_core_jackson_core_2_9_6.xml <span style='color:#111;'> 595B </span>","children":null,"spread":false},{"title":"Maven__com_fasterxml_jackson_core_jackson_databind_2_9_6.xml <span style='color:#111;'> 623B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_boot_spring_boot_starter_web_2_0_3_RELEASE.xml <span style='color:#111;'> 720B </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_springframework_boot_spring_boot_autoconfigure_2_0_3_RELEASE.xml <span style='color:#111;'> 734B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_spring_context_5_0_7_RELEASE.xml <span style='color:#111;'> 637B </span>","children":null,"spread":false},{"title":"Maven__net_bytebuddy_byte_buddy_1_7_11.xml <span style='color:#111;'> 536B </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__org_slf4j_slf4j_api_1_7_25.xml <span style='color:#111;'> 513B </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__org_assertj_assertj_core_3_9_1.xml <span style='color:#111;'> 535B </span>","children":null,"spread":false},{"title":"Maven__org_slf4j_jul_to_slf4j_1_7_25.xml <span style='color:#111;'> 534B </span>","children":null,"spread":false},{"title":"Maven__org_apache_logging_log4j_log4j_api_2_10_0.xml <span style='color:#111;'> 573B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_spring_messaging_5_0_7_RELEASE.xml <span style='color:#111;'> 651B </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_springframework_boot_spring_boot_test_autoconfigure_2_0_3_RELEASE.xml <span style='color:#111;'> 769B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_spring_aop_5_0_7_RELEASE.xml <span style='color:#111;'> 609B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_boot_spring_boot_2_0_3_RELEASE.xml <span style='color:#111;'> 636B </span>","children":null,"spread":false},{"title":"Maven__org_springframework_boot_spring_boot_starter_tomcat_2_0_3_RELEASE.xml <span style='color:#111;'> 741B </span>","children":null,"spread":false},{"title":"Maven__com_fasterxml_jackson_module_jackson_module_parameter_names_2_9_6.xml <span style='color:#111;'> 729B </span>","children":null,"spread":false}],"spread":false},{"title":"workspace.xml <span style='color:#111;'> 22.32KB </span>","children":null,"spread":false},{"title":"uiDesigner.xml <span style='color:#111;'> 8.59KB </span>","children":null,"spread":false},{"title":"inspectionProfiles","children":[{"title":"Project_Default.xml <span style='color:#111;'> 155B </span>","children":null,"spread":false}],"spread":true},{"title":"compiler.xml <span style='color:#111;'> 644B </span>","children":null,"spread":false},{"title":"modules.xml <span style='color:#111;'> 272B </span>","children":null,"spread":false}],"spread":true},{"title":"spring_websocket.iml <span style='color:#111;'> 7.70KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

  • diaobada :
    只是一个例子,没有讲解啥的吗。。。注释也没有
    2020-07-13
  • liu119361940 :
    新手,一直用eclipe,可能自己落伍了
    2019-08-30
  • 代码拯救不了世界 :
    不太好用,运行成功后,点击页面没反应
    2019-05-25
  • 怨心 :
    运行成功,很不错
    2019-01-28
  • maltel :
    好东西,不错不错。
    2018-12-31

免责申明

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