在线A亚洲老鸭窝天堂,亚洲国产人成中文幕一级二级,国产亚洲精久久久久久无码77777http://www.tkk7.com/liuxiaosan/操蛋的人生處處充滿美妙zh-cnSat, 10 May 2025 07:30:22 GMTSat, 10 May 2025 07:30:22 GMT60SpringMVC中Velocity的配置http://www.tkk7.com/liuxiaosan/archive/2011/11/24/364737.htmlliucsliucsThu, 24 Nov 2011 07:57:00 GMThttp://www.tkk7.com/liuxiaosan/archive/2011/11/24/364737.htmlhttp://www.tkk7.com/liuxiaosan/comments/364737.htmlhttp://www.tkk7.com/liuxiaosan/archive/2011/11/24/364737.html#Feedback0http://www.tkk7.com/liuxiaosan/comments/commentRss/364737.htmlhttp://www.tkk7.com/liuxiaosan/services/trackbacks/364737.html
    <bean id="velocityConfigurer" class="org.springframework.web.servlet.view.velocity.VelocityConfigurer">
        
<property name="resourceLoaderPath"><!-- 頁面文件的路徑,相對于webapp -->
            
<value>templates</value>
        </property>
        
<!-- Velocity屬性配置 -->
        
<property name="velocityProperties">
            
<props>
                
<prop key="input.encoding">UTF-8</prop><!-- 指定模板引擎進(jìn)行模板處理的編碼 -->
                
<prop key="output.encoding">UTF-8</prop><!-- 指定輸出流的編碼 -->
                
<prop key="contentType">text/html;charset=UTF-8</prop><!-- contentType -->
                
<prop key="velocimacro.library">macro/macros.vm</prop><!-- Velocimacro 模板庫的列表 -->
                
<prop key="eventhandler.referenceinsertion.class">com.sde.common.web.escape.reference.NoEscapeHtmlReference</prop>
                
<prop key="eventhandler.noescape.html.match">/(?:screen_content)|(?:noescape_.*)/</prop>
            
</props>
        
</property>
    
</bean>

    
<bean id="viewResolver" class="org.springframework.web.servlet.view.velocity.VelocityLayoutViewResolver">
         
<property name="cache" value="false" /><!--是否緩存模板-->
          
<property name="prefix" value="" />
         
<property name="suffix" value=".vm" />
         
<property name="toolboxConfigLocation" value="/WEB-INF/toolbox.xml" /><!--toolbox配置文件路徑-->
          <property name="dateToolAttribute" value="date" /><!--日期函數(shù)名稱-->
          <property name="numberToolAttribute" value="number" /><!--數(shù)字函數(shù)名稱-->
         
<property name="contentType" value="text/html;charset=UTF-8" />
          
<property name="exposeSpringMacroHelpers" value="true" /><!--是否使用spring對宏定義的支持-->        
          <property name="exposeRequestAttributes" value="true" /><!--是否開放request屬性-->
 
         <property name="requestContextAttribute" value="rc"/><!--request屬性引用名稱-->
             <property name="layoutUrl" value="templates/layout/default.vm"/<!--指定layout文件-->
   </bean>


liucs 2011-11-24 15:57 發(fā)表評論
]]>
基于注解的SpringMVChttp://www.tkk7.com/liuxiaosan/articles/357092.htmlliucsliucsMon, 05 Sep 2011 08:42:00 GMThttp://www.tkk7.com/liuxiaosan/articles/357092.htmlhttp://www.tkk7.com/liuxiaosan/comments/357092.htmlhttp://www.tkk7.com/liuxiaosan/articles/357092.html#Feedback2http://www.tkk7.com/liuxiaosan/comments/commentRss/357092.htmlhttp://www.tkk7.com/liuxiaosan/services/trackbacks/357092.html一、概述SpringMVC在2.5版本后新增了注解功能,2.5版本以前的基本通過繼承Controller體系來開發(fā)業(yè)務(wù)控制器,2.5版本后Controller體系中
BaseCommandController及其子類AbstractCommandController、AbstractFormController、AbstractWizardFormController、
SimpleFormController、CancellableFormController等都已經(jīng)被標(biāo)示為@Deprecated,建議不再使用。

相比傳統(tǒng)的繼承Controller體系中某些類的方式,SpringMVC的注解具有以下優(yōu)點(diǎn):
1、Controller不再需要繼承某個(gè)特定類,只是簡單的POJO。
2、請求映射的配置非常方便靈活。
3、參數(shù)綁定機(jī)制非常方便豐富。
4、可以根據(jù)不同的http方法或者參數(shù),細(xì)粒度處理不同的http請求

二、示例

下面通過對SpringMVC注解的詳細(xì)介紹來看一下上述優(yōu)點(diǎn)。

首先需要在應(yīng)用的dispatcher-servlet.xml 啟動(dòng)注解機(jī)制
<context:annotation-config />
<!-- 設(shè)置注解驅(qū)動(dòng) -->
<mvc:annotation-driven />
 
<!-- 設(shè)置掃描的包 -->
<context:component-scan base-package="com.demo.web.controller" />
<bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping" />
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter" />

注:雖然我們的Controller不需要再繼承任何類,但出于規(guī)范,我們?nèi)匀幻麨?**Controller.java,并統(tǒng)一放在com.demo.web.controller包中。

1、@Controller注解

簡單示例
package com.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
class IndexController {
    @RequestMapping(
"/index")
    String index() {
        
return "index";
    }
}

在一個(gè)POJO上面使用 @Controller 就可以標(biāo)注該P(yáng)OJO是一個(gè)Controller,就這么簡單。 @Controller注解定義在org.springframework.steretype包中。
使用方式: @Controller 或者 @Controller("indexController)。 org.springframework.steretype包中還包含 @Componenet @Service @Respository
三個(gè)注解。@Component是通用標(biāo)注,@Controller標(biāo)注web控制器,@Service標(biāo)注Servicec層的服務(wù),@Respository標(biāo)注DAO層的數(shù)據(jù)訪問。

2、使用@RequestMapping注解處理請求映射

    SpringMVC中注解基本都包含在 org.springframework.web.bind.annotation 包中。先看一下@RequestMapping 注解的源碼。
@Target( { ElementType.METHOD, ElementType.TYPE })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Mapping
public @interface RequestMapping {

    
/**
     * 指定映射的URL.可以在類層次和方法層次使用。方式如下:
     * @RequestMapping("/add_")或 @RequestMapping(value = "/add")
     * 支持Ant風(fēng)格的URL映射,如 @RequestMapping("/myPath/*.htm")
     * 在類層次指定了映射后,可以在方法層次再指定相對路徑
     
*/
    String[] value() 
default {};

    
/**
     * 指定HttpRequest的方法, 如:GET, POST, HEAD, OPTIONS, PUT, DELETE, TRACE.
     * 使用舉例: @RequestMapping(value = "/add_activity", method = RequestMethod.GET)
     
*/
    RequestMethod[] method() 
default {};

    
/**
     * 指定HttpRequest中包含的參數(shù),使用方式如下:
     * @RequestMapping(value = "/something",params="myParam") 請求包含myParam參數(shù)
     * @RequestMapping(value = "/something",params="myParam=myValue")請求包含myParam參數(shù),并且該參數(shù)值為myValue
     * @RequestMapping(value = "/something",params="!myParam") 請求不包含myParam參數(shù)
     
*/
    String[] params() 
default {};

    
/**
     * 指定HttpRequest中包含的頭部信息,使用方式如下:
     * @RequestMapping(value = "/something", headers="content-type")請求包含該頭部
     * @RequestMapping(value = "/something", headers="content-type=text/*")請求包含特定值的頭部
     * @RequestMapping(value = "/something", headers="!content-type")請求不包含該頭部
     
*/
    String[] headers() 
default {};

}
注:如果在類層次指定了映射,則方法層次上都將繼承類層次的映射

3、獲取HttpRequest中得參數(shù)

@RequestMapping("active")
public @ResponseBody boolean active(Long accountId) {
    return accountService.activeAccount(accountId);
}

@RequestMapping("active")
public @ResponseBody boolean active(Account account) {
    return accountService.activeAccount(accountId);
}
@RequestMapping(
"inactive")
public @ResponseBody boolean inactive(@RequestParam("accountId") Long accountId,
            @RequestHeader(
"User-Agent") String userAgent,
            @CookieValue(
"loginId") String loginId) {
    
return accountService.inactiveAccount(accountId);
}

@RequestMapping(value 
= "list/{pageNo}", method = RequestMethod.GET)
public String list(@PathVariable int pageNo) {
     
return "/account/list";
}

@RequestMapping(value = "add", method = RequestMethod.GET)
public String add(@RequestBody String body) {
     return "/account/add";
}


active方法的入?yún)?accountId,如果請求中有名為 accountId的參數(shù),則會(huì)進(jìn)行默認(rèn)綁定,不僅基本類型,javabean的屬性也可以默認(rèn)進(jìn)行綁定;
如果需要明確綁定,使用@RequestParam。 一般建議進(jìn)行明確指定。

3.1 @RequestParam 綁定httpRequest中參數(shù),@RequestParam("accountId") 完整形式為  @RequestParam(value="accountId",required=true,defaultValue=null)
3.2 @RequestHeader 綁定httpRequest頭部信息,@RequestHeader("User-Agent") 完整形式為 @RequestHeader(value="User-Agebt",required=true, defaultValue=null)
3.3 @CookieValue 綁定一個(gè)Cookie值,@CookieValue("loginId") 完整形式為 @CookieValue(value="loginId",required=true,defaultValue=null)
3.4 @RequestBody 將httpRequest的body綁定到方法參數(shù)上
3.5 @ModelAttribute 有兩種使用方式: 1)在方法級(jí)別,指定方法的返回值綁定到model中; 2)方法參數(shù)級(jí)別,指定model中的值綁定到方法的入?yún)⑸?示例如下:
 @ModelAttribute("countryList")
    
public List<String> getCountries() {
        
return new ArrayList<String>();
    }

@RequestMapping(value 
= "search", method = RequestMethod.POST)
    
public String searchAccount(@ModelAttribute("accountId") Long accountId) {
        
return "/search";
    }

4、使用@ResponseBody 生成response

    適用于webservice的數(shù)據(jù)交換,或ajax異步請求,text、json或者xml格式的數(shù)據(jù)交換。
    例如訪問: http://localhost:8080/accounts/info.htm
 

@RequestMapping(value = "info")
public @ResponseBody Account getAccount() {
        Account a 
= new Account();
        a.setId(
123L);
        a.setName(
"zhangsan");
        
return a;
 }

返回?cái)?shù)據(jù)如下:
{"name":"zhangsan","id":123}
從上面例子可以看出,使用@ResponseBody后,返回的javabean默認(rèn)被序列化成json格式的數(shù)據(jù)并被寫入到response body中。

@Request 和 @ReponseBody 使用了HttpMessageConverter機(jī)制。下面是HttpMessageConverter的繼承體系。


常用的有如下幾個(gè):
StringHttpMessageConverter ---字符串
MappingJacksonHttpMessageConverter ----json
ByteArrayHttpMessageConverter ----字節(jié)數(shù)組
MarshallingHttpMessageConverter -----xml

5、使用模板技術(shù)生成response

    適用于一般頁面請求。可以使用velocity freemarker等模板技術(shù),在dispatcher-servlet.xml中需要設(shè)置viewResolver。
   

@RequestMapping("/index")
public String index(ModelMap modelMap) {
        modelMap.put(
"name""liucs");
        
return "index";
}

@RequestMapping(
"/index")
public String index2(Model model) {
        model.addAttribute(
"name","liucs");
        
return "index";
}

@RequestMapping("/index")
public ModelAndView index3() throws Exception {
      ModelAndView mav = new ModelAndView("index");
      mav.addObject("name", "liucs");
      return mav;
}

如上面代碼index1和index2所示,不使用@ResponseBody注解。 返回一個(gè)String類型,這個(gè)String是viewname, 如果是重定向,return "redirect:/index.htm".
入?yún)⒖梢园琈odelMap或者M(jìn)odel,其實(shí)這兩者是一個(gè)東西,作用一樣。也可以采用index3式的傳統(tǒng)寫法,返回一個(gè)ModelAndView對象。

6、數(shù)據(jù)驗(yàn)證

@InitBinder標(biāo)注
@InitBinder
    
public void myInitBinder(WebDataBinder binder){
      binder.setDisallowedFields(
new String[]{"id"});
    }
通過在方法中聲明一個(gè)BindingResult參數(shù)來啟動(dòng)綁定和驗(yàn)證
@RequestMapping("update")
    
public void update(@ModelAttribute("account") Account account,BindingResult bindResult) {
        
if(bindResult.hasErrors()){
            
//……
        }
    }
需要注意以下限制:
1、BindingResult參數(shù)必須跟在一個(gè)JavaBean參數(shù)后面
2、錯(cuò)誤會(huì)被自動(dòng)的綁定到model中,便于渲染模板時(shí)使用
3、不支持@RequestBody等類型的參數(shù)形式

7、異常處理

@ExceptionHandler




liucs 2011-09-05 16:42 發(fā)表評論
]]>
Java Annotation 注解http://www.tkk7.com/liuxiaosan/articles/347691.htmlliucsliucsMon, 22 Aug 2011 10:33:00 GMThttp://www.tkk7.com/liuxiaosan/articles/347691.htmlhttp://www.tkk7.com/liuxiaosan/comments/347691.htmlhttp://www.tkk7.com/liuxiaosan/articles/347691.html#Feedback0http://www.tkk7.com/liuxiaosan/comments/commentRss/347691.htmlhttp://www.tkk7.com/liuxiaosan/services/trackbacks/347691.htmlAnnotation(注解)是什么? 附加在代碼中的一些元信息,用于一些工具在編譯、運(yùn)行時(shí)進(jìn)行解析和使用,起到說明、配置的功能。
注解不會(huì)也不能影響代碼的實(shí)際邏輯,僅僅起到輔助性的作用。包含在 java.lang.annotation 包中。

1、Annotation的定義

首先看一下如何定義我們自己的注解,下面是SpringMvc中RequestParam注解的定義。
@Retention(RetentionPolicy.RUNTIME) // 注解的保留策略
@Target(ElementType.PARAMETER)  // 注解的作用目標(biāo)
@Documented
public @interface RequestParam {  // 使用@interface定義注解
    String value() 
default "";  // 類似方法的屬性
    
boolean required() default true;  // 使用default指定屬性的默認(rèn)值
    String defaultValue() 
default ValueConstants.DEFAULT_NONE;
}

使用方式如下:
void deleteUser(@RequestParam(value="id",required=false) Long id)  { }

2、元注解

元注解是指注解的注解。包括  @Retention @Target @Document @Inherited四種。

2.1、@Retention: 定義注解的保留策略

@Retention(RetentionPolicy.SOURCE)   注解僅存在于源碼中,在class字節(jié)碼文件中不包含
@Retention(RetentionPolicy.CLASS)      默認(rèn)的保留策略,注解會(huì)在class字節(jié)碼文件中存在,但運(yùn)行時(shí)無法獲得,
@Retention(RetentionPolicy.RUNTIME)   注解會(huì)在class字節(jié)碼文件中存在,在運(yùn)行時(shí)可以通過反射獲取到

2.2、@Target:定義注解的作用目標(biāo)

@Target(ElementType.TYPE)   接口、類、枚舉、注解
@Target(ElementType.FIELD)  字段、枚舉的常量
@Target(ElementType.METHOD)  方法
@Target(ElementType.PARAMETER) 方法參數(shù)
@Target(ElementType.CONSTRUCTOR)  構(gòu)造函數(shù)
@Target(ElementType.LOCAL_VARIABLE) 局部變量
@Target(ElementType.ANNOTATION_TYPE) 注解
@Target(ElementType.PACKAGE)     

2.3、@Document:說明該注解將被包含在javadoc中

2.4、@Inherited:說明子類可以繼承父類中的該注解

3、通過反射讀取注解


package java.lang.reflect;
import java.lang.annotation.Annotation;

public interface AnnotatedElement {
    
/**判斷該元素中某個(gè)注解類型是否存在*/
     
boolean isAnnotationPresent(Class<? extends Annotation> annotationClass);

   
/**獲得該元素中某個(gè)注解類型的注解*/
    
<extends Annotation> T getAnnotation(Class<T> annotationClass);

    
/**獲得該元素中所有可見的注解,包含繼承得到的注解*/
    Annotation[] getAnnotations();

    
/**獲得該元素自身什么的注解,不包含繼承得到的注解*/
    Annotation[] getDeclaredAnnotations();
}

java.lang.Package
java.lang.Class
java.lang.reflect.Construtor
java.lang.reflect.Field
java.lang.reflect.Method
均實(shí)現(xiàn)了該接口,所以我們可以通過反射獲取到 Class、Construtor、Field、Mehtod等,然后再通過上述接口方法,獲得作用在這些元素上的注解。
下面是RequestParam注解的使用,為便于演示,略作修改,見org.springframework.web.bind.annotation.support.HandlerMethodInvoker源碼

Method handlerMethod = *****;
Annotation[] paramAnns 
= handlerMethod.getParameterAnnotations();

String paramName 
= null;
boolean required = false;
String defaultValue 
= null;

for (Annotation paramAnn : paramAnns) {
    
if (RequestParam.class.isInstance(paramAnn)) {
        RequestParam requestParam 
= (RequestParam) paramAnn;
        paramName 
= requestParam.value();
        required 
= requestParam.required();
        defaultValue 
= parseDefaultValueAttribute(requestParam.defaultValue());
        annotationsFound
++;
    }
       
// *******其他處理*******************             
}


4、常見注解的說明及使用

@Override :@Target(ElementType.METHOD)   @Retention(RetentionPolicy.SOURCE)  說明方法是對父類方法的覆蓋,用于編譯器編譯時(shí)進(jìn)行檢查
@Deprecated: @Documented  @Retention(RetentionPolicy.RUNTIME)   用于建議不要使用某元素
@SuppressWarnings:@Target({TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE}) @Retention(RetentionPolicy.SOURCE) 
    說明對被批注的代碼元 素內(nèi)部的某些警告保持靜默


liucs 2011-08-22 18:33 發(fā)表評論
]]>
Javascript之函數(shù)式編程和閉包http://www.tkk7.com/liuxiaosan/articles/356518.htmlliucsliucsMon, 15 Aug 2011 01:44:00 GMThttp://www.tkk7.com/liuxiaosan/articles/356518.htmlhttp://www.tkk7.com/liuxiaosan/comments/356518.htmlhttp://www.tkk7.com/liuxiaosan/articles/356518.html#Feedback0http://www.tkk7.com/liuxiaosan/comments/commentRss/356518.htmlhttp://www.tkk7.com/liuxiaosan/services/trackbacks/356518.html
摘錄 http://www.infoq.com/cn/articles/why-recommend-nodejs 部分內(nèi)容

