-
Notifications
You must be signed in to change notification settings - Fork 212
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
1 parent
e2d15df
commit 200f8b2
Showing
16 changed files
with
184 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ modifyPom { | |
|
||
groupId 'com.aol.microservices' | ||
artifactId 'microserver-boot' | ||
version '0.53.3' | ||
version '0.53.6' | ||
|
||
scm { | ||
url 'scm:[email protected]:aol/micro-server.git' | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,4 +58,6 @@ | |
*/ | ||
boolean allowCircularDependencies() default false; | ||
|
||
@Microserver | ||
static class Instance{} | ||
} |
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
48 changes: 48 additions & 0 deletions
48
micro-core/src/test/java/app/noanno/com/aol/micro/server/copy/NoAnnoRunnerTest.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,48 @@ | ||
package app.noanno.com.aol.micro.server.copy; | ||
|
||
|
||
import static org.hamcrest.CoreMatchers.is; | ||
import static org.junit.Assert.assertThat; | ||
|
||
import java.util.concurrent.ExecutionException; | ||
|
||
import org.junit.After; | ||
import org.junit.Before; | ||
import org.junit.Test; | ||
|
||
import com.aol.micro.server.MicroserverApp; | ||
import com.aol.micro.server.config.Microserver; | ||
import com.aol.micro.server.testing.RestAgent; | ||
|
||
|
||
public class NoAnnoRunnerTest { | ||
|
||
RestAgent rest = new RestAgent(); | ||
|
||
MicroserverApp server; | ||
@Before | ||
public void startServer(){ | ||
|
||
server = new MicroserverApp(()-> "simple-app"); | ||
server.start(); | ||
|
||
} | ||
|
||
@After | ||
public void stopServer(){ | ||
server.stop(); | ||
} | ||
|
||
@Test | ||
public void runAppAndBasicTest() throws InterruptedException, ExecutionException{ | ||
|
||
|
||
|
||
assertThat(rest.get("http://localhost:8080/simple-app/status/ping"),is("ok")); | ||
|
||
|
||
} | ||
|
||
|
||
|
||
} |
24 changes: 24 additions & 0 deletions
24
micro-core/src/test/java/app/noanno/com/aol/micro/server/copy/NoAnnoStatusResource.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,24 @@ | ||
package app.noanno.com.aol.micro.server.copy; | ||
|
||
import javax.ws.rs.GET; | ||
import javax.ws.rs.Path; | ||
import javax.ws.rs.Produces; | ||
|
||
import com.aol.micro.server.auto.discovery.Rest; | ||
|
||
@Rest | ||
@Path("/status") | ||
public class NoAnnoStatusResource { | ||
|
||
|
||
|
||
@GET | ||
@Produces("text/plain") | ||
@Path("/ping") | ||
public String ping() { | ||
|
||
return "ok"; | ||
} | ||
|
||
|
||
} |
12 changes: 12 additions & 0 deletions
12
micro-core/src/test/java/app/noanno/com/aol/micro/server/copy/SimpleApp.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,12 @@ | ||
package app.noanno.com.aol.micro.server.copy; | ||
|
||
import com.aol.micro.server.MicroserverApp; | ||
|
||
public class SimpleApp { | ||
|
||
public static void main(String[] args){ | ||
new MicroserverApp(()-> "simple-app").run(); | ||
} | ||
|
||
|
||
} |
19 changes: 19 additions & 0 deletions
19
micro-core/src/test/java/com/windriver/simpleserver/HelloResource.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,19 @@ | ||
package com.windriver.simpleserver; | ||
|
||
import javax.ws.rs.GET; | ||
import javax.ws.rs.Path; | ||
import javax.ws.rs.Produces; | ||
|
||
import com.aol.micro.server.auto.discovery.Rest; | ||
|
||
@Rest | ||
@Path("/foo") | ||
public class HelloResource { | ||
|
||
@GET | ||
@Produces("text/plain") | ||
@Path("/hello") | ||
public String hello() { | ||
return "world"; | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
micro-core/src/test/java/com/windriver/simpleserver/TestMicroserverApp.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,15 @@ | ||
package com.windriver.simpleserver; | ||
|
||
|
||
import com.aol.micro.server.MicroserverApp; | ||
|
||
public class TestMicroserverApp { | ||
|
||
public static void main(String[] args) { | ||
// SLF4JBridgeHandler.removeHandlersForRootLogger(); | ||
// SLF4JBridgeHandler.install(); | ||
|
||
new MicroserverApp(()->"simple").start(); | ||
} | ||
|
||
} |