This commit is contained in:
tanghc
2021-02-22 10:41:26 +08:00
parent 0f5f659b48
commit 5af379160c
30 changed files with 302 additions and 185 deletions

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee.sop</groupId>
<artifactId>sop-parent</artifactId>
<version>4.2.5-SNAPSHOT</version>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
</parent>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee.sop</groupId>
<artifactId>sop-parent</artifactId>
<version>4.2.5-SNAPSHOT</version>
<version>${revision}</version>
<relativePath>../../pom.xml</relativePath> <!-- lookup parent from repository -->
</parent>
@@ -26,7 +26,7 @@
<dependency>
<groupId>com.gitee.sop</groupId>
<artifactId>sop-service-common</artifactId>
<version>4.2.5-SNAPSHOT</version>
<version>${project.version}</version>
</dependency>
<!-- nacos -->
<dependency>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>com.gitee.sop</groupId>
<artifactId>sop-parent</artifactId>
<version>4.2.5-SNAPSHOT</version>
<version>${revision}</version>
<relativePath>../../pom.xml</relativePath> <!-- lookup parent from repository -->
</parent>
@@ -19,7 +19,7 @@
<dependency>
<groupId>com.gitee.sop</groupId>
<artifactId>sop-service-common</artifactId>
<version>4.2.5-SNAPSHOT</version>
<version>${project.version}</version>
</dependency>
<dependency>

View File

@@ -0,0 +1,29 @@
package com.gitee.sop.storyweb.controller;
import com.gitee.sop.servercommon.annotation.Open;
import com.gitee.sop.storyweb.controller.param.StoryParam;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.concurrent.TimeUnit;
/**
* 模拟超时设置
*
* @author tanghc
*/
@RestController
public class Example1009_TimeoutController {
@Open("goods.timeout")
@RequestMapping("timeoutTest")
public Object timeout(StoryParam param) {
// 模拟耗时操作耗时10秒
try {
TimeUnit.SECONDS.sleep(10);
} catch (InterruptedException e) {
e.printStackTrace();
}
return param;
}
}