JavaScript是一種函數(shù)式編程語言,函數(shù)編程語言最重要的數(shù)學(xué)基礎(chǔ)是λ演算(lambda calculus) -- 即函數(shù)對象可以作為其他函數(shù)對象的輸入(參數(shù))和輸出(返回值)。
函數(shù)運(yùn)行時(shí)需要訪問函數(shù)定義時(shí)的上下文數(shù)據(jù)。并且javascript支持匿名函數(shù)。
JavaScript中一個(gè)函數(shù)也是一個(gè)對象。一個(gè)函數(shù)實(shí)例fn除了函數(shù)體的定義之外,我們?nèi)匀豢梢栽谶@個(gè)函數(shù)對象實(shí)例之本身擴(kuò)展其他屬性,如fn.a=1;
在每個(gè)JavaScript函數(shù)運(yùn)行時(shí),都有一個(gè)運(yùn)行時(shí)內(nèi)部對象稱為Execution Context,它包含如下Variable Object(VO,變量對象), Scope Chain(作用域鏈)和"this" Value三部分。如圖:


只要能明確的區(qū)分函數(shù)定義和函數(shù)運(yùn)行兩個(gè)時(shí)機(jī),那么閉包就是讓函數(shù)在運(yùn)行時(shí)能夠訪問到函數(shù)定義時(shí)的所處作用域內(nèi)的所有變量,或者說函數(shù)定義時(shí)能訪問到什么變量,那么在函數(shù)運(yùn)行時(shí)通過相同的變量名一樣能訪問到。


liucs 2011-08-15 09:44 發(fā)表評論
]]>
Volatile變量http://www.tkk7.com/liuxiaosan/articles/347878.htmlliucsliucsFri, 08 Apr 2011 08:28:00 GMThttp://www.tkk7.com/liuxiaosan/articles/347878.htmlhttp://www.tkk7.com/liuxiaosan/comments/347878.htmlhttp://www.tkk7.com/liuxiaosan/articles/347878.html#Feedback0http://www.tkk7.com/liuxiaosan/comments/commentRss/347878.htmlhttp://www.tkk7.com/liuxiaosan/services/trackbacks/347878.htmlhttp://www.ibm.com/developerworks/cn/java/j-jtp06197.html  一文筆記

在java中,為了提高性能,線程一般把變量從內(nèi)存中備份一個(gè)副本到寄存器。volatile 關(guān)鍵字意思是易失性,明確表示
一個(gè)變量是會(huì)被多線程訪問的,每個(gè)線程在每次讀取都要從內(nèi)存讀取原始副本的值,而不是緩存在寄存器中的值。每次修改
都是把值寫回到內(nèi)存中。

Java語言包含兩種內(nèi)在的同步機(jī)制:同步塊(或方法)和 volatile 變量。

synchronized鎖提供了兩種主要特性:互斥(mutual exclusion)可見性(visibility)。互斥即一次只允許一個(gè)線程持有某個(gè)特定的鎖,因此可使用該特性實(shí)現(xiàn)對共享數(shù)據(jù)的協(xié)調(diào)訪問協(xié)議,這樣,一次就只有一個(gè)線程能夠使用該共享數(shù)據(jù)。可見性必須確保釋放鎖之前對共享數(shù)據(jù)做出的更改對于隨后獲得該鎖的另一個(gè)線程是可見的。 否則,線程看到的共享變量可能是修改前的值或不一致的值,引發(fā)嚴(yán)重問題。

volatile能夠?qū)崿F(xiàn)上述可見性,因?yàn)榫€程每次都是讀取原始版本的值,前一個(gè)線程的修改對后續(xù)線程來說是可見的。但volatile不能確保互斥。

volatile適用的原則:
  • 對變量的寫操作不依賴于當(dāng)前值。
  • 該變量沒有包含在具有其他變量的不變式中。
所以volatile不能用作計(jì)數(shù)器,因?yàn)橛?jì)數(shù)器的自增是一個(gè)讀-增-寫的過程,不是原子操作,在volatile不確保互斥的情況下,結(jié)果不準(zhǔn)確。
不變式的意思是一個(gè)需要不變的規(guī)律,如起始要小于等于結(jié)束。上述2點(diǎn)簡單來說:即變量真正獨(dú)立于其他變量和自己以前的值 , 在這些
情況下可以使用 volatile 代替 synchronized 來簡化代碼。

volatile由于不阻塞線程,在性能一般比synchronized表現(xiàn)更好。

適用volatile的幾個(gè)場景:
1、狀態(tài)標(biāo)志  比如標(biāo)示服務(wù)啟動(dòng)或停止。
2、獨(dú)立觀察  定期 “發(fā)布” 觀察結(jié)果供程序內(nèi)部使用,
3、結(jié)合使用 volatile 和 synchronized 實(shí)現(xiàn) “開銷較低的讀-寫鎖”
@ThreadSafe
public class CheesyCounter {
private volatile int value;
// 使用volatile實(shí)現(xiàn)可見性,開銷低
public int getValue() { return value; }
// 使用synchronized實(shí)現(xiàn)互斥
public synchronized int increment() {
return value++;
}
}





liucs 2011-04-08 16:28 發(fā)表評論
]]>
高性能網(wǎng)站建設(shè)指南筆記http://www.tkk7.com/liuxiaosan/articles/347722.htmlliucsliucsFri, 08 Apr 2011 02:59:00 GMThttp://www.tkk7.com/liuxiaosan/articles/347722.htmlhttp://www.tkk7.com/liuxiaosan/comments/347722.htmlhttp://www.tkk7.com/liuxiaosan/articles/347722.html#Feedback0http://www.tkk7.com/liuxiaosan/comments/commentRss/347722.htmlhttp://www.tkk7.com/liuxiaosan/services/trackbacks/347722.html 本文是閱讀《高性能網(wǎng)站建設(shè)指南》一書的筆記。該書作者是Yahoo!的Steve Souders ,總結(jié)了yahoo!在web前端優(yōu)化的最佳實(shí)踐。

Web前端性能黃金法則:只有10%-20%的最終用戶響應(yīng)時(shí)間花在下載html文檔上。其余時(shí)間花在了下載頁面中所有的組件上。
頁面組件包括:圖片,javascript,css,flash等內(nèi)容

