Package config

Source Code of config.GuiceConfig

package config;

import com.google.inject.AbstractModule;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.Singleton;
import com.google.inject.Stage;
import play.Play;
import play.modules.guice.GuiceSupport;
import services.image.GoogleSearchServiceImpl;
import services.image.ImageSearchService;

public class GuiceConfig extends GuiceSupport {

  @Override
  protected Injector configure() {
    //El plugin de guice para play omite el parámetro stage.
    Stage stage = Play.mode.isDev()?Stage.DEVELOPMENT : Stage.PRODUCTION;
    return Guice.createInjector(stage, new CustomModule());
  }

}
TOP

Related Classes of config.GuiceConfig

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.