<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[Truong的专栏]]></title><description><![CDATA[编程能力重要、程序员的积累和借鉴他人的能力也很重要]]></description><link>https://blog.youkuaiyun.com/Truong</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; Truong]]></copyright><item><title><![CDATA[Spring AMQP弹性:从错误和代理故障中恢复]]></title><link>https://blog.youkuaiyun.com/Truong/article/details/133608096</link><guid>https://blog.youkuaiyun.com/Truong/article/details/133608096</guid><author>Truong</author><pubDate>Fri, 06 Oct 2023 11:28:28 +0800</pubDate><description><![CDATA[此外，如果您关心保证传递，您可能还需要在 RabbitTemplate 和 SimpleMessageListenerContainer 中使用 channelTransacted 标志，以及在 SimpleMessageListenerContainer 中使用 AcknowledgeMode.AUTO（如果您自己执行 ack，则为手动）。Spring AMQP 提供的一些关键（也是最流行的）高级功能与协议错误或代理故障时的恢复和自动重新连接有关。]]></description><category></category></item><item><title><![CDATA[Spring AMQP匿名队列AnonymousQueue]]></title><link>https://blog.youkuaiyun.com/Truong/article/details/133555303</link><guid>https://blog.youkuaiyun.com/Truong/article/details/133555303</guid><author>Truong</author><pubDate>Wed, 04 Oct 2023 16:28:17 +0800</pubDate><description><![CDATA[第一个 bean 生成一个以 spring.gen- 为前缀的队列名称，后跟 UUID 的 Base64 表示形式——例如：spring.gen-MRBv9sqISkuCiPfOYfpo4g。一般来说，当您需要唯一命名、独占、自动删除的队列时，我们建议您使用 AnonymousQueue 而不是代理定义的队列名称（使用“”作为队列名称会导致代理生成队列名称）。如果我们使用代理声明的队列，队列名称将会更改。您可以提供自己的命名策略，从而可以在队列名称中包含其他信息（例如应用程序名称或客户端主机）。]]></description><category></category></item><item><title><![CDATA[Spring AMQP元注解]]></title><link>https://blog.youkuaiyun.com/Truong/article/details/133241256</link><guid>https://blog.youkuaiyun.com/Truong/article/details/133241256</guid><author>Truong</author><pubDate>Sun, 24 Sep 2023 15:15:19 +0800</pubDate><description><![CDATA[从版本 2.2.3 开始，支持 @AliasFor 以允许覆盖元注释注释上的属性。此外，用户注释现在可以是@Repeatable，允许为一个方法创建多个容器。在前面的示例中，@MyAnonFanoutListener 注释创建的每个侦听器都会将一个匿名自动删除队列绑定到扇出交换 metaFanout。有时您可能希望对多个侦听器使用相同的配置。为了减少样板配置，您可以使用元注释来创建自己的侦听器注释。版权声明：本文为网站:2のN次方文章，遵循CC 4.0 BY-SA版权协议，转载请附上原文出处链接及本声明。]]></description><category></category></item><item><title><![CDATA[Spring框架：跨域问题之使用@CrossOrigin注解解决失败的原因总结]]></title><link>https://blog.youkuaiyun.com/Truong/article/details/78697883</link><guid>https://blog.youkuaiyun.com/Truong/article/details/78697883</guid><author>Truong</author><pubDate>Sat, 02 Dec 2017 19:55:21 +0800</pubDate><description><![CDATA[问题描述：跨域问题




解决方案：

在Spring框架4.2版本后，Spring给出了注解的方式解决问题。

即在Controller控制器中，在Controller注解上方添加@CrossOrigin注解。




但是使用这种方式后也有可能仍然出现跨域问题，解决方案之一就是：




在@RequestMapping注解中没有指定Get、Post方式]]></description><category></category></item><item><title><![CDATA[springboot Mapper: Specified class is an interface]]></title><link>https://blog.youkuaiyun.com/Truong/article/details/78477735</link><guid>https://blog.youkuaiyun.com/Truong/article/details/78477735</guid><author>Truong</author><pubDate>Wed, 08 Nov 2017 13:42:46 +0800</pubDate><description><![CDATA[使用springboot集成mongo和mybatis的时候，启动报错XXXMapper]: Specified class is an interface
怀疑mybatis和mongo扫描时互相干扰造成的。
在Application启动类中添加
@MapperScan("com.demo.springboot.mapper")

启动正常
欢迎加入我们交流群578692121]]></description><category></category></item><item><title><![CDATA[Mongo分组取每组最大的一条记录]]></title><link>https://blog.youkuaiyun.com/Truong/article/details/78459675</link><guid>https://blog.youkuaiyun.com/Truong/article/details/78459675</guid><author>Truong</author><pubDate>Mon, 06 Nov 2017 17:18:44 +0800</pubDate><description><![CDATA[使用Spring-data-mongo统计每个班级最高成绩