Http請求響應(yīng)
GET /home/**.js
HTTP 1.1
Host: www.taobao.com
User-Agent: Mozilla/**
Accept-Encoding:gzip,deflate  ----》支持壓縮
If-Modified-since:web,22 Feb**   -----》判斷是否采用瀏覽器緩存
Expires:web****  -----》明確聲明失效時(shí)間,避免If-Modified-since條件請求的至少一次與服務(wù)器的交互
Connection: keep-alive ----》使用長連接
--------------------------------------------------------------------------------------------------------------------
HTTP 1.1 304 Not Modified ----》沒修改
Content-Type: application/x-javascript
Last-Modified : web,22**
Content-Encoding:gzip

更詳細(xì)的見http規(guī)范: http://www.w3.org/Protocols/rfc2616/rfc2616.html

1、減少HTTP請求
  • 使用圖片地圖 一個(gè)圖片上面關(guān)聯(lián)多個(gè)URL,由點(diǎn)擊的位置決定目標(biāo)URL,目的在于建設(shè)圖片數(shù)量
  • CSS Sprites 講多個(gè)圖片合并成一幅圖片,圖片地圖中的圖片要連續(xù),Css Sprites不需要
  • 內(nèi)聯(lián)圖片
  • 合并腳本和樣式表 網(wǎng)站首頁平均應(yīng)該使用6、7個(gè)腳本和1、2個(gè)樣式表
2、使用外部JavaScript和CSS

   單純來說,內(nèi)聯(lián)比外聯(lián)更快一些。

   對于用戶訪問很少的頁面,比如注冊等,建議內(nèi)聯(lián)。

   對于用戶訪問較多的頁面,比如list或者商品詳情頁面等,建議外聯(lián),瀏覽器可以使用緩存的組件。

   對于重用性較高的組件,使用外聯(lián)

3、使用內(nèi)容發(fā)布網(wǎng)絡(luò)
  
CDN(Content Delivery Network)內(nèi)容分發(fā)網(wǎng)絡(luò),讓用戶就近訪問頁面靜態(tài)組件
4、減少DNS查找
    通常瀏覽器查詢一個(gè)給定的主機(jī)名的ip需要花費(fèi)20-120毫秒。建議將頁面組件放在至少2個(gè),但不超過4個(gè)的主機(jī)名下。
5、添加Expires或者Cache-Control頭 
  
Expires和Cache-Control頭都用于瀏覽器可以使用本地緩存直至制定的時(shí)間,web服務(wù)器如apache,lighttpd,nginx等都有相應(yīng)模塊可配置
6、精簡JavaScript
  精簡代碼,將所有不必要的注釋和空白換行等移除。可以使用 JSMin(http://crockford.com/javascript/jsmin)進(jìn)行精簡。
7、壓縮組件 
  
Accept-Encoding頭,一般只壓縮腳本和樣式表,圖片不需要,因?yàn)閳D片通常都是壓縮過的。Apache 2.x使用mod_deflate模塊gzip壓縮
8、避免重定向
  
重定向使得html文檔到達(dá)前,頁面不會(huì)呈現(xiàn)任何內(nèi)容。所以要減少重定向
9、將樣式表放在頂部
  
樣式表放在底部,瀏覽器為了在樣式表變化時(shí)不需要重繪頁面會(huì)阻止內(nèi)容自頂向下逐步呈現(xiàn)。將CSS放在頂部,有利于瀏覽器從上向下顯示頁面
   推薦使用<link rel="stylesheet" href="common.css">方式,而不是import方式,因?yàn)閕mport方式會(huì)導(dǎo)致組件下載的無序性,破壞了放在頂部的初衷。
10、移除重復(fù)腳本
  
由于團(tuán)隊(duì)成員的長期維護(hù),會(huì)遺留一定的重復(fù)腳本,需要定期清理
11、將腳本放在底部  
 
瀏覽器遵從http規(guī)范并行的從每個(gè)主機(jī)名并行下載兩個(gè)組件。這樣可以有效提高下載的效率。但瀏覽器在下載腳本時(shí)時(shí)禁用并行下載的,因?yàn)槟_本有可能修改頁面內(nèi)容。瀏覽器會(huì)阻塞確保頁面恰當(dāng)?shù)牟季帧?/span>
12、配置ETag
13、避免CSS表達(dá)式  
  
CSS表達(dá)式是實(shí)現(xiàn)的效果可以通過其他手段實(shí)現(xiàn),并且風(fēng)險(xiǎn)更小。
14、使Ajax可緩存

   Ajax只是實(shí)現(xiàn)了異步,避免頁面的重新加載,但是不意味著即時(shí)。所有一個(gè)用戶在操作后仍然要等待才能看到結(jié)果。一些緩存的原則也可以適用于ajax.
GET 方式可以更快響應(yīng),但是可能會(huì)有被瀏覽器緩存的問題,一般都需要加個(gè)隨機(jī)數(shù)來避免,POST 方式則不會(huì)。

15、Cookie
減少cookie中的信息,避免不重要的信息放在cookie中;對于圖片或者靜態(tài)服務(wù)器,使用cookie無關(guān)的域名,避免cookie的傳輸。


liucs 2011-04-08 10:59 發(fā)表評論
]]>
java動(dòng)態(tài)代理http://www.tkk7.com/liuxiaosan/articles/347552.htmlliucsliucsWed, 06 Apr 2011 02:58:00 GMThttp://www.tkk7.com/liuxiaosan/articles/347552.htmlhttp://www.tkk7.com/liuxiaosan/comments/347552.htmlhttp://www.tkk7.com/liuxiaosan/articles/347552.html#Feedback0http://www.tkk7.com/liuxiaosan/comments/commentRss/347552.htmlhttp://www.tkk7.com/liuxiaosan/services/trackbacks/347552.html
核心java.lang.reflect.Proxy類

// 根據(jù)給定接口和ClassLoader獲取Class對象
// 使用Class.forName動(dòng)態(tài)加載Class
public static Class<?> getProxyClass(ClassLoader loader, Class<?> interfaces);
// 創(chuàng)建代理對象
// 通過反射的Constructor創(chuàng)建代理對象
public static Object newProxyInstance(ClassLoader loader, Class<?>[] interfaces, InvocationHandler h);
// 判斷是否是代理Class
public static boolean isProxyClass(Class<?> cl);
// 獲得代理對象的InvocationHandler
public static InvocationHandler getInvocationHandler(Object proxy)

java.lang.reflect.InvocationHandler接口

// 反射調(diào)用代理類方法
public Object invoke(Object proxy, Method method, Object[] args)
    
throws Throwable;

org.springframework.aop.framework.JdkDynamicAopProxy
springframeworkAOP特性實(shí)現(xiàn)的基礎(chǔ)之一,通過動(dòng)態(tài)代理實(shí)現(xiàn)
  1 package org.springframework.aop.framework;
  2 
  3 final class JdkDynamicAopProxy implements AopProxy, InvocationHandler, Serializable {
  4 
  5     /** 代理的配置信息 */
  6     private final AdvisedSupport advised;
  7 
  8     public JdkDynamicAopProxy(AdvisedSupport config) throws AopConfigException {
  9         Assert.notNull(config, "AdvisedSupport must not be null");
 10         if (config.getAdvisors().length == 0 && config.getTargetSource() == AdvisedSupport.EMPTY_TARGET_SOURCE) {
 11             throw new AopConfigException("No advisors and no TargetSource specified");
 12         }
 13         this.advised = config;
 14     }
 15 
 16 
 17     public Object getProxy() {
 18         return getProxy(ClassUtils.getDefaultClassLoader());
 19     }
 20     
 21     // 獲取代理對象
 22     public Object getProxy(ClassLoader classLoader) {
 23         if (logger.isDebugEnabled()) {
 24             logger.debug("Creating JDK dynamic proxy: target source is " + this.advised.getTargetSource());
 25         }
 26         Class[] proxiedInterfaces = AopProxyUtils.completeProxiedInterfaces(this.advised);
 27         findDefinedEqualsAndHashCodeMethods(proxiedInterfaces);
 28         // 使用了Proxy動(dòng)態(tài)代理創(chuàng)建代理對象
 29         return Proxy.newProxyInstance(classLoader, proxiedInterfaces, this);
 30     }
 31 
 32 
 33     // 回調(diào)代理對象
 34     public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
 35         MethodInvocation invocation;
 36         Object oldProxy = null;
 37         boolean setProxyContext = false;
 38 
 39         TargetSource targetSource = this.advised.targetSource;
 40         Class targetClass = null;
 41         Object target = null;
 42 
 43         try {
 44             if (!this.equalsDefined && AopUtils.isEqualsMethod(method)) {
 45                 // The target does not implement the equals(Object) method itself.
 46                 return equals(args[0]);
 47             }
 48             if (!this.hashCodeDefined && AopUtils.isHashCodeMethod(method)) {
 49                 // The target does not implement the hashCode() method itself.
 50                 return hashCode();
 51             }
 52             if (!this.advised.opaque && method.getDeclaringClass().isInterface() &&
 53                     method.getDeclaringClass().isAssignableFrom(Advised.class)) {
 54                 // Service invocations on ProxyConfig with the proxy config
 55                 return AopUtils.invokeJoinpointUsingReflection(this.advised, method, args);
 56             }
 57 
 58             Object retVal;
 59 
 60             if (this.advised.exposeProxy) {
 61                 // Make invocation available if necessary.
 62                 oldProxy = AopContext.setCurrentProxy(proxy);
 63                 setProxyContext = true;
 64             }
 65 
 66             // May be null. Get as late as possible to minimize the time we "own" the target,
 67             // in case it comes from a pool.
 68             target = targetSource.getTarget();
 69             if (target != null) {
 70                 targetClass = target.getClass();
 71             }
 72 
 73             // Get the interception chain for this method.
 74             List<Object> chain = this.advised.getInterceptorsAndDynamicInterceptionAdvice(method, targetClass);
 75 
 76             if (chain.isEmpty()) {
 77                 // 如果攔截鏈?zhǔn)强盏模苯油ㄟ^反射調(diào)用target對象的方法
 78                 // method.invoke(target, args);
 79                 retVal = AopUtils.invokeJoinpointUsingReflection(target, method, args);
 80             }else {
 81                 // 如果攔截鏈不為空,包裝一個(gè)反射方法調(diào)用
 82                 // 先調(diào)用織入的攔截器,最后仍然是反射調(diào)用target對象的方法
 83                 invocation = new ReflectiveMethodInvocation(proxy, target, method, args, targetClass, chain);
 84                 // Proceed to the joinpoint through the interceptor chain.
 85                 retVal = invocation.proceed();
 86             }
 87 
 88             // Massage return value if necessary.
 89             if (retVal != null && retVal == target && method.getReturnType().isInstance(proxy) &&
 90                     !RawTargetAccess.class.isAssignableFrom(method.getDeclaringClass())) {
 91                 // Special case: it returned "this" and the return type of the method
 92                 // is type-compatible. Note that we can't help if the target sets
 93                 // a reference to itself in another returned object.
 94                 retVal = proxy;
 95             }
 96             return retVal;
 97         }
 98         finally {
 99             if (target != null && !targetSource.isStatic()) {
100                 // Must have come from TargetSource.
101                 targetSource.releaseTarget(target);
102             }
103             if (setProxyContext) {
104                 // Restore old proxy.
105                 AopContext.setCurrentProxy(oldProxy);
106             }
107         }
108     }
109 }
110 





