delete
This commit is contained in:
		@@ -37,8 +37,8 @@ spring-cloud:Finchley.SR2
 | 
				
			|||||||
| [spring-rabbitmq](https://github.com/heibaiying/spring-samples-for-all/tree/master/spring/spring-rabbitmq)<br/>[spring-rabbitmq-annotation](https://github.com/heibaiying/spring-samples-for-all/tree/master/spring/spring-rabbitmq-annotation) | spring 整合 rabbitmq、消息序列化与反序列化                   | [rabbitmq 官方文档](http://www.rabbitmq.com/getstarted.html)<br>[spring amqp](https://docs.spring.io/spring-amqp/docs/2.1.3.BUILD-SNAPSHOT/reference/html/) |
 | 
					| [spring-rabbitmq](https://github.com/heibaiying/spring-samples-for-all/tree/master/spring/spring-rabbitmq)<br/>[spring-rabbitmq-annotation](https://github.com/heibaiying/spring-samples-for-all/tree/master/spring/spring-rabbitmq-annotation) | spring 整合 rabbitmq、消息序列化与反序列化                   | [rabbitmq 官方文档](http://www.rabbitmq.com/getstarted.html)<br>[spring amqp](https://docs.spring.io/spring-amqp/docs/2.1.3.BUILD-SNAPSHOT/reference/html/) |
 | 
				
			||||||
| spring-dubbo<br/>spring-dubbo-annotation                     | spring 整合 dubbo                                            | [duboo 官方中文文档](http://dubbo.apache.org/zh-cn/docs/user/quick-start.html) |
 | 
					| spring-dubbo<br/>spring-dubbo-annotation                     | spring 整合 dubbo                                            | [duboo 官方中文文档](http://dubbo.apache.org/zh-cn/docs/user/quick-start.html) |
 | 
				
			||||||
| [spring-websocket](https://github.com/heibaiying/spring-samples-for-all/tree/master/spring/spring-websocket)<br/>[spring-websocket-annotation](https://github.com/heibaiying/spring-samples-for-all/tree/master/spring/spring-websocket-annotation) | spring 整合 websocket                                        | [spring websocket](https://docs.spring.io/spring/docs/5.1.3.RELEASE/spring-framework-reference/web.html#websocket) |
 | 
					| [spring-websocket](https://github.com/heibaiying/spring-samples-for-all/tree/master/spring/spring-websocket)<br/>[spring-websocket-annotation](https://github.com/heibaiying/spring-samples-for-all/tree/master/spring/spring-websocket-annotation) | spring 整合 websocket                                        | [spring websocket](https://docs.spring.io/spring/docs/5.1.3.RELEASE/spring-framework-reference/web.html#websocket) |
 | 
				
			||||||
| [spring-mail](https://github.com/heibaiying/spring-samples-for-all/tree/master/spring/spring-mail) <br/>[spring-mail-annotation](https://github.com/heibaiying/spring-samples-for-all/tree/master/spring/spring-mail-annotation) | spring 普通文本邮件、附件邮件、模板邮件                      | [spring email](https://docs.spring.io/spring/docs/5.1.3.RELEASE/spring-framework-reference/integration.html#mail) |
 | 
					| [spring-mail](https://github.com/heibaiying/spring-samples-for-all/tree/master/spring/spring-email) <br/>[spring-mail-annotation](https://github.com/heibaiying/spring-samples-for-all/tree/master/spring/spring-email-annotation) | spring 普通文本邮件、附件邮件、模板邮件                      | [spring email](https://docs.spring.io/spring/docs/5.1.3.RELEASE/spring-framework-reference/integration.html#mail) |
 | 
				
			||||||
| [spring-scheduled](https://github.com/heibaiying/spring-samples-for-all/tree/master/spring/spring-scheduled)<br/>[spring-scheduled-annotation](https://github.com/heibaiying/spring-samples-for-all/tree/master/spring/spring-scheduled-annotation) | spring 定时任务                                              | [Task Execution and Scheduling](https://docs.spring.io/spring/docs/5.1.3.RELEASE/spring-framework-reference/integration.html#scheduling) |
 | 
					| [spring-scheduling](https://github.com/heibaiying/spring-samples-for-all/tree/master/spring/spring-scheduling)<br/>[spring-scheduling-annotation](https://github.com/heibaiying/spring-samples-for-all/tree/master/spring/spring-scheduling-annotation) | spring 定时任务                                              | [Task Execution and Scheduling](https://docs.spring.io/spring/docs/5.1.3.RELEASE/spring-framework-reference/integration.html#scheduling) |
 | 
				
			||||||
| spring-kafka<br/>spring-kafka-annotation                     | spring 整合 kafka                                            | [Spring for Apache Kafka](https://docs.spring.io/spring-kafka/docs/2.2.2.RELEASE/reference/html/) |
 | 
					| spring-kafka<br/>spring-kafka-annotation                     | spring 整合 kafka                                            | [Spring for Apache Kafka](https://docs.spring.io/spring-kafka/docs/2.2.2.RELEASE/reference/html/) |
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<br/>
 | 
					<br/>
 | 
				
			||||||
 
 | 
				
			|||||||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							@@ -1,45 +0,0 @@
 | 
				
			|||||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
					 | 
				
			||||||
<beans xmlns="http://www.springframework.org/schema/beans"
 | 
					 | 
				
			||||||
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 | 
					 | 
				
			||||||
       xmlns:context="http://www.springframework.org/schema/context"
 | 
					 | 
				
			||||||
       xmlns:mvc="http://www.springframework.org/schema/mvc"
 | 
					 | 
				
			||||||
       xmlns:websocket="http://www.springframework.org/schema/websocket"
 | 
					 | 
				
			||||||
       xsi:schemaLocation="http://www.springframework.org/schema/beans
 | 
					 | 
				
			||||||
        http://www.springframework.org/schema/beans/spring-beans.xsd
 | 
					 | 
				
			||||||
        http://www.springframework.org/schema/context
 | 
					 | 
				
			||||||
        http://www.springframework.org/schema/context/spring-context-4.1.xsd
 | 
					 | 
				
			||||||
        http://www.springframework.org/schema/mvc
 | 
					 | 
				
			||||||
        http://www.springframework.org/schema/mvc/spring-mvc-4.1.xsd
 | 
					 | 
				
			||||||
        http://www.springframework.org/schema/websocket
 | 
					 | 
				
			||||||
        http://www.springframework.org/schema/websocket/spring-websocket.xsd">
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <!-- 开启注解包扫描-->
 | 
					 | 
				
			||||||
    <context:component-scan base-package="com.heibaiying.*"/>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <!--使用默认的Servlet来响应静态文件 -->
 | 
					 | 
				
			||||||
    <mvc:default-servlet-handler/>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <!-- 开启注解驱动 -->
 | 
					 | 
				
			||||||
    <mvc:annotation-driven/>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <!-- 配置视图解析器 -->
 | 
					 | 
				
			||||||
    <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"
 | 
					 | 
				
			||||||
          id="internalResourceViewResolver">
 | 
					 | 
				
			||||||
        <!-- 前缀 -->
 | 
					 | 
				
			||||||
        <property name="prefix" value="/WEB-INF/jsp/"/>
 | 
					 | 
				
			||||||
        <!-- 后缀 -->
 | 
					 | 
				
			||||||
        <property name="suffix" value=".jsp"/>
 | 
					 | 
				
			||||||
    </bean>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <!--配置webSocket-->
 | 
					 | 
				
			||||||
    <bean id="customerHandler" class="com.heibaiying.websocket.CustomerHandler"/>
 | 
					 | 
				
			||||||
    <websocket:handlers>
 | 
					 | 
				
			||||||
        <!--指定webSocket 地址-->
 | 
					 | 
				
			||||||
        <websocket:mapping path="/socket" handler="customerHandler"/>
 | 
					 | 
				
			||||||
        <!--webSocket握手-->
 | 
					 | 
				
			||||||
        <websocket:handshake-interceptors>
 | 
					 | 
				
			||||||
            <bean class="com.heibaiying.websocket.CustomHandshakeInterceptor"/>
 | 
					 | 
				
			||||||
        </websocket:handshake-interceptors>
 | 
					 | 
				
			||||||
    </websocket:handlers>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
</beans>
 | 
					 | 
				
			||||||
@@ -1,38 +0,0 @@
 | 
				
			|||||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
 | 
					 | 
				
			||||||
<html>
 | 
					 | 
				
			||||||
<head>
 | 
					 | 
				
			||||||
    <title>${sessionScope.get("username")}您好!欢迎进入群聊大厅!</title>
 | 
					 | 
				
			||||||
</head>
 | 
					 | 
				
			||||||
<body>
 | 
					 | 
				
			||||||
<input id="message" type="text">
 | 
					 | 
				
			||||||
<button id="btn">发送消息</button>
 | 
					 | 
				
			||||||
<div id="show">
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
</div>
 | 
					 | 
				
			||||||
<script>
 | 
					 | 
				
			||||||
    let btn = document.getElementById("btn");
 | 
					 | 
				
			||||||
    let message = document.getElementById("message");
 | 
					 | 
				
			||||||
    let show = document.getElementById("show");
 | 
					 | 
				
			||||||
    let ws = new WebSocket("ws://localhost:8080/socket");
 | 
					 | 
				
			||||||
    ws.onmessage = function (evt) {
 | 
					 | 
				
			||||||
        let node = document.createElement("div");
 | 
					 | 
				
			||||||
        node.innerHTML = "<h5>" + evt.data + "</h5>";
 | 
					 | 
				
			||||||
        show.appendChild(node);
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
    btn.addEventListener("click", function () {
 | 
					 | 
				
			||||||
        let data = message.value;
 | 
					 | 
				
			||||||
        console.log(data);
 | 
					 | 
				
			||||||
        if (data) {
 | 
					 | 
				
			||||||
            ws.send(encodeURI(data));
 | 
					 | 
				
			||||||
        } else {
 | 
					 | 
				
			||||||
            alert("请输入消息后发送");
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        message.value = "";
 | 
					 | 
				
			||||||
    });
 | 
					 | 
				
			||||||
    // 关闭页面时候关闭ws
 | 
					 | 
				
			||||||
    window.addEventListener("beforeunload", function(event) {
 | 
					 | 
				
			||||||
        ws.close();
 | 
					 | 
				
			||||||
    });
 | 
					 | 
				
			||||||
</script>
 | 
					 | 
				
			||||||
</body>
 | 
					 | 
				
			||||||
</html>
 | 
					 | 
				
			||||||
@@ -1,41 +0,0 @@
 | 
				
			|||||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
					 | 
				
			||||||
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
 | 
					 | 
				
			||||||
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 | 
					 | 
				
			||||||
         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
 | 
					 | 
				
			||||||
		 http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
 | 
					 | 
				
			||||||
         version="3.1">
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <!--配置spring前端控制器-->
 | 
					 | 
				
			||||||
    <servlet>
 | 
					 | 
				
			||||||
        <servlet-name>springMvc</servlet-name>
 | 
					 | 
				
			||||||
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
 | 
					 | 
				
			||||||
        <init-param>
 | 
					 | 
				
			||||||
            <param-name>contextConfigLocation</param-name>
 | 
					 | 
				
			||||||
            <param-value>classpath:springApplication.xml</param-value>
 | 
					 | 
				
			||||||
        </init-param>
 | 
					 | 
				
			||||||
        <load-on-startup>1</load-on-startup>
 | 
					 | 
				
			||||||
    </servlet>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <servlet-mapping>
 | 
					 | 
				
			||||||
        <servlet-name>springMvc</servlet-name>
 | 
					 | 
				
			||||||
        <url-pattern>/</url-pattern>
 | 
					 | 
				
			||||||
    </servlet-mapping>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <filter>
 | 
					 | 
				
			||||||
        <filter-name>characterEncodingFilter</filter-name>
 | 
					 | 
				
			||||||
        <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
 | 
					 | 
				
			||||||
        <init-param>
 | 
					 | 
				
			||||||
            <param-name>encoding</param-name>
 | 
					 | 
				
			||||||
            <param-value>UTF-8</param-value>
 | 
					 | 
				
			||||||
        </init-param>
 | 
					 | 
				
			||||||
        <init-param>
 | 
					 | 
				
			||||||
            <param-name>forceEncoding</param-name>
 | 
					 | 
				
			||||||
            <param-value>true</param-value>
 | 
					 | 
				
			||||||
        </init-param>
 | 
					 | 
				
			||||||
    </filter>
 | 
					 | 
				
			||||||
    <filter-mapping>
 | 
					 | 
				
			||||||
        <filter-name>characterEncodingFilter</filter-name>
 | 
					 | 
				
			||||||
        <url-pattern>/*</url-pattern>
 | 
					 | 
				
			||||||
    </filter-mapping>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
</web-app>
 | 
					 | 
				
			||||||
@@ -1,12 +0,0 @@
 | 
				
			|||||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
 | 
					 | 
				
			||||||
<html>
 | 
					 | 
				
			||||||
<head>
 | 
					 | 
				
			||||||
    <title>Title</title>
 | 
					 | 
				
			||||||
</head>
 | 
					 | 
				
			||||||
<body>
 | 
					 | 
				
			||||||
<form action="${pageContext.request.contextPath}/login" method="post">
 | 
					 | 
				
			||||||
    <input name="username" type="text">
 | 
					 | 
				
			||||||
    <button id="btn">输入临时用户名后登录!</button>
 | 
					 | 
				
			||||||
</form>
 | 
					 | 
				
			||||||
</body>
 | 
					 | 
				
			||||||
</html>
 | 
					 | 
				
			||||||
		Reference in New Issue
	
	Block a user