Criteria criteria = Criteria.where("classId").in(classIds);


GroupOperation groupOperation = Aggregation.group("classId").max("score").as("score");



Aggreg]]></description><category></category></item><item><title><![CDATA[日期格式yyyy/MM/dd格式转为yyyy-MM-dd格式]]></title><link>https://blog.youkuaiyun.com/Truong/article/details/78215828</link><guid>https://blog.youkuaiyun.com/Truong/article/details/78215828</guid><author>Truong</author><pubDate>Thu, 12 Oct 2017 15:53:14 +0800</pubDate><description><![CDATA[SimpleDateFormat sdfx = new SimpleDateFormat("yyyy/MM/dd");
SimpleDateFormat sdfh = new SimpleDateFormat("yyyy-MM-dd");
String nowTime2 = "";
try{
     nowTime2 = sdfh.format(sdfx.parse("2010/12/1]]></description><category></category></item><item><title><![CDATA[如何连接ftp服务器]]></title><link>https://blog.youkuaiyun.com/Truong/article/details/78191784</link><guid>https://blog.youkuaiyun.com/Truong/article/details/78191784</guid><author>Truong</author><pubDate>Tue, 10 Oct 2017 13:54:12 +0800</pubDate><description><![CDATA[windows下下载flshfxp进行连接。如pasv模式连接失败，过一段时间会自动用port模式连接。
参考http://jingyan.baidu.com/article/36d6ed1f58dbe41bcf488381.html]]></description><category></category></item><item><title><![CDATA[FTP的两种连接模式：Port模式和Pasv模式]]></title><link>https://blog.youkuaiyun.com/Truong/article/details/78191772</link><guid>https://blog.youkuaiyun.com/Truong/article/details/78191772</guid><author>Truong</author><pubDate>Tue, 10 Oct 2017 13:53:04 +0800</pubDate><description><![CDATA[FTP是File Transfer Protocol（文件传输协议）的缩写，用来在两台计算机之间互相传送文件。相比于HTTP，FTP协议要复杂得多。复杂的原因，是因为FTP协议要用 到两个TCP连接，一个是命令链路，用来在FTP客户端与服务器之间传递命令；另一个是数据链路，用来上传或下载数据。

FTP协议有两种工作方式：PORT模式和PASV模式，中文意思为主动式和被动式。

ORT（主]]></description><category></category></item><item><title><![CDATA[java 数字前补零]]></title><link>https://blog.youkuaiyun.com/Truong/article/details/78185363</link><guid>https://blog.youkuaiyun.com/Truong/article/details/78185363</guid><author>Truong</author><pubDate>Mon, 09 Oct 2017 18:22:29 +0800</pubDate><description><![CDATA[/** 
  * 将元数据前补零，补后的总长度为指定的长度，以字符串的形式返回 
  * @param sourceDate 
  * @param formatLength 
  * @return 重组后的数据 
  */  
 public static String frontCompWithZore(int sourceDate,int formatLength)  
 {]]></description><category></category></item><item><title><![CDATA[sql语句无错误 order by 和limit一起用数据查询不准有重复]]></title><link>https://blog.youkuaiyun.com/Truong/article/details/78184149</link><guid>https://blog.youkuaiyun.com/Truong/article/details/78184149</guid><author>Truong</author><pubDate>Mon, 09 Oct 2017 16:44:13 +0800</pubDate><description><![CDATA[如sql无错误，但总是查询不准，有重复。
并且去掉order by只保留limit数据就准确，原因在于mysql种order by和limit一起用，当order by有多条相同值时，mysql优化之后存在陷阱。
解决方案，order by yourziduan,id 添加个其他字段辅助排序。
参考http://blog.youkuaiyun.com/qiubabin/article/details/7]]></description><category></category></item><item><title><![CDATA[h5页面 pc端html 调用QQ群]]></title><link>https://blog.youkuaiyun.com/Truong/article/details/78097488</link><guid>https://blog.youkuaiyun.com/Truong/article/details/78097488</guid><author>Truong</author><pubDate>Tue, 26 Sep 2017 15:51:18 +0800</pubDate><description><![CDATA[很难找,在网上找了很久都没有找到,最终在群里问朋友,才找到这段代码.虽然代码不长,但是建议需要的朋友收藏一下.绝对有效!

移动端H5 QQ在线客服链接代码
a href="mqqwpa://im/chat?chat_type=wpa&uin=2679571084&version=1&src_type=web&web_src=bjhuli.com">报名咨询a>1

经过测试,安卓和,I]]></description><category></category></item><item><title><![CDATA[update的where中如何做sum并判断]]></title><link>https://blog.youkuaiyun.com/Truong/article/details/77993681</link><guid>https://blog.youkuaiyun.com/Truong/article/details/77993681</guid><author>Truong</author><pubDate>Fri, 15 Sep 2017 17:14:49 +0800</pubDate><description><![CDATA[update table_name 
                                   set status = 2 
where 
             #{cnum} = 
    (
select v.cSum from
                                                (
                 ]]></description><category></category></item><item><title><![CDATA[Mybatis Could not find result map XXXX int]]></title><link>https://blog.youkuaiyun.com/Truong/article/details/77922154</link><guid>https://blog.youkuaiyun.com/Truong/article/details/77922154</guid><author>Truong</author><pubDate>Sun, 10 Sep 2017 14:45:07 +0800</pubDate><description><![CDATA[出现这种情况
Mapper或者Dao的接口方法返回类型为Integer，而定义的resultMap，select 也是 多个字段
根据你业务，检查xml每个标签，将xml中的返回类型，与mapper接口的返回类型修改一致即可
欢迎加入我们的交流群425783133]]></description><category></category></item><item><title><![CDATA[安卓webview无法加载html页面]]></title><link>https://blog.youkuaiyun.com/Truong/article/details/77896593</link><guid>https://blog.youkuaiyun.com/Truong/article/details/77896593</guid><author>Truong</author><pubDate>Fri, 08 Sep 2017 16:55:07 +0800</pubDate><description><![CDATA[在接入第三方h5的时候出现过这样一个问题，如下
现象
1）验签通过
2）安卓app中的webview加载不出页面
3）浏览器请求可以加载
原因
js兼容性问题，安卓使用webkit内核浏览器。
欢迎加入我们的技术交流群425783133，非客户端群。]]></description><category></category></item><item><title><![CDATA[h5区分手机QQApp上内置浏览器和QQ浏览器App]]></title><link>https://blog.youkuaiyun.com/Truong/article/details/77646330</link><guid>https://blog.youkuaiyun.com/Truong/article/details/77646330</guid><author>Truong</author><pubDate>Mon, 28 Aug 2017 11:57:03 +0800</pubDate><description><![CDATA[直接上js 
var ua = navigator.userAgent.toLowerCase();
                if(ua.indexOf('pa qq') > -1){
                        return true;
                }
欢迎加入我们交流群425783133]]></description><category></category></item><item><title><![CDATA[No qualifying bean of type [com.jj.mapper.UserMapper] found for dependency]]></title><link>https://blog.youkuaiyun.com/Truong/article/details/77606848</link><guid>https://blog.youkuaiyun.com/Truong/article/details/77606848</guid><author>Truong</author><pubDate>Sat, 26 Aug 2017 21:10:54 +0800</pubDate><description><![CDATA[环境
web.xml中只配置了DispatcherServlet，没有配置ContextLoaderListener
spring-mvc配置了注解

  

applicationContext.xml不存在或名字不一样。
报错
No qualifying bean of type [com.jj.mapper.UserMapper] found for dependency
]]></description><category></category></item><item><title><![CDATA[mongodb输错命令后不能删除问题]]></title><link>https://blog.youkuaiyun.com/Truong/article/details/77096085</link><guid>https://blog.youkuaiyun.com/Truong/article/details/77096085</guid><author>Truong</author><pubDate>Fri, 11 Aug 2017 12:32:09 +0800</pubDate><description><![CDATA[在用crt连接Linux操作MongoDB时，命令输错了，想删除的时候，却删除不了，原因是crt的配置有问题，解决办法如下
第一步：选项-->会话选项



第二步：终端-->仿真-->终端（T）选为linux]]></description><category></category></item><item><title><![CDATA[redis开启远程访问]]></title><link>https://blog.youkuaiyun.com/Truong/article/details/76995049</link><guid>https://blog.youkuaiyun.com/Truong/article/details/76995049</guid><author>Truong</author><pubDate>Wed, 09 Aug 2017 15:19:15 +0800</pubDate><description><![CDATA[redis默认只允许本地访问，要使redis可以远程访问可以修改redis.conf
 
打开redis.conf文件在NETWORK部分有说明
 




################################## NETWORK #####################################
 
# By default, if no "bind" c]]></description><category></category></item><item><title><![CDATA[mongodb删除数据]]></title><link>https://blog.youkuaiyun.com/Truong/article/details/76994766</link><guid>https://blog.youkuaiyun.com/Truong/article/details/76994766</guid><author>Truong</author><pubDate>Wed, 09 Aug 2017 15:18:02 +0800</pubDate><description><![CDATA[删除mongodb集合中的数据可以使用remove()函数。remove()函数可以接受一个查询文档作为可选参数来有选择性的删除符合条件的文档。

remove()函数不会删除集合本身，同时，原有的索引也同样不会被删除。

删除文档是永久性的，不能撤销，也不能恢复的。因此，在执行remove()函数前先用find()命令来查看下是否正确，是个比较好的习惯啦。

1. 删除"ban_fr]]></description><category></category></item></channel></rss>