| Line 33... |
Line 33... |
| 33 |
import org.springframework.context.annotation.ComponentScan;
|
33 |
import org.springframework.context.annotation.ComponentScan;
|
| 34 |
import org.springframework.context.annotation.EnableAspectJAutoProxy;
|
34 |
import org.springframework.context.annotation.EnableAspectJAutoProxy;
|
| 35 |
import org.springframework.context.annotation.Primary;
|
35 |
import org.springframework.context.annotation.Primary;
|
| 36 |
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
|
36 |
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
|
| 37 |
import org.springframework.core.io.ClassPathResource;
|
37 |
import org.springframework.core.io.ClassPathResource;
|
| - |
|
38 |
import org.springframework.core.io.Resource;
|
| 38 |
import org.springframework.mail.javamail.JavaMailSender;
|
39 |
import org.springframework.mail.javamail.JavaMailSender;
|
| 39 |
import org.springframework.mail.javamail.JavaMailSenderImpl;
|
40 |
import org.springframework.mail.javamail.JavaMailSenderImpl;
|
| 40 |
import org.springframework.ui.velocity.VelocityEngineFactoryBean;
|
41 |
import org.springframework.ui.velocity.VelocityEngineFactoryBean;
|
| 41 |
|
42 |
|
| 42 |
import java.io.FileInputStream;
|
43 |
import java.io.FileInputStream;
|
| Line 99... |
Line 100... |
| 99 |
|
100 |
|
| 100 |
@Bean
|
101 |
@Bean
|
| 101 |
public static PropertySourcesPlaceholderConfigurer propertyConfigurer1() {
|
102 |
public static PropertySourcesPlaceholderConfigurer propertyConfigurer1() {
|
| 102 |
LOGGER.info("Called Configuration");
|
103 |
LOGGER.info("Called Configuration");
|
| 103 |
PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer = new PropertySourcesPlaceholderConfigurer();
|
104 |
PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer = new PropertySourcesPlaceholderConfigurer();
|
| - |
|
105 |
|
| - |
|
106 |
// Load shared properties from dao first, then app-specific (app-specific can override)
|
| - |
|
107 |
Resource sharedResource = new ClassPathResource("/shared-dev.properties");
|
| - |
|
108 |
Resource appResource = new ClassPathResource("/META-INF/env.properties");
|
| - |
|
109 |
|
| 104 |
propertySourcesPlaceholderConfigurer.setLocation(new ClassPathResource("/META-INF/env.properties"));
|
110 |
propertySourcesPlaceholderConfigurer.setLocations(sharedResource, appResource);
|
| - |
|
111 |
propertySourcesPlaceholderConfigurer.setIgnoreResourceNotFound(true);
|
| - |
|
112 |
|
| 105 |
return propertySourcesPlaceholderConfigurer;
|
113 |
return propertySourcesPlaceholderConfigurer;
|
| 106 |
}
|
114 |
}
|
| 107 |
|
115 |
|
| 108 |
@Bean(name = "veloctyEngine")
|
116 |
@Bean(name = "veloctyEngine")
|
| 109 |
public VelocityEngine velocityEngine() throws VelocityException, IOException {
|
117 |
public VelocityEngine velocityEngine() throws VelocityException, IOException {
|