java.lang.reflect.Method £¨java·´Éä»úÖÆ£©
¹«Ë¾Vac·½·¨¹ýÂËÆ÷ʹÓõ½·´Éä»úÖÆ£¬¶ÁÈ¡xmlÅäÖÃÎļþ¹ýÂËÓû§·ÃÎʵķ½·¨ÃûÊÇ·ñºÏ·¨¡£
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
HttpServletRequest httpRequest = (HttpServletRequest) request;
@SuppressWarnings("unchecked")
Map<Object, Object> requestData = (Map<Object, Object>) httpRequest.getAttribute("requestData");
String methodName = (String) requestData.get(METHOD);
//»ñµÃbeanµÄÅäÖÃ
String beanName = mapProtocol.get(methodName).get(BEAN);
// È¥³ý.·ûºÅ
methodName = getMethod(methodName);
//´Óspring contextÖлñµÃbean
Object instance = getContext(filterConfig).getBean(beanName);
Class<? extends Object> clazz = instance.getClass();
Object resultContent = null;
try {
Method method = clazz
.getDeclaredMethod(methodName, getParamTypes());
Map params = removeSysParams(requestData);
resultContent = method.invoke(instance, params);
} catch (InvocationTargetException e) {
if (e.getTargetExce
Ïà¹ØÎĵµ£º
ÇáÁ¿¼¶×é¼þÊÇÓÃJAVA´úÂ뻳öÀ´µÄ,ÕâÑù¾ßÓÐƽ̨ÒÆÖ²ÐÔ¡£
¡¡¡¡ ÖØÁ¿¼¶×é¼þÊǵ÷ÓòÙ×÷ϵͳµÄº¯Êý»³öÀ´µÄ×é¼þ,±ÈÈçÖ÷´°Ìå¡£
¡¡¡¡ Ò»°ãÀ´Ëµ¾¡Á¿ÓÃÇáÁ¿¼¶µÄ×é¼þ,ÕâÑù¶Ô³ÌÐòµÄÒÆÖ²ÐԺܺã¬Ò»°ãjavax.swing°üÀïµÄ×é¼þ´ó²¿·ÖÊÇÇáÁ¿¼¶µÄjava.awtÀïÃæµÄÊÇÖØÁ¿¼¶µÄ¡£
¡¡¡¡ SwingÊÇÓÉ100%´¿JavaʵÏֵģ¬Swing×é¼þÊÇÓÃJavaʵÏÖ ......
¿É¹©³ÌÐòÀûÓõÄ×ÊÔ´£¨ÄÚ´æ¡¢CPUʱ¼ä¡¢ÍøÂç´ø¿íµÈ£©ÊÇÓÐÏ޵ģ¬ÓÅ»¯µÄÄ¿µÄ¾ÍÊÇÈóÌÐòÓþ¡¿ÉÄÜÉÙµÄ×ÊÔ´Íê³ÉÔ¤¶¨µÄÈÎÎñ¡£ÓÅ»¯Í¨³£°üº¬Á½·½ÃæµÄÄÚÈÝ£º¼õС´úÂëµÄÌå»ý£¬Ìá¸ß´úÂëµÄÔËÐÐЧÂÊ¡£±¾ÎÄÌÖÂÛµÄÖ÷ÒªÊÇÈçºÎÌá¸ß´úÂëµÄЧÂÊ¡£
ÔÚJava³ÌÐòÖУ¬ÐÔÄÜÎÊÌâµÄ´ó²¿·ÖÔÒò²¢²»ÔÚÓÚJavaÓïÑÔ£¬¶øÊÇÔÚÓÚ³ÌÐò±¾Éí¡£Ñø³ÉºÃµÄ´úÂë±àдϰ¹ß ......
JavaÖеÄtransient£¬volatileºÍstrictfp¹Ø¼ü×Ö
Èç¹ûÓÃtransientÉùÃ÷Ò»¸öʵÀý±äÁ¿£¬µ±¶ÔÏó´æ´¢Ê±£¬ËüµÄÖµ²»ÐèҪά³Ö¡£ÀýÈ磺
Java´úÂë
class T {
transient int a; //²»ÐèҪά³Ö
int b;  ......
ÕâÊÇÒ»¸öÓÃJAVA W3C DOM ½øÐÐXML²Ù×÷µÄÀý×Ó£¬°üº¬Á˲éѯ¡¢Ôö¼Ó¡¢Ð޸ġ¢É¾³ý¡¢±£´æµÄ»ù±¾²Ù×÷¡£½ÏÍêÕûµÄÃèÊöÁËÒ»¸öXMLµÄÕû¸ö²Ù×÷Á÷³Ì¡£ÊʺϸÕÈëÃÅJAVA XML²Ù×÷µÄÅóÓѲο¼ºÍѧϰ¡£
¼ÙÉèÓÐXMLÎļþ£ºtest1.xml
<?xml version="1.0" encoding="UTF-8"?>
<books>
<book>
<name>¹þÀï²¨Ì ......