added Default annotation to fix ServletContext injection on eager loading singletons

This commit is contained in:
Sebastian Sdorra
2014-08-24 14:49:35 +02:00
parent 9d1480acee
commit 50b0b6b2b8
9 changed files with 92 additions and 14 deletions

View File

@@ -46,6 +46,7 @@ import com.google.inject.Inject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import sonia.scm.Default;
import sonia.scm.plugin.PluginLoader;
//~--- JDK imports ------------------------------------------------------------
@@ -89,7 +90,7 @@ public class MustacheTemplateEngine implements TemplateEngine
* @param pluginLoader
*/
@Inject
public MustacheTemplateEngine(ServletContext context,
public MustacheTemplateEngine(@Default ServletContext context,
PluginLoader pluginLoader)
{
factory = new ServletMustacheFactory(context, pluginLoader);