Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
后端镜像
java镜像
Springside4
提交
bc404eb6
S
Springside4
项目概览
后端镜像
/
java镜像
/
Springside4
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Springside4
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
bc404eb6
编写于
1月 20, 2013
作者:
C
Calvin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
little updates
上级
06b41be5
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
15 addition
and
8 deletion
+15
-8
examples/quickstart/src/main/java/org/springside/examples/quickstart/web/task/TaskController.java
...ringside/examples/quickstart/web/task/TaskController.java
+6
-4
examples/showcase/src/main/java/org/springside/examples/showcase/demos/cache/guava/GuavaCacheDemo.java
...e/examples/showcase/demos/cache/guava/GuavaCacheDemo.java
+1
-1
modules/parent/pom.xml
modules/parent/pom.xml
+0
-1
modules/test/src/main/java/org/springside/modules/test/benchmark/BenchmarkBase.java
.../org/springside/modules/test/benchmark/BenchmarkBase.java
+8
-2
未找到文件。
examples/quickstart/src/main/java/org/springside/examples/quickstart/web/task/TaskController.java
浏览文件 @
bc404eb6
...
@@ -40,7 +40,7 @@ import com.google.common.collect.Maps;
...
@@ -40,7 +40,7 @@ import com.google.common.collect.Maps;
@RequestMapping
(
value
=
"/task"
)
@RequestMapping
(
value
=
"/task"
)
public
class
TaskController
{
public
class
TaskController
{
private
static
final
int
PAGE_SIZE
=
3
;
private
static
final
String
PAGE_SIZE
=
"3"
;
private
static
Map
<
String
,
String
>
sortTypes
=
Maps
.
newLinkedHashMap
();
private
static
Map
<
String
,
String
>
sortTypes
=
Maps
.
newLinkedHashMap
();
static
{
static
{
...
@@ -52,12 +52,14 @@ public class TaskController {
...
@@ -52,12 +52,14 @@ public class TaskController {
private
TaskService
taskService
;
private
TaskService
taskService
;
@RequestMapping
(
value
=
""
)
@RequestMapping
(
value
=
""
)
public
String
list
(
@RequestParam
(
value
=
"sortType"
,
defaultValue
=
"auto"
)
String
sortType
,
public
String
list
(
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
)
int
pageNumber
,
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
)
int
pageNumber
,
Model
model
,
ServletRequest
request
)
{
@RequestParam
(
value
=
"page.size"
,
defaultValue
=
PAGE_SIZE
)
int
pageSize
,
@RequestParam
(
value
=
"sortType"
,
defaultValue
=
"auto"
)
String
sortType
,
Model
model
,
ServletRequest
request
)
{
Map
<
String
,
Object
>
searchParams
=
Servlets
.
getParametersStartingWith
(
request
,
"search_"
);
Map
<
String
,
Object
>
searchParams
=
Servlets
.
getParametersStartingWith
(
request
,
"search_"
);
Long
userId
=
getCurrentUserId
();
Long
userId
=
getCurrentUserId
();
Page
<
Task
>
tasks
=
taskService
.
getUserTask
(
userId
,
searchParams
,
pageNumber
,
PAGE_SIZE
,
sortType
);
Page
<
Task
>
tasks
=
taskService
.
getUserTask
(
userId
,
searchParams
,
pageNumber
,
pageSize
,
sortType
);
model
.
addAttribute
(
"tasks"
,
tasks
);
model
.
addAttribute
(
"tasks"
,
tasks
);
model
.
addAttribute
(
"sortType"
,
sortType
);
model
.
addAttribute
(
"sortType"
,
sortType
);
...
...
examples/showcase/src/main/java/org/springside/examples/showcase/demos/cache/guava/GuavaCacheDemo.java
浏览文件 @
bc404eb6
...
@@ -23,7 +23,7 @@ import com.google.common.cache.LoadingCache;
...
@@ -23,7 +23,7 @@ import com.google.common.cache.LoadingCache;
/**
/**
* 本地缓存演示,使用GuavaCache.
* 本地缓存演示,使用GuavaCache.
*
*
* @author
hzl7652
* @author
calvin
*/
*/
@ContextConfiguration
(
locations
=
{
"/applicationContext.xml"
})
@ContextConfiguration
(
locations
=
{
"/applicationContext.xml"
})
public
class
GuavaCacheDemo
extends
SpringTransactionalTestCase
{
public
class
GuavaCacheDemo
extends
SpringTransactionalTestCase
{
...
...
modules/parent/pom.xml
浏览文件 @
bc404eb6
...
@@ -456,7 +456,6 @@
...
@@ -456,7 +456,6 @@
<groupId>
ch.qos.logback
</groupId>
<groupId>
ch.qos.logback
</groupId>
<artifactId>
logback-classic
</artifactId>
<artifactId>
logback-classic
</artifactId>
<version>
${logback.version}
</version>
<version>
${logback.version}
</version>
<scope>
runtime
</scope>
</dependency>
</dependency>
<!-- log4j 实际调用slf4j -->
<!-- log4j 实际调用slf4j -->
...
...
modules/test/src/main/java/org/springside/modules/test/benchmark/BenchmarkBase.java
浏览文件 @
bc404eb6
...
@@ -53,6 +53,9 @@ public abstract class BenchmarkBase {
...
@@ -53,6 +53,9 @@ public abstract class BenchmarkBase {
onFinish
();
onFinish
();
}
}
/**
* Must be invoked after each thread finish the prepare job, return the startTime.
*/
protected
Date
onThreadStart
()
{
protected
Date
onThreadStart
()
{
startLock
.
countDown
();
startLock
.
countDown
();
//wait for all threads ready
//wait for all threads ready
...
@@ -64,6 +67,9 @@ public abstract class BenchmarkBase {
...
@@ -64,6 +67,9 @@ public abstract class BenchmarkBase {
return
new
Date
();
return
new
Date
();
}
}
/**
* Must be invoked after the loop finish.
*/
protected
void
onThreadFinish
(
Date
threadStartTime
)
{
protected
void
onThreadFinish
(
Date
threadStartTime
)
{
// notify test finish
// notify test finish
finishLock
.
countDown
();
finishLock
.
countDown
();
...
@@ -74,13 +80,13 @@ public abstract class BenchmarkBase {
...
@@ -74,13 +80,13 @@ public abstract class BenchmarkBase {
}
}
/**
/**
* Override to do some data prepare job.
* Override to do some
global
data prepare job.
*/
*/
protected
void
onStart
()
{
protected
void
onStart
()
{
}
}
/**
/**
* Override to do some data cleanup and verify job.
* Override to do some
global
data cleanup and verify job.
*/
*/
protected
void
onFinish
()
{
protected
void
onFinish
()
{
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录