liucs 2011-04-06 10:58 發(fā)表評論
]]>
OOP設(shè)計(jì)原則http://www.tkk7.com/liuxiaosan/articles/347388.htmlliucsliucsThu, 31 Mar 2011 06:07:00 GMThttp://www.tkk7.com/liuxiaosan/articles/347388.htmlhttp://www.tkk7.com/liuxiaosan/comments/347388.htmlhttp://www.tkk7.com/liuxiaosan/articles/347388.html#Feedback0http://www.tkk7.com/liuxiaosan/comments/commentRss/347388.htmlhttp://www.tkk7.com/liuxiaosan/services/trackbacks/347388.html低耦合、高內(nèi)聚

OOP設(shè)計(jì)原則主要提供了一個(gè)方向,使得我們的程序設(shè)計(jì)得更加合理,從而獲得更好的可擴(kuò)展性、可維護(hù)性。主要包括以下幾個(gè)原則:

1、OCP(Open-Closed Principle) 開放封閉原則。
對擴(kuò)展開放,對修改關(guān)閉。即在不修改原有程序源碼的情況下對其進(jìn)行擴(kuò)展。實(shí)現(xiàn)開閉原則的關(guān)鍵就在于“抽象”。 “作為系統(tǒng)設(shè)計(jì)的抽象層,要預(yù)見所有可能的擴(kuò)展,從而使得在任何擴(kuò)展情況下,系統(tǒng)的抽象底層不需修改;同時(shí),由于可以從抽象底層導(dǎo)出一個(gè)或多個(gè)新的具體實(shí) 現(xiàn),可以改變系統(tǒng)的行為,因此系統(tǒng)設(shè)計(jì)對擴(kuò)展是開放的。 ” 這個(gè)原則是OOP的基石,其他原則主要來實(shí)現(xiàn)本原則。

2、SRP (Simple Responsibility Pinciple)單一職責(zé)原則。
一個(gè)類一般應(yīng)該設(shè)計(jì)成只有一個(gè)職責(zé),如果設(shè)計(jì)成具備很多職責(zé),那么任何一個(gè)職責(zé)的改變都會(huì)引起這個(gè)類的修改,相關(guān)引用該類的代碼也可能受到影響。不同的職責(zé)或功能應(yīng)該由不同的類來實(shí)現(xiàn),這樣可以很好的控制變化帶來的影響粒度。

3、DIP (Dependence Inversion Principle)依賴倒轉(zhuǎn)原則。
抽象不應(yīng)該依賴于實(shí)現(xiàn)細(xì)節(jié),實(shí)現(xiàn)細(xì)節(jié)應(yīng)該依賴于抽象;高層不應(yīng)該依賴于底層,都應(yīng)該依賴于抽象。針對接口編程: 應(yīng)該用接口或者抽象類聲明變量、方法參數(shù)、方法返回類型等。

4、LSP (Liskov Substitution Principle)里氏代換原則。
子類型完全可以替換父類型,而不需要任何修改,并且獲得期望的結(jié)果。

5、ISP (Interface Segregation Principle)接口隔離原則。
客戶端不應(yīng)該可以訪問不需要的方法,這些不需要的方法是一種有害的耦合性。
所以應(yīng)該設(shè)計(jì)多個(gè)專門接口而不是單個(gè)復(fù)雜的接口,客戶端僅依賴最小的接口類型。

6、LoD (Law of Demeter)迪米特法則。
即最少知識(shí)原則。一個(gè)對象應(yīng)當(dāng)對其他對象有盡可能少的了解。只和最直接的類交互,對第三方可以通過轉(zhuǎn)達(dá)交互,從而減少對象間的耦合性。

7、CARP (Composite/Aggregate Reuse Principle)合成/聚合復(fù)用原則。
多聚合、少繼承,實(shí)現(xiàn)復(fù)用性。聚合的復(fù)用是一種封閉性的復(fù)用,被復(fù)用者對復(fù)用者隱藏了自身細(xì)節(jié),而繼承是一種開放性的復(fù)用,子類可以獲取父類型相關(guān)的細(xì)節(jié),破壞了封閉性。

liucs 2011-03-31 14:07 發(fā)表評論
]]>
Java 反射http://www.tkk7.com/liuxiaosan/articles/347387.htmlliucsliucsThu, 31 Mar 2011 06:06:00 GMThttp://www.tkk7.com/liuxiaosan/articles/347387.htmlhttp://www.tkk7.com/liuxiaosan/comments/347387.htmlhttp://www.tkk7.com/liuxiaosan/articles/347387.html#Feedback0http://www.tkk7.com/liuxiaosan/comments/commentRss/347387.htmlhttp://www.tkk7.com/liuxiaosan/services/trackbacks/347387.html內(nèi)省機(jī)制,幫助程序在運(yùn)行時(shí)對自身及軟件環(huán)境進(jìn)行檢查,并根據(jù)檢查得到的程序結(jié)構(gòu),改變自身的部分行為。

核心類為 java.lang.Class 類,抽象了程序的元數(shù)據(jù),每一個(gè)類的元數(shù)據(jù)就是一個(gè)Class對象實(shí)例。這個(gè)Class實(shí)例是一個(gè)靜態(tài)實(shí)例,對應(yīng)類的每一個(gè)實(shí)例都會(huì)關(guān)聯(lián)這個(gè)靜態(tài)實(shí)例。通過Class類可以查詢該類的方法、字段、接口、構(gòu)造器等一系列信息。詳見下面。

對象回去自身對應(yīng)的Class實(shí)例是通過繼承自O(shè)bject類的getClass()方法;
對于基本類型,每一種也有一個(gè)名為class的靜態(tài)實(shí)例,如int.class double.class boolean.class;
對于數(shù)組類型,也有Object[].class, 注意 int[][].class==int[].class


判斷對象類型的接口:
String getName() 獲得類全名
Class getComponentType() 如果對象是數(shù)組,返回?cái)?shù)據(jù)中元素的類類型
boolean isArray()
boolean isInterface()
boolean isPrimitive()
boolean isAnnotation()

###########################################################################################################
接口
java.lang.Class中定義的檢查接口的接口:
Class[] getInterfaces()
Class getSuperClass() 直系父類 ,對于Object、接口、void關(guān)鍵字、基本類型,返回null
boolean isAssignableFrom(Class cls) 該類是參數(shù)的類型或參數(shù)的父類型
boolean isInstance(Object obj) 該類是參數(shù)的實(shí)例或者參數(shù)的子類實(shí)例

Class類和Object類存在比較糾結(jié)的關(guān)系
Class.class.isIntance(Class.class) == true Class類的class實(shí)例是Class本身的實(shí)例
Class.class.isInstance(Object.class) == true
Object.class.isAssignableFrom(Class.class) == true
Object.class.isIntance(Class.class) == true

###########################################################################################################
java.lang.reflect部分類圖


###########################################################################################################

java.lang.reflect.Constructor
java.lang.Class中相關(guān)方法

Constructor getConstructor(Class[] parameterTypes)
Constructor getDeclaredConstructor(Class[]parameterTypes)
Constructor[] getConstructors()
Constructor[] getDeclaredConstructors()

java.lang.reflect.Constructor
Class getDeclaredClass()
Class[] getExceptionTypes()
int getModifiers()
String getName()
Class[] getParameterTypes()
Object newInstance(Object[] initArgs) 創(chuàng)建實(shí)例

對于數(shù)組,使用 java.lang.reflect.Array.newInstance(String.class,5)形式創(chuàng)建實(shí)例

###########################################################################################################

java.lang.reflect.Method

java.lang.Class類中定義了如下接口查詢一個(gè)類所具有的方法。
Method getMethod(String name,Class[]parameterTypes)
Method[] getMethods()
上述2個(gè)接口查詢繼承獲得和自身聲明的方法
Method getDeclaredMethod(String name,Class[]parameterTypes)
Method[] getDeclaredMethods()
上述2個(gè)接口查詢自身聲明的方法

java.lang.reflect.Method類定義的方法
Class getDeclaringClass() 聲明該方法的類實(shí)例
Class[] getExceptionTypes() 方法的異常類型
int getModifiers() 方法的可見性
String getName() 方法名
Class[] getParameterTypes() 方法參數(shù)類型
Class getReturnType() 方法返回類型
Object invoke(Object obj,Object[]args) 反射調(diào)用一個(gè)對象上面的該方法

###########################################################################################################

java.lang.reflect.Field

java.lang.Class類中關(guān)于Field的相關(guān)方法:
Field getField(String name)
Field[] getFields()
Field getDeclaredField(String name)
Field[] getDeclaredFields()

java.lang.relect.Field中主要方法
Class getType() 返回字段的Class
Class getDeclaringClass() 返回什么該字段的Class
String getName()
int getModifiers()
Object get(Object obj) 返回obj該字段的值
boolean getBoolean(Object obj)
void set(Object obj,Object value) 設(shè)置obj該字段的值
void setBoolean(Object obj,boolean value)

###########################################################################################################

java.lang.reflect.Modifier 字段或者方法的訪問性
static boolean isPublic(int mod)
static boolean isPrivate(int mod)

共包括以下:
public static native volatile protected transient
abstract synchronized strictfp private final


###########################################################################################################
動(dòng)態(tài)加載
Class cls = Class.forName(String className);
Object obj 
= cls.newInstance();

動(dòng)態(tài)加載機(jī)制使得可以避開編譯器類范圍的限制,常見場景是jdbc驅(qū)動(dòng)。動(dòng)態(tài)加載機(jī)制也是通過ClassLoader實(shí)現(xiàn)。
通過動(dòng)態(tài)加載機(jī)制的類名并不是一般意義的類名,而是:
1、基本類型,首字母大寫,如 int -> I
2、引用類型,L+全類名,如 Ljava.lang.String
3、數(shù)組類型,[+***, 如[I,   [Ljava.lang.String  ,  [[I,  [[Ljava.lang.String

注意:基本類型,不能通過Class.forName()加載,會(huì)拋出異常


liucs 2011-03-31 14:06 發(fā)表評論
]]>
Java 參數(shù)傳遞http://www.tkk7.com/liuxiaosan/articles/347384.htmlliucsliucsThu, 31 Mar 2011 06:05:00 GMThttp://www.tkk7.com/liuxiaosan/articles/347384.htmlhttp://www.tkk7.com/liuxiaosan/comments/347384.htmlhttp://www.tkk7.com/liuxiaosan/articles/347384.html#Feedback0http://www.tkk7.com/liuxiaosan/comments/commentRss/347384.htmlhttp://www.tkk7.com/liuxiaosan/services/trackbacks/347384.html
1、對于基本類型,傳遞值
2、對于對象類型,傳遞對象引用
需要注意的是:對于上述兩種傳遞類型,在傳遞時(shí)都是拷貝傳遞,即值傳遞時(shí)拷貝出一個(gè)新值,引用
傳遞時(shí)拷貝出一個(gè)新的拷貝。

有時(shí)候也說Java只有值傳遞,意思是對于引用類型,傳遞引用的值。一個(gè)概念,不用糾纏。

在內(nèi)存中對象類型可以看做兩塊,一塊是對象的引用,一塊是數(shù)據(jù)區(qū)。引用塊里面保存了數(shù)據(jù)區(qū)的地址。
看如下示例代碼:
 1 public class Test {
 2 
 3     public static void main(String[] args) {
 4         // 值傳遞
 5         int i = 1;
 6         addInt1(i);
 7         System.out.println(i);// 輸出1
 8         addInt2(i);
 9         System.out.println(i);// 輸出1
10 
11         // 引用傳遞實(shí)例1
12         String str = "123";
13         modifyStr1(str);
14         System.out.println(str);// 輸出123
15 
16         // 引用傳遞實(shí)例2
17         StringBuilder stringBuilder = new StringBuilder("123");
18         modifyStringBuilder(stringBuilder);
19         System.out.println(stringBuilder.toString());// 輸出123456
20     }
21 
22     // 拷貝了新的值,原值不變
23     public static void addInt1(int i) {
24         i = 2;
25     }
26 
27     // 拷貝了新的值,原值不變
28     public static void addInt2(int i) {
29         i++;
30     }
31 
32     // 新的拷貝引用指向了一塊新數(shù)據(jù)區(qū),原拷貝仍然指向原數(shù)據(jù)區(qū)
33     public static void modifyStr1(String str) {
34         str = "456";
35     }
36 
37     // 新的拷貝引用仍然指向原數(shù)據(jù)區(qū),但修改了原數(shù)據(jù)區(qū)的內(nèi)容
38     public static void modifyStringBuilder(StringBuilder str) {
39         str.append("456");
40     }
41 
42 }



liucs 2011-03-31 14:05 發(fā)表評論
]]>
主站蜘蛛池模板: 2021国内精品久久久久精免费| 中文字幕免费播放| 免费播放美女一级毛片| 免费无码午夜福利片| 中文字幕不卡高清免费| 一级毛片在线免费观看| 久久精品免费一区二区喷潮| 在线日韩av永久免费观看| 亚洲人成电影网站国产精品| 亚洲av无码片在线播放| 亚洲1234区乱码| 看免费毛片天天看| 人妻在线日韩免费视频| 美女被cao免费看在线看网站| 亚洲欧美日韩国产成人| 美女黄色免费网站| 免费福利在线视频| 国语成本人片免费av无码| 久久精品国产亚洲Aⅴ蜜臀色欲| 亚洲av丰满熟妇在线播放| 国产亚洲精品福利在线无卡一| 久久夜色精品国产噜噜噜亚洲AV | 免费v片视频在线观看视频| 亚洲最大AV网站在线观看| 亚洲精品自拍视频| 羞羞视频网站免费入口| 久久国产精品免费专区| 免费无码不卡视频在线观看| 亚洲中文字幕无码一区二区三区| 91亚洲精品自在在线观看| 免费人成视频在线观看免费| 性无码免费一区二区三区在线| 四虎在线免费播放| 亚洲va中文字幕无码久久不卡| 亚洲中文无码亚洲人成影院| 亚洲自偷自偷在线成人网站传媒 | 国产成人高清精品免费鸭子| 亚洲精品高清国产一线久久| 在线亚洲高清揄拍自拍一品区| 亚洲免费一区二区| 我要看免费的毛片|