Package com.dodo.blog.config

Source Code of com.dodo.blog.config.GuiceServletConfig

package com.dodo.blog.config;

import com.comvai.auth.config.AuthServletModule;
import com.comvai.bulkloader.BulkLoaderModule;
import com.comvai.bulkloader.BulkLoaderServletModule;
import com.comvai.services.gae.CommonServicesGaeModule;
import com.comvai.services.gae.CommonServicesGaeServletModule;
import com.comvai.services.gae.GaeGuiceServletContextListener;
import com.dodo.blog.server.impl.BlogModule;
import com.google.inject.Guice;
import com.google.inject.Injector;

/**
* @author <a href="mailto:medvegy@comvai.com">Aurel Medvegy</a>
*/
public class GuiceServletConfig
        extends GaeGuiceServletContextListener
{
    @Override
    protected Injector getTestInjector()
    {
        return Guice.createInjector(
                new BulkLoaderModule(),
                new BulkLoaderServletModule(),
                new BlogModule(),
                new BlogServletModule(),
                new CommonServicesGaeModule(),
                new CommonServicesGaeServletModule(),
                new AuthServletModule() );
    }

    @Override
    protected Injector getProductionInjector()
    {
        return Guice.createInjector(
                new BulkLoaderModule(),
                new BulkLoaderServletModule(),
                new BlogModule(),
                new BlogServletModule(),
                new CommonServicesGaeModule(),
                new CommonServicesGaeServletModule(),
                new AuthServletModule() );
    }
}
TOP

Related Classes of com.dodo.blog.config.GuiceServletConfig

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.