Subversion Repositories SmartDukaan

Rev

Rev 22165 | Rev 22172 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 22165 Rev 22171
Line 3... Line 3...
3
import java.io.IOException;
3
import java.io.IOException;
4
import java.util.Properties;
4
import java.util.Properties;
5
 
5
 
6
import org.slf4j.Logger;
6
import org.slf4j.Logger;
7
import org.slf4j.LoggerFactory;
7
import org.slf4j.LoggerFactory;
-
 
8
import org.springframework.beans.factory.annotation.Value;
8
import org.springframework.context.annotation.Bean;
9
import org.springframework.context.annotation.Bean;
9
import org.springframework.context.annotation.ComponentScan;
10
import org.springframework.context.annotation.ComponentScan;
10
import org.springframework.context.annotation.Configuration;
11
import org.springframework.context.annotation.Configuration;
11
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
12
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
12
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
13
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
Line 15... Line 16...
15
import org.springframework.web.multipart.commons.CommonsMultipartResolver;
16
import org.springframework.web.multipart.commons.CommonsMultipartResolver;
16
import org.springframework.web.servlet.ViewResolver;
17
import org.springframework.web.servlet.ViewResolver;
17
import org.springframework.web.servlet.view.velocity.VelocityConfigurer;
18
import org.springframework.web.servlet.view.velocity.VelocityConfigurer;
18
import org.springframework.web.servlet.view.velocity.VelocityLayoutViewResolver;
19
import org.springframework.web.servlet.view.velocity.VelocityLayoutViewResolver;
19
 
20
 
-
 
21
import com.mongodb.MongoConnectionPoolMXBean;
20
import com.spice.profitmandi.dao.repository.dtr.Mongo;
22
import com.spice.profitmandi.dao.repository.dtr.Mongo;
21
 
23
 
22
@SuppressWarnings("deprecation")
24
@SuppressWarnings("deprecation")
23
@Configuration
25
@Configuration
24
@ComponentScan("com.spice.profitmandi.*")
26
@ComponentScan("com.spice.profitmandi.*")
Line 27... Line 29...
27
	private static final String VELOCITY_PATH_PREFIX="/WEB-INF/views/ftl/";
29
	private static final String VELOCITY_PATH_PREFIX="/WEB-INF/views/ftl/";
28
	private static final String VELOCITY_PATH_SUFFIX=".vm";
30
	private static final String VELOCITY_PATH_SUFFIX=".vm";
29
	private static final String MESSAGE_PATH_SOURCE_NAME="classpath:message";
31
	private static final String MESSAGE_PATH_SOURCE_NAME="classpath:message";
30
	private static final Logger LOGGER=LoggerFactory.getLogger(AppConfig.class);
32
	private static final Logger LOGGER=LoggerFactory.getLogger(AppConfig.class);
31
	private static Resource resource;
33
	private static Resource resource;
-
 
34
	
-
 
35
 
-
 
36
	
-
 
37
	@Value("${mongo.host}")
-
 
38
	private String mongoHost;
-
 
39
 
-
 
40
	@Value("${content.mongo.host}")
-
 
41
	private String contentMongoHost;
32
 
42
 
33
	public static Resource getResource() {
43
	public static Resource getResource() {
34
		return resource;
44
		return resource;
35
	}
45
	}
36
 
46
 
Line 99... Line 109...
99
		return propertySourcesPlaceholderConfigurer;
109
		return propertySourcesPlaceholderConfigurer;
100
	}
110
	}
101
	
111
	
102
	@Bean
112
	@Bean
103
    public Mongo mongoClient() {
113
    public Mongo mongoClient() {
104
        return new Mongo();
114
        return new Mongo(mongoHost, contentMongoHost);
105
    }
115
    }
106
 
116
 
107
}
117
}
108
118