Created
June 28, 2018 11:15
-
-
Save DNAlchemist/19472ab2e08caca800df8d42b5afb887 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import org.springframework.beans.factory.annotation.Autowired | |
import ratpack.handling.Chain | |
import ratpack.http.client.HttpClient | |
// project 1 | |
// no dependencies | |
interface Service { | |
void doRequest() | |
} | |
// project 2 | |
// depends on ratpack, project 1 | |
class Handler { | |
// ServiceImpl instance | |
@Autowired | |
Service service | |
def execute(Chain chain) { | |
chain.path('doRequest') { ctx -> | |
HttpClient httpClient = ctx.get(HttpClient) | |
service.doRequest() | |
} | |
} | |
} | |
// project 3 | |
// depends on ratpack, project 1, project 2 | |
class ServiceImpl implements Service { | |
void doRequest() { | |
// need HttpClient | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment