public class NameBindTest {
@Test
public void nameBindTest() throws IOException, URISyntaxException, InterruptedException {
System.out.println("--->>nameBindTest<<--");
//1.创建一个标准的 Hasor 容器。
AppContext appContext = Hasor.createAppContext(new Module() {
public void loadModule(ApiBinder apiBinder) throws Throwable {
//绑定一个接口和实现类
apiBinder.bindType(CharSequence.class).nameWith("ModuleA").toInstance("this String form A");
apiBinder.bindType(CharSequence.class).nameWith("ModuleB").toInstance("this String form B");
}