cleanup and upgrade3pps:

selenium 2.20->2.21, H2 1.3.164->1.3.166, Hibernate 4.1.1.Final->4.12, PoweMock 1.4.11->1.4.12
This commit is contained in:
Calvin
2012-04-12 23:08:03 +08:00
parent 2c6c584d5c
commit bd7e5a2c40
9 changed files with 82 additions and 37 deletions
@@ -6,7 +6,6 @@ import java.net.URL;
import java.sql.Driver;
import org.eclipse.jetty.server.Server;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.openqa.selenium.By;
@@ -63,11 +62,6 @@ public class BaseFunctionalTestCase {
loginAsAdminIfNecessary();
}
@AfterClass
public static void afeterClass() throws Exception {
//quitSelenium();
}
/**
* 启动Jetty服务器, 仅启动一次.
*/
+2 -2
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>standalone</id>
<formats>
<format>war</format>
+14
View File
@@ -0,0 +1,14 @@
@echo off
echo [INFO] Packaging a executable war.
cd %~dp0
cd ..
set MAVEN_OPTS=%MAVEN_OPTS%
call mvn clean package -Pstandalone
echo [INFO] Executable war had been packaged as target/showcase-4.x.x.standalone.war
cd bin
pause
-2
View File
@@ -582,8 +582,6 @@
<goal>single</goal>
</goals>
<configuration>
<appendAssemblyId>true</appendAssemblyId>
<useProjectArtifact>false</useProjectArtifact>
<descriptors>
<descriptor>assembly-standalone.xml</descriptor>
</descriptors>
@@ -12,6 +12,7 @@
<a href="${ctx}/story/web/">Web演示</a>
<a href="${ctx}/story/webservice/">WebService演示</a>
<a href="${ctx}/story/jmx/">JMX演示</a>
<a href="${ctx}/story/executablewar/">可运行war包演示</a>
<a href="${ctx}/story/utilizes/">Utilizes演示</a>
<shiro:guest>
<a href="${ctx}/login">登录</a>
@@ -9,14 +9,17 @@
<h3>技术说明:</h3>
<ul>
<li>演示Memcached的使用</li>
<li>演示Spring与Ehcache的集成</li>
<li>演示基于Guava的单JVM内的,简单Cache</li>
<li>演示基于Ehcache的JVM内的,可集群共享的,功能丰富的Cache</li>
<li>演示基于Memcached的中央式cache,使用Spymemcached客户端</li>
</ul>
<h3>用户故事:</h3>
<ul>
<li>在AccountManager.java中演示了对Memcached的使用</li>
<li>GuavaCacheDemo.java演示了Guava Cache的使用</li>
<li>EhcacheDemo.java演示了Ehcache与Spring的集成</li>
<li>在AccountManager.java中演示了对Memcached的使用</li>
</ul>
</body>
</html>
@@ -0,0 +1,21 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<html>
<head>
<title>可执行War演示</title>
</head>
<body>
<h2>可运行War演示</h2>
<h3>技术说明:</h3>
<ul>
<li>可运行war使用嵌入式的Jetty,在简便的容器外运行web应用</li>
</ul>
<h3>用户故事:</h3>
<ul>
<li>在showcase中打包可运行war包的命令:mvn clean package -Pstandalone</li>
<li>运行war包的命令: java -jar showcase-4.x.x.standalone.war</li>
</ul>
</body>
</html>
@@ -31,6 +31,38 @@ public class Log4jManager {
private String projectLoggerName;
@ManagedAttribute(description = "Level of the root logger")
public String getRootLoggerLevel() {
Logger logger = Logger.getRootLogger();
return logger.getEffectiveLevel().toString();
}
@ManagedAttribute(description = "Level of the root logger")
public void setRootLoggerLevel(String newLevel) {
Logger logger = Logger.getRootLogger();
Level level = Level.toLevel(newLevel);
logger.setLevel(level);
managerLogger.info("设置Root Logger 级别为{}", newLevel);
}
/**
* 获得项目默认logger的级别.
* 项目默认logger名称通过#setProjectLoggerName(String)配置.
*/
@ManagedAttribute(description = "Project default logging level of the logger")
public String getProjectLoggerLevel() {
return getLoggerLevel(projectLoggerName);
}
/**
* 设置项目默认logger的级别.
* 项目默认logger名称通过#setProjectLoggerName(String)配置.
*/
@ManagedAttribute(description = "Project default logging level of the logger")
public void setProjectLoggerLevel(String newLevel) {
setLoggerLevel(projectLoggerName, newLevel);
}
/**
* 获取Logger的日志级别.
*/
@@ -55,24 +87,6 @@ public class Log4jManager {
managerLogger.info("设置{}级别为{}", loggerName, newLevel);
}
/**
* 获得项目默认logger的级别.
* 项目默认logger名称通过#setProjectLoggerName(String)配置.
*/
@ManagedAttribute(description = "Project default logging level of the logger")
public String getProjectLoggerLevel() {
return getLoggerLevel(projectLoggerName);
}
/**
* 设置项目默认logger的级别.
* 项目默认logger名称通过#setProjectLoggerName(String)配置.
*/
@ManagedAttribute(description = "Project default logging level of the logger")
public void setProjectLoggerLevel(String newLevel) {
setLoggerLevel(projectLoggerName, newLevel);
}
/**
* 根据log4j.properties中的定义, 设置项目默认的logger名称, 如org.springside.examples.miniweb.
*/
+6 -6
View File
@@ -11,7 +11,7 @@
<!-- 主要依赖库的版本定义 -->
<springside.version>4.0.0.RELEASE-SNAPSHOT</springside.version>
<spring.version>3.1.1.RELEASE</spring.version>
<hibernate.version>4.1.1.Final</hibernate.version>
<hibernate.version>4.1.2</hibernate.version>
<mybatis.version>3.1.0</mybatis.version>
<cxf.version>2.5.2</cxf.version>
<jersey.version>1.12</jersey.version>
@@ -23,8 +23,8 @@
<jackson.version>2.0.0</jackson.version>
<slf4j.version>1.6.4</slf4j.version>
<jetty.version>7.6.2.v20120308</jetty.version>
<h2.version>1.3.164</h2.version>
<selenium.version>2.20.0</selenium.version>
<h2.version>1.3.166</h2.version>
<selenium.version>2.21.0</selenium.version>
<!-- Plugin的属性定义 -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -421,7 +421,7 @@
<dependency>
<groupId>org.jolokia</groupId>
<artifactId>jolokia-core</artifactId>
<version>1.0.2</version>
<version>1.0.3</version>
</dependency>
<!-- jolokia end-->
@@ -682,13 +682,13 @@
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>1.4.11</version>
<version>1.4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
<version>1.4.11</version>
<version>1.4.12</version>
<scope>test</scope>
<exclusions>
<exclusion>