* yasin.bhojawala@gmail.com Evaluation article on Different Types of Bean Injection in Spring * Revert "yasin.bhojawala@gmail.com" This reverts commit 963cc51a7a15b75b550108fe4e198cd65a274032. * Fixing compilation error and removing unused import * Introduction to Java9 StackWalking API - yasin.bhojawala@gmail.com Code examples for the article "Introduction to Java9 StackWalking API" * BAEL-608 Introduction to Java9 StackWalking API * BAEL-608 Introduction to Java9 StackWalking API changing the test names to BDD style * BAEL-608 Introduction to Java9 StackWalking API correcting the typo * BAEL-608 Introduction to Java9 StackWalking API improving method names * BAEL-608 Introduction to Java9 StackWalking API test method names improvements * BAEL-718 Quick intro to javatuples * merging pom from master * BAEL-722 Intro to JSONassert
33 lines
843 B
Java
33 lines
843 B
Java
|
|
package com.baeldung.examples;
|
|
|
|
import com.baeldung.examples.guice.Communication;
|
|
import com.baeldung.examples.guice.binding.AOPModule;
|
|
import com.baeldung.examples.guice.modules.BasicModule;
|
|
import com.google.inject.Guice;
|
|
import com.google.inject.Injector;
|
|
import java.util.Scanner;
|
|
|
|
/**
|
|
*
|
|
* @author baeldung
|
|
*/
|
|
public class RunGuice {
|
|
|
|
public static void main(String[] args) {
|
|
Injector injector = Guice.createInjector(new BasicModule(), new AOPModule());
|
|
Communication comms = injector.getInstance(Communication.class);
|
|
Scanner scanner = new Scanner(System.in);
|
|
while (true) {
|
|
String input = scanner.nextLine();
|
|
if (input.equalsIgnoreCase("q")) {
|
|
System.exit(0);
|
|
} else {
|
|
comms.sendMessage(input);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
}
|