`
hiskyrisa
  • 浏览: 36121 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
文章列表
简单的使用缓存的方法,就是在Service中嵌入调用缓存的代码。 1.先查询缓存, 2.若缓存命中,则返回 3.从数据库查询,并且往缓存中插入一份   这种做法导致许多许多重复代码,所以想到了用注解来调用缓存。并且在注解中设置key和expire 先定义注解 package com.cache; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java. ...
Jboss服务器down机,从log上找不出任何问题,于是分析了一下dump文件。原来是cpu过高导致的。 top - 13:12:55 up 162 days, 3:05, 3 users, load average: 4.59, 5.35, 5.47 Tasks: 606 total, 5 running, 601 sleeping, 0 stopped, 0 zombie Cpu(s): 98.8%us, 0.7%sy, 0.0%ni, 0.2%id, 0.0%wa, 0.0%hi, 0.2%si, 0.0%st Mem: 32959248k t ...
创建一个maven web项目,pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</m ...
//sth dev server jvm configuration 15:26:14,488 DEBUG [org.jboss.as.config] VM Arguments: -D[Standalone] -XX:+UseCompressedOops //请注意:这个参数默认在64bit的环境下默认启动,但是如果JVM的内存达到32G后,这个参数就会默认为不启动,因为32G内存后,压缩就没有多大必要了,要管理那么大的内存指针也需要很大的宽度了。 -XX:+TieredCompilation //默认是不打开的(可以用jinfo -flag或-XX:+PrintFlagsFinal ...
注意:此处省略ADB和Node.js的配置。   代码示例: package com.hisky.seleniumTest; import java.io.BufferedReader; import java.io.File; import java.io.IOException; import java.io.InputStreamReader; import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; import java.util.Arra ...
Maven配置: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion ...
负责排查一个导入功能的bug,debug找到的信息如下:   页面点击导入后,将上传的文件提到到一个controller public ModelAndView importCSV( HttpServletRequest request, HttpServletResponse response ) throws Exception { s_logger.debug("importCSV: importing csv file "); long startTime = System.currentTimeMillis(); String res ...
<?xml version="1.0" encoding="UTF-8"?> <!-- Bean头部 --> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" ...
 没时间贴代码了,直接上穿附件。
 jsp页面如下: <form id="myForm" method="post" action="/mvc/student/add"> <table> <tr> <td>姓名</td> <td><input id="name" name="name" value="${name}" /></td> </tr> & ...
web.xml的配置也正确,log4j.properties配置也添加了。 # # Log4J Settings for log4j 1.2.x (via jakarta-commons-logging) # # The five logging levels used by Log are (in order): # # 1. DEBUG (the least serious) # 2. INFO # 3. WARN # 4. ERROR # 5. FATAL (the most serious) # Set root logger le ...
jsp页面如下: <form id="myForm" method="get" action="/mvc/student/getList"> <tr> <td>学号:</td> <td><input id="studentId" name="studentId" value="${student.studentId}" /></td> <td>姓名:& ...
HTTP ERROR 500 Problem accessing /mvc/student/getList. Reason: The class 'java.lang.String' does not have the property 'studentId'. Caused by: javax.el.PropertyNotFoundException: The class 'java.lang.String' does not have the property 'studentId'. at javax.el.BeanELResolver.getBeanPr ...
Spring的配置文件中,事务配置如下: <tx:advice id="txAdvice" transaction-manager="transactionManager"> <tx:attributes> <tx:method name="get*" read-only="true" /> <tx:method name="add*" propagation="REQUIRED"/> < ...
Global site tag (gtag.js) - Google Analytics