-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
103 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...o-maker/src/main/resources/static/thymeleaf/src/main/java/_package/module/TimeModule.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package [[${params.packageName}]].module; | ||
|
||
|
||
import org.nutz.ioc.impl.PropertiesProxy; | ||
import org.nutz.ioc.loader.annotation.*; | ||
import org.nutz.mvc.annotation.*; | ||
import io.swagger.annotations.Api; | ||
import io.swagger.annotations.ApiOperation; | ||
|
||
@Api("time") | ||
@At("/time") | ||
@IocBean(create="init", depose="depose") | ||
public class TimeModule { | ||
|
||
@Inject | ||
protected PropertiesProxy conf; | ||
|
||
@ApiOperation(value = "获取当前毫秒数", notes = "服务器端的时间", httpMethod="GET", response=Long.class) | ||
@At | ||
@Ok("raw") | ||
public long now() { | ||
return System.currentTimeMillis(); | ||
} | ||
|
||
public void init() {} | ||
public void depose() {} | ||
|
||
} |
17 changes: 17 additions & 0 deletions
17
...zboot-demo-maker/src/main/resources/static/thymeleaf/src/main/resources/static/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Hello, So NB!</title> | ||
</head> | ||
<body> | ||
<div> | ||
<h2>Hello, So NB!</h2> | ||
</div> | ||
<div> | ||
<h2> | ||
<a href="swagger/index.html">查看api文档(由Swagger生成)</a> | ||
</h2> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters