ITeye博客

Ctrl+C&Ctrl+V

knight_black_bob · 共 487 篇文章

解决xss漏洞

web.xml <filter> <filter-name>xssFilter</filter-name> <filter-class>com.aoi.selfhelp.filters.XSSFilter</filter-class> </filter> <!-- 解决xss漏洞 --> <filter-mapping> <filter-name>xssFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> package com.aoi.selfhelp.filters; import java.io.IOE…

2015-12-29 10:51 · spring · struts · 评论(2) · Web · filter · 漏洞 · 解决 · xss

spring 拦截器

<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.o…

2015-12-23 18:44 · spring · 评论(0) · Java · Spring · Web · 拦截器

struts 拦截器

struts-action-trace.xml <package name="tracePackage" namespace="/trace" extends="exceptionPackage"> <interceptors> <interceptor name="traceAuthInterceptor" class="com.fusionability.web.interceptor.TraceAuthInterceptor"></interceptor> <interceptor-stack name="traceAuthInterceptorStack"> <interceptor…

2015-12-23 18:42 · struts · 评论(0) · Java · Struts · Web · 拦截器

servlet 消息转发

<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:jsp="http://java.sun.com/xml/ns/javaee/jsp" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml…

2015-12-18 17:23 · servlet · 评论(0) · Java · Servlet

elastic search head 基本用法

elastic search head 基本用法 es 安装方法: http://knight-black-bob.iteye.com/blog/2259836 资源监控和集群管理插件 bin/plugin -install lukas-vlcek/bigdesk http://192.168.13.140:9200/_plugin/bigdesk 数据查询插件 bin/plugin -install mobz/elasticsearch-head http://192.168.13.140:9200/_plugin/head/ 理解性: _index 类似 mysql中 database …

2015-12-08 14:33 · elastic search · 评论(0)

struts+spring +jdbctemplate demo

源码下载 :http://download.csdn.net/download/knight_black_bob/9332935 web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:javaee="http://java.sun.com/xml/ns/javaee" xmlns:jsp="http://java.sun.com/xml/…

2015-12-07 11:32 · spring · struts · 评论(4) · Spring · Struts · Web · demo · JdbcTemplate

spring + struts + hibernate demo

源码下载:http://download.csdn.net/download/knight_black_bob/9332831 web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/ja…

2015-12-07 11:09 · spring · struts · hibernate · 评论(0) · Java · Spring · Struts · Hibernate · Web

Linux java mysql es redis 安装

0关闭防火墙 chkconfig iptables off 1空白的center os6 修改 host vi /etc/sysconfig/network HOSTNAME=mechine001 vi /etc/hosts 127.0.0.1 mechine001 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 mechine001 localhost localhost.localdomain localhost6 localhost6.localdomain6 2 切换到root用户 su r…

2015-11-27 18:07 · linux · redis · elastic search · mysql · nexus · 评论(0) · Redis · MySQL · Linux · 安装

软件注册码

edit plus 注册码自动生成网页: http://demon.tw/my-work/editplus-regcode-online.html baoyou F3507-CC2A0-2E1E5-4802E-54FB6 http://www.jb51.net/tools/editplus/ wm ware workstation 12 注册码 5A02H-AU243-TZJ49-GTC7K-3C61N (亲测 可用) AG1N8-DZZ53-484QP-0YN5C-QQ0F2 GG59U-DVZD5-M854Y-NYN7C-P3KW4 AA39H-61W50-H8DCY-1MM79-N2R…

2015-11-18 15:59 · 工具 · 评论(0) · 注册码

sublime设置

可以从 Default/Preferences.sublime-settings 复制。。。。。。 常见设置: // Settings in here override those in "Default/Preferences.sublime-settings", and // are overridden in turn by file type specific settings. { "save_on_focus_lost": true, "default_encoding": "UTF-8", "font_size": 12 } 捐助开发者 在兴趣的驱动下,写一个 免费 的东西,有…

2015-11-16 21:06 · 工具 · 评论(0) · 设置 · sublime

基于cglib 反射 netty http1.0

数据源 代码位置:http://knight-black-bob.iteye.com/blog/2256698 netty 代码位置:http://knight-black-bob.iteye.com/blog/2256690 package com.netty.dto; import com.google.gson.Gson; import com.google.gson.GsonBuilder; public class ResponceInfo { private Integer code; private String message; private Object data; pu…

2015-11-16 17:00 · netty · 评论(0) · Java · 反射 · netty · cglib

(可以跑通的,mybatis+springmvc+druid+Atomikos)基于druid ,多数据 spring

package test.multidatasource; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import com.mifi.…

2015-11-13 17:41 · spring · 评论(0) · MyBatis · SpringMVC · druid · atomikos

netty 基于 http1.0 开发

package com.netty.core; import java.security.cert.CertificateException; import javax.net.ssl.SSLException; import io.netty.bootstrap.ServerBootstrap; import io.netty.channel.Channel; import io.netty.channel.ChannelOption; import io.netty.channel.EventLoopGroup; import io.netty.channel.nio.NioEventL…

2015-11-13 17:03 · netty · 评论(0) · HTTP · netty

spring 注解

其中base-package为需要扫描的包(含所有子包) @Autowired后不需要getter()和setter()方法,Spring也会自动注入 @Qualifier指定注入哪个实现类 @Service用于标注业务层组件 @Controller用于标注控制层组件(如struts中的action) @Repository用于标注数据访问组件,即DAO组件. @Component泛指组件,当组件不好归类的时候,我们可以使用这个注解进行标注。 @Scope(“prototype”)来改变。可以使用以下方式指定初始化方法和销毁方法(方法名任意) 实例解释: 该实例是添加@Component 后…

2015-11-11 16:54 · spring · 评论(1) · Spring · 注解 · @Service · @Component · @Autowired

org.springframework.orm.hibernate3.support.OpenSessionInViewFilter

转载:http://xredman.iteye.com/blog/695938 <!-- hibernateOpenSessionInViewFilter --> <filter> <filter-name>hibernateOpenSessionInViewFilter</filter-name> <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class> </filter> <filter-mapping> <filter-name>hibernateOpe…

2015-11-06 18:08 · hibernate · 评论(0) · Hibernate · load · lazy · OpenSessionInViewFilter · eager