Bind buildObjectFactory to self.
This commit is contained in:
parent
8dccc19393
commit
c7ec02a901
@ -1,5 +1,6 @@
|
|||||||
package com.jessebrault.ssg;
|
package com.jessebrault.ssg;
|
||||||
|
|
||||||
|
import com.jessebrault.di.ObjectFactory;
|
||||||
import com.jessebrault.di.RegistryObjectFactory;
|
import com.jessebrault.di.RegistryObjectFactory;
|
||||||
import com.jessebrault.ssg.buildscript.BuildSpec;
|
import com.jessebrault.ssg.buildscript.BuildSpec;
|
||||||
import com.jessebrault.ssg.di.GlobalsExtension;
|
import com.jessebrault.ssg.di.GlobalsExtension;
|
||||||
@ -51,6 +52,9 @@ public class DefaultObjectFactoryConfigurator implements ObjectFactoryConfigurat
|
|||||||
registry.bind(named("baseUrl", String.class), toSingleton(buildSpec.getBaseUrl().get(() ->
|
registry.bind(named("baseUrl", String.class), toSingleton(buildSpec.getBaseUrl().get(() ->
|
||||||
new SsgException("the baseUrl Property in " + buildSpec.getName() + " must be set.")
|
new SsgException("the baseUrl Property in " + buildSpec.getName() + " must be set.")
|
||||||
)));
|
)));
|
||||||
|
|
||||||
|
// self binding
|
||||||
|
registry.bind(ObjectFactory.class, toSingleton(registryObjectFactory));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user