litmus-proxy module
Signed-off-by: chandresh pancholi <chandresh.pancholi@navi.com>
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -22,4 +22,7 @@ litmus-liquibase/target
|
||||
litmus-cache/litmus-cache.iml
|
||||
litmus-cache/target
|
||||
|
||||
litmus-proxy/litmus-proxy.iml
|
||||
litmus-proxy/target
|
||||
|
||||
target
|
||||
@@ -5,6 +5,7 @@ import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@@ -15,8 +16,8 @@ public class MockController {
|
||||
private final Litmus litmus;
|
||||
|
||||
@GetMapping("/mock")
|
||||
public String test() {
|
||||
var result = litmus.isEnabled("test-offer");
|
||||
public String test(@RequestParam("experiment") String experiment) {
|
||||
var result = litmus.isEnabled(experiment);
|
||||
log.info("result ----> {}", result);
|
||||
|
||||
return "result ==> " + result;
|
||||
|
||||
23
litmus-proxy/pom.xml
Normal file
23
litmus-proxy/pom.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>litmus</artifactId>
|
||||
<groupId>com.navi.medici</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>litmus-proxy</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<name>litmus-proxy</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.11</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
13
litmus-proxy/src/main/java/com/navi/medici/App.java
Normal file
13
litmus-proxy/src/main/java/com/navi/medici/App.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package com.navi.medici;
|
||||
|
||||
/**
|
||||
* Hello world!
|
||||
*
|
||||
*/
|
||||
public class App
|
||||
{
|
||||
public static void main( String[] args )
|
||||
{
|
||||
System.out.println( "Hello World!" );
|
||||
}
|
||||
}
|
||||
20
litmus-proxy/src/test/java/com/navi/medici/AppTest.java
Normal file
20
litmus-proxy/src/test/java/com/navi/medici/AppTest.java
Normal file
@@ -0,0 +1,20 @@
|
||||
package com.navi.medici;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* Unit test for simple App.
|
||||
*/
|
||||
public class AppTest
|
||||
{
|
||||
/**
|
||||
* Rigorous Test :-)
|
||||
*/
|
||||
@Test
|
||||
public void shouldAnswerWithTrue()
|
||||
{
|
||||
assertTrue( true );
|
||||
}
|
||||
}
|
||||
26
pom.xml
26
pom.xml
@@ -1,14 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.navi.medici</groupId>
|
||||
<artifactId>litmus</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<packaging>pom</packaging>
|
||||
<name>litmus</name>
|
||||
|
||||
<name>litmus</name>
|
||||
|
||||
<modules>
|
||||
<module>litmus-core</module>
|
||||
<module>litmus-model</module>
|
||||
@@ -17,14 +17,15 @@
|
||||
<module>litmus-mock</module>
|
||||
<module>litmus-liquibase</module>
|
||||
<module>litmus-cache</module>
|
||||
<module>litmus-proxy</module>
|
||||
</modules>
|
||||
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.5.5</version>
|
||||
</parent>
|
||||
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
@@ -35,20 +36,20 @@
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-devtools</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.20</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>co.elastic.logging</groupId>
|
||||
<artifactId>log4j2-ecs-layout</artifactId>
|
||||
<version>1.1.0</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.code.findbugs</groupId>
|
||||
<artifactId>jsr305</artifactId>
|
||||
@@ -62,9 +63,9 @@
|
||||
<version>4.13.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
@@ -83,11 +84,6 @@
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
|
||||
</build>
|
||||
|
||||
|
||||
|
||||
</project>
|
||||
|
||||
Reference in New Issue
Block a user