| Line 1... |
Line 1... |
| 1 |
package com.spice.profitmandi.web.config;
|
1 |
package com.spice.profitmandi.web.config;
|
| 2 |
|
2 |
|
| 3 |
import java.io.IOException;
|
3 |
import java.io.IOException;
|
| 4 |
|
- |
|
| - |
|
4 |
import java.time.format.DateTimeFormatter;
|
| - |
|
5 |
import java.util.HashMap;
|
| - |
|
6 |
import java.util.Map;
|
| 5 |
import java.util.Properties;
|
7 |
import java.util.Properties;
|
| 6 |
|
8 |
|
| 7 |
import org.apache.logging.log4j.Logger;
|
- |
|
| 8 |
import org.apache.logging.log4j.LogManager;
|
9 |
import org.apache.logging.log4j.LogManager;
|
| - |
|
10 |
import org.apache.logging.log4j.Logger;
|
| 9 |
import org.springframework.context.annotation.Bean;
|
11 |
import org.springframework.context.annotation.Bean;
|
| 10 |
import org.springframework.context.annotation.ComponentScan;
|
12 |
import org.springframework.context.annotation.ComponentScan;
|
| 11 |
import org.springframework.context.annotation.Configuration;
|
13 |
import org.springframework.context.annotation.Configuration;
|
| 12 |
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
|
14 |
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
|
| 13 |
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
|
15 |
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
|
| Line 42... |
Line 44... |
| 42 |
{
|
44 |
{
|
| 43 |
VelocityLayoutViewResolver bean = new VelocityLayoutViewResolver();
|
45 |
VelocityLayoutViewResolver bean = new VelocityLayoutViewResolver();
|
| 44 |
bean.setPrefix("");
|
46 |
bean.setPrefix("");
|
| 45 |
bean.setSuffix(VELOCITY_PATH_SUFFIX);
|
47 |
bean.setSuffix(VELOCITY_PATH_SUFFIX);
|
| 46 |
bean.setRequestContextAttribute("rc");
|
48 |
bean.setRequestContextAttribute("rc");
|
| - |
|
49 |
Map<String, Object> attributesMap = new HashMap<>();
|
| - |
|
50 |
DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern("dd/MM/yyyy");
|
| - |
|
51 |
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm");
|
| - |
|
52 |
attributesMap.put("dateFormatter", dateFormatter);
|
| - |
|
53 |
attributesMap.put("dateTimeFormatter", dateTimeFormatter);
|
| - |
|
54 |
bean.setAttributesMap(attributesMap);
|
| 47 |
return bean;
|
55 |
return bean;
|
| 48 |
}
|
56 |
}
|
| 49 |
|
57 |
|
| 50 |
@Bean
|
58 |
@Bean
|
| 51 |
public VelocityConfigurer velocityConfig() {
|
59 |
public VelocityConfigurer velocityConfig() {
|