-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
2 changed files
with
40 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
group 'nlpcn.org' | ||
version '1.2' | ||
version '1.3' | ||
|
||
apply plugin: 'java' | ||
apply plugin: 'war' | ||
|
39 changes: 39 additions & 0 deletions
39
src/test/java/org/nlpcn/jcoder/run/java/ApiExampleAction.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,39 @@ | ||
//package org.nlpcn.jcoder.run.java; | ||
// | ||
//import org.nlpcn.jcoder.run.annotation.Cache; | ||
// | ||
///** | ||
// * this is a api example | ||
// * | ||
// * @author ansj | ||
// * | ||
// */ | ||
//@Single(false) // default is true | ||
//public class ApiExampleAction { | ||
// | ||
// @Inject | ||
// private Logger log ; | ||
// | ||
// @Inject | ||
// private Dao dao ; | ||
// | ||
// @Execute // publish this function to api ! | ||
// // use url is | ||
// // http://host:port/[className]/methodName?field=value | ||
// // http//localhost:8080/ApiExampleAction/method?name=heloo&hello_word=hi | ||
// public Object function(HttpServletRequest req, HttpServerResponse rep, String name, @Param("hello_word") Integer helloWord) { | ||
// dosomething.. | ||
// } | ||
// | ||
// @DefaultExecute // publish this function to api ! | ||
// //http://localhost:8080/ApiExampleAction?user.name=aaa&user.passowrd=bbb | ||
// //http://localhost:8080/ApiExampleAction/function2?user.name=aaa&user.passowrd=bbb | ||
// //more about http://www.nutzam.com/core/mvc/http_adaptor.html | ||
// | ||
// @Cache(time=10,size=1000,block=false) // time SECONDS , block if false use asynchronous | ||
// public Object function2(@Param("..") User user) { | ||
// | ||
// dosomething.. | ||
// } | ||
// | ||
//} |