zoukankan      html  css  js  c++  java
  • 3月工作问题总结

    1. 上线流程和方法比较赞。 review board提交申请,有同事review并ship it,上线代码打tag,然后用german上线,如果出问题,回滚到上一版本tag。tag上线用 svn sw方法,切换分支。
    2. 做了些日志分析,学习memcache,不算入门,能查找问题而已。
    3. eclise的maven问题:生成class文件时候失败,最后发现 order and export顺序有关系,需要在build path里调整之,把maven dependencies。
    4. tomcat与threadlocal:  A web application created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@44676e3f]) and a value of type [test.leak.threadlocal.value.MyCounter] (value [test.leak.threadlocal.value.MyCounter@62770d2e]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.

      问题出现在使用redisClient时候,之前用的是threadlocal,跑在jetty容器里,没有问题,到tomcat时就发现可能有内存泄露问题,更改为普通类,static模块中初始化,暂时没发现问题,参考tomcat文档:http://wiki.apache.org/tomcat/MemoryLeakProtection
    5. json ojbect写出到页面时出错:org.codehaus.jackson.map.JsonMappingException: No serializer found for class org.json.JSONObject and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS) ) 是使用了org.codehaus.jackson.map.ObjectMapper 去writeValueAsString,直接JSONObject.toString()就可以了
      response.setCharacterEncoding("UTF-8");
      response.getOutputStream().print(js.toString()+ '\n');
      OutputStream写中文到页面出错,改为PrintWriter
  • 相关阅读:
    Java基础学习笔记十 Java基础语法之final、static、匿名对象、内部类
    入门设计模式之桥梁模式
    入门设计模式之外观模式
    入门设计模式之策略
    入门设计模式之观察者
    入门设计模式之模板
    入门设计模式之原型
    入门设计模式之工厂
    几分钟几张图教你学会如何使用UML
    入门设计模式之建造者
  • 原文地址:https://www.cnblogs.com/shenguanpu/p/2435683.html
Copyright © 2011-2022 走看看