Move Mapper binding to GitServletModule

This commit is contained in:
Johannes Schnatterer
2018-08-01 14:11:27 +02:00
parent 02327b55f3
commit 7c8fee5640
2 changed files with 6 additions and 21 deletions

View File

@@ -1,18 +0,0 @@
package sonia.scm.api.v2.resources;
import com.google.inject.AbstractModule;
import com.google.inject.servlet.ServletScopes;
import org.mapstruct.factory.Mappers;
import sonia.scm.plugin.Extension;
@Extension
public class MapperModule extends AbstractModule {
@Override
protected void configure() {
bind(GitConfigDtoToGitConfigMapper.class).to(Mappers.getMapper(GitConfigDtoToGitConfigMapper.class).getClass());
bind(GitConfigToGitConfigDtoMapper.class).to(Mappers.getMapper(GitConfigToGitConfigDtoMapper.class).getClass());
bind(UriInfoStore.class).in(ServletScopes.REQUEST);
}
}