<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[KeepStruggling的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/KeepStruggling</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; KeepStruggling]]></copyright><item><title><![CDATA[CXF实现WebService]]></title><link>https://blog.youkuaiyun.com/KeepStruggling/article/details/107137673</link><guid>https://blog.youkuaiyun.com/KeepStruggling/article/details/107137673</guid><author>KeepStruggling</author><pubDate>Sun, 05 Jul 2020 13:05:12 +0800</pubDate><description><![CDATA[CXF搭建WebService服务端
引入依赖
&lt;!--cxf依赖--&gt;
&lt;dependency&gt;
    &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
    &lt;artifactId&gt;cxf-spring-boot-starter-jaxws&lt;/artifactId&gt;
    &lt;version&gt;3.2.4&lt;/version&gt;
&lt;/dependency&gt;

编写服务接口
impo]]></description><category></category></item><item><title><![CDATA[JWS实现WebService]]></title><link>https://blog.youkuaiyun.com/KeepStruggling/article/details/107103390</link><guid>https://blog.youkuaiyun.com/KeepStruggling/article/details/107103390</guid><author>KeepStruggling</author><pubDate>Fri, 03 Jul 2020 12:52:18 +0800</pubDate><description><![CDATA[    WebService估计大家都有听过或者使用过。Java有几种常用的方式实现webservice，本文主要是讨论JWS实现。
什么是webservice
    简单而言，webservice就是通过SOAP协议在Web上提供的服务，使用WSDL文件进行说明。其特点是走SOAP协议而不是http协议，且传输的数据格式是xml而不是字符串。因为xml的特性，webservice具有跨语言跨平台的特点，而且xml可以封装复杂的对象，甚至可以使用xml加密数据。但由于涉及xml解析，速度相对慢一些。
实现]]></description><category></category></item><item><title><![CDATA[Java运行Python脚本]]></title><link>https://blog.youkuaiyun.com/KeepStruggling/article/details/106342089</link><guid>https://blog.youkuaiyun.com/KeepStruggling/article/details/106342089</guid><author>KeepStruggling</author><pubDate>Fri, 29 May 2020 22:54:30 +0800</pubDate><description><![CDATA[    前段时间遇到了在JavaWeb项目中嵌入运行Python脚本的功能的需求。想到的方案有两种，一种是使用Java技术（Jython或Runtime.exec）运行Python脚本，另一种是搭建一个Python工程对外提供相应http或webservice接口。两种方案我都有实现，简单的测试了一下，本机环境两者的执行效率没有太大的差距。考虑到项目的情况，最终选择了第一种方案。
    闲话少说，我们赶紧看看Java怎么实现运行Python脚本的吧~
Jython实现
    简单来说，我们常说的Pyth]]></description><category></category></item><item><title><![CDATA[Springboot使用aop技术（记录操作日志）]]></title><link>https://blog.youkuaiyun.com/KeepStruggling/article/details/106157528</link><guid>https://blog.youkuaiyun.com/KeepStruggling/article/details/106157528</guid><author>KeepStruggling</author><pubDate>Sat, 16 May 2020 12:54:57 +0800</pubDate><description><![CDATA[1. 前言
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;有一段时间没有使用面向切面编程（aop），有点生疏。恰好项目有在执行方法前后需要预处理和返回处理的需求，所以打算借机重拾起来。由于保密的原因，加上aop的原理大同小异，我还是从万年不变的日志记录开始aop的复习吧~
2. 准备工作
2.1.表格创建
2.1.1操作日志表
CREATE TABLE `operation_log` (
  `id` int(11) NOT NULL AUTO_INCREM]]></description><category></category></item><item><title><![CDATA[Websocket技术的Java实现(下篇)]]></title><link>https://blog.youkuaiyun.com/KeepStruggling/article/details/105923142</link><guid>https://blog.youkuaiyun.com/KeepStruggling/article/details/105923142</guid><author>KeepStruggling</author><pubDate>Wed, 06 May 2020 22:41:27 +0800</pubDate><description><![CDATA[    在上篇中，我们探讨了使用Java实现websocket的方式。但显然，上篇的实现方式还有一些细节的东西需要打磨一下。那么在下篇中，我们就一起优化一下上篇中的实现方式吧。
sid

...]]></description><category></category></item><item><title><![CDATA[Websocket技术的Java实现(上篇)]]></title><link>https://blog.youkuaiyun.com/KeepStruggling/article/details/105543449</link><guid>https://blog.youkuaiyun.com/KeepStruggling/article/details/105543449</guid><author>KeepStruggling</author><pubDate>Wed, 15 Apr 2020 21:22:33 +0800</pubDate><description><![CDATA[    在项目的开发时，遇到实现服务器主动发送数据到前端页面的功能的需求。实现该功能不外乎使用轮询和websocket技术，但在考虑到实时性和资源损耗后，最后决定使用websocket。现在就记录一下用Java实现Websocket技术吧~
    Java实现Websocket通常有两种方式：1、创建WebSocketServer类，里面包含open、close、message、error等方法...]]></description><category></category></item><item><title><![CDATA[利用ajax长轮询、短轮询实现消息实时更新]]></title><link>https://blog.youkuaiyun.com/KeepStruggling/article/details/105498682</link><guid>https://blog.youkuaiyun.com/KeepStruggling/article/details/105498682</guid><author>KeepStruggling</author><pubDate>Mon, 13 Apr 2020 21:59:04 +0800</pubDate><description><![CDATA[前言
    实现消息实时更新常见的三种方式是：短轮询、长轮询和websocket。短轮询、长轮询是http轮询机制，利用浏览器持续发送请求，服务器将最新的数据响应请求，本质还是http协议的request-response模式。websocket利用了http协议完成一部分握手过程，首先发起http请求，在请求头中加入升级为websocket的必要参数，服务器收到请求便不再走http协议，而是创...]]></description><category></category></item><item><title><![CDATA[sql语句50题的个人解法+理解（MySQL）]]></title><link>https://blog.youkuaiyun.com/KeepStruggling/article/details/101670550</link><guid>https://blog.youkuaiyun.com/KeepStruggling/article/details/101670550</guid><author>KeepStruggling</author><pubDate>Sun, 29 Sep 2019 09:01:50 +0800</pubDate><description><![CDATA[前言
  写这篇文章主要是自觉sql方面的不足，在网上找练习题的时候找到了优快云博主启明星的指引的sql语句练习50题(Mysql版)这篇文章，感觉很有用。于是将自己做题的思路和思考记录下来，以备平常复习。本文也有参考其他文献，参考的文献网址也已记录下来。如果有新的解法或者自己思考的内容有错误，烦请大家能够指出。再次感谢启明星的指引和其他文献作者的贡献。
  本人用的是mysql的5.7版本。建...]]></description><category></category></item><item><title><![CDATA[Project小目标-前后端代码编写套路]]></title><link>https://blog.youkuaiyun.com/KeepStruggling/article/details/84677099</link><guid>https://blog.youkuaiyun.com/KeepStruggling/article/details/84677099</guid><author>KeepStruggling</author><pubDate>Sat, 01 Dec 2018 18:25:57 +0800</pubDate><description><![CDATA[1. 模块CRUD套路
1.1 需求分析
– 操作哪张表格？实现什么效果
1.2 前端代码
– 引入相应的js代码，数据绑定
– 数据封装（json对象，对象中key是实体类属性）。根据表格关系决定数据格式，但是一对{}
– 发送异步请求

参数传入相应后台
获取响应数据（迭代数据、提示信息）。注意返回数据的格式，是一个json字符串

1.3 后端代码
– 控制器（对应表的控制器）
– 服务接口...]]></description><category></category></item><item><title><![CDATA[通用Mapper的使用]]></title><link>https://blog.youkuaiyun.com/KeepStruggling/article/details/84313239</link><guid>https://blog.youkuaiyun.com/KeepStruggling/article/details/84313239</guid><author>KeepStruggling</author><pubDate>Wed, 21 Nov 2018 09:13:10 +0800</pubDate><description><![CDATA[转自https://blog.youkuaiyun.com/jinYwuM/article/details/80535538

								            
						
                1、导入依赖
&amp;amp;lt;dependency&amp;amp;gt;    &amp;amp;lt;groupId&amp;amp;gt;com.github.abel533&amp;amp;lt;/groupId&amp;amp;gt;    &amp;amp;lt;artifactId&a]]></description><category></category></item><item><title><![CDATA[Java框架-SpringMVC统一异常处理、ssm框架整合]]></title><link>https://blog.youkuaiyun.com/KeepStruggling/article/details/83549231</link><guid>https://blog.youkuaiyun.com/KeepStruggling/article/details/83549231</guid><author>KeepStruggling</author><pubDate>Tue, 30 Oct 2018 21:26:30 +0800</pubDate><description><![CDATA[1. SpringMVC中异常处理
1.1 各层处理异常原则即实现方法
1.1.1 各层处理异常原则
dao：不处理，抛异常；
service：不处理，抛异常；
controller/servlet：必须处理，否则错误信息将直接在浏览器显示给用户看。
1.1.2 异常处理实现方法

方法1：控制层的方法中写try…catch。异常处理信息一多，控制层方法就会十分冗余，而且每个控制器都有可能有异常，...]]></description><category></category></item><item><title><![CDATA[Java框架-SpringMVC的应用（json数据交互、控制器方法返回值、文件上传）]]></title><link>https://blog.youkuaiyun.com/KeepStruggling/article/details/83549197</link><guid>https://blog.youkuaiyun.com/KeepStruggling/article/details/83549197</guid><author>KeepStruggling</author><pubDate>Tue, 30 Oct 2018 21:24:43 +0800</pubDate><description><![CDATA[1. 搭建SpringMVC开发环境
1.1 创建项目，添加依赖
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;
&amp;lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot;
         xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
     ...]]></description><category></category></item><item><title><![CDATA[Java框架-Spring的jdbc、连接池及事务管理]]></title><link>https://blog.youkuaiyun.com/KeepStruggling/article/details/83450048</link><guid>https://blog.youkuaiyun.com/KeepStruggling/article/details/83450048</guid><author>KeepStruggling</author><pubDate>Sat, 27 Oct 2018 21:32:01 +0800</pubDate><description><![CDATA[1. Spring的AOP编程
1.1 纯xml编程
&amp;lt;!--通知配置类型--&amp;gt;
&amp;lt;aop:config&amp;gt;
    &amp;lt;!--设置切面--&amp;gt;
    &amp;lt;aop:aspect ref=&quot;logger&quot;&amp;gt;
        &amp;lt;!--设置切入点表达式--&amp;gt;
        &amp;lt;aop:pointcut id=&quot;pt&quot; expre]]></description><category></category></item><item><title><![CDATA[Java框架-代理模式详细介绍、Spring的AOP]]></title><link>https://blog.youkuaiyun.com/KeepStruggling/article/details/83450027</link><guid>https://blog.youkuaiyun.com/KeepStruggling/article/details/83450027</guid><author>KeepStruggling</author><pubDate>Sat, 27 Oct 2018 21:30:27 +0800</pubDate><description><![CDATA[1. 代理模式详介
1.1 分类和作用

分类：静态代理、jdk动态代理(接口代理)、cglib动态代理(子类代理)技术
使用代理的原因：实际开发中通常都会调用别人编写的代码/框架来完成业务需求。很多情况是需要对这些代码/框架进行微调或扩展，而如果修改原代码很容易出现错误。这时候就需要使用代理。
作用：通过代理访问目标对象。在目标对象实现的基础上，增强额外的功能操作，即在不修改原代码的基础上扩展目...]]></description><category></category></item><item><title><![CDATA[Java框架-Spring基于注解的IOC配置及纯注解]]></title><link>https://blog.youkuaiyun.com/KeepStruggling/article/details/83450010</link><guid>https://blog.youkuaiyun.com/KeepStruggling/article/details/83450010</guid><author>KeepStruggling</author><pubDate>Sat, 27 Oct 2018 21:29:06 +0800</pubDate><description><![CDATA[
注解配置与xml配置都实现了减低程序间耦合的功能。
不同公司由不同习惯，有可能是纯xml、纯注解（很少）或者xml与注解混合使用（基于注解的IOC配置）。

1. 基于注解的IOC配置
1.1 创建一个简单案例
1.1.1 创建项目，添加依赖（pom.xml）
&amp;lt;!--导入spring组件包--&amp;gt;
&amp;lt;dependency&amp;gt;
    &amp;lt;groupId&amp;gt;org.s...]]></description><category></category></item><item><title><![CDATA[Java框架-Spring概念及纯xml配置]]></title><link>https://blog.youkuaiyun.com/KeepStruggling/article/details/83449985</link><guid>https://blog.youkuaiyun.com/KeepStruggling/article/details/83449985</guid><author>KeepStruggling</author><pubDate>Sat, 27 Oct 2018 21:27:11 +0800</pubDate><description><![CDATA[1. 三层架构中的spring及spring概述
1.1 三层架构中的spring


Spring框架对三层架构都有支持，dao提供支持（如JDBCTemplate）、service提供事务支持、web提供了springmvc框架支持等。

1.2 Spring的概述

Spring是于2003年兴起的一个轻量级的Java开发开源框架。
由Rod Johnson首次提出。
Spring的核心是控...]]></description><category></category></item><item><title><![CDATA[Java框架-mybatis延迟加载、缓存和注解开发]]></title><link>https://blog.youkuaiyun.com/KeepStruggling/article/details/83449951</link><guid>https://blog.youkuaiyun.com/KeepStruggling/article/details/83449951</guid><author>KeepStruggling</author><pubDate>Sat, 27 Oct 2018 21:24:32 +0800</pubDate><description><![CDATA[1. 延迟加载
1.1 概念

在需要用到数据时才进行加载，不需要用到数据时就不加载数据。也称作懒加载
好处：先从单表查询，需要时再从关联表去关联查询，大大提高数据库性能
缺点：在大批量数据查询时，由于查询会耗时，可能导致用户等待时间变长，影响用户体验

其中：mybatis的association、collection标签具备延迟加载功能
及时加载：一次加载所有数据。
1.2 一对一实现延时加载...]]></description><category></category></item><item><title><![CDATA[Java框架-mybatis连接池、动态sql和多表查询]]></title><link>https://blog.youkuaiyun.com/KeepStruggling/article/details/83449940</link><guid>https://blog.youkuaiyun.com/KeepStruggling/article/details/83449940</guid><author>KeepStruggling</author><pubDate>Sat, 27 Oct 2018 21:23:21 +0800</pubDate><description><![CDATA[1. mybatis连接池

通过SqlMapConfig.xml设置dataSource type实现连接池的配置

1.1 dataSource标签type属性值含义
type=”POOLED”： MyBatis 会创建 PooledDataSource 实例
type=”UNPOOLED” ： MyBatis 会创建 UnpooledDataSource 实例
type=”JNDI”： My...]]></description><category></category></item><item><title><![CDATA[ava框架-mybatis框架CRUD操作]]></title><link>https://blog.youkuaiyun.com/KeepStruggling/article/details/83449914</link><guid>https://blog.youkuaiyun.com/KeepStruggling/article/details/83449914</guid><author>KeepStruggling</author><pubDate>Sat, 27 Oct 2018 21:21:39 +0800</pubDate><description><![CDATA[1. Mybatis框架的CRUD操作
1.1 实现添加操作

以对用户表进行DRUD操作为例

1.1.1 构建环境
1.1.1.1 添加依赖（pom.xml）
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;
&amp;lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot;
         xmlns:xsi=...]]></description><category></category></item><item><title><![CDATA[Java框架-mybatis-基础]]></title><link>https://blog.youkuaiyun.com/KeepStruggling/article/details/83449908</link><guid>https://blog.youkuaiyun.com/KeepStruggling/article/details/83449908</guid><author>KeepStruggling</author><pubDate>Sat, 27 Oct 2018 21:20:35 +0800</pubDate><description><![CDATA[1. 概念
1.1 概念引入

框架（ Framework）是整个或部分系统的可重用设计，表现为一组抽象构件及构件实例间交互的方法。或者说是可被应用开发者定制的应用骨架。
框架的优点：

框架已经实现了一些功能，使用时不需重复实现这些功能，提高开发效率；
使用框架后，我们软件的架构更加稳定、开发流程必须按照框架约定进行，而优秀的框架是所有开发人员都熟悉的，任何人进入项目团队后可以更快适应开发，同时...]]></description><category></category></item></channel></rss>