Subversion Repositories SmartDukaan

Rev

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

Rev 33693 Rev 33756
Line 1... Line 1...
1
package com.spice.profitmandi.web.config;
1
package com.spice.profitmandi.web.config;
2
 
2
 
3
import com.fasterxml.jackson.databind.ObjectMapper;
3
import com.fasterxml.jackson.databind.ObjectMapper;
4
import com.spice.profitmandi.web.interceptor.AuthenticationInterceptor;
4
import com.spice.profitmandi.web.interceptor.AuthenticationInterceptor;
-
 
5
import com.spice.profitmandi.web.interceptor.PostInterceptor;
5
import com.spice.profitmandi.web.interceptor.RoleInterceptor;
6
import com.spice.profitmandi.web.interceptor.RoleInterceptor;
6
import org.springframework.beans.factory.annotation.Autowired;
7
import org.springframework.beans.factory.annotation.Autowired;
7
import org.springframework.context.annotation.Bean;
8
import org.springframework.context.annotation.Bean;
8
import org.springframework.context.annotation.ComponentScan;
9
import org.springframework.context.annotation.ComponentScan;
9
import org.springframework.context.annotation.Configuration;
10
import org.springframework.context.annotation.Configuration;
Line 29... Line 30...
29
    private static final String RESOURCES_LOCATION = "/resources/";
30
    private static final String RESOURCES_LOCATION = "/resources/";
30
 
31
 
31
    @Autowired
32
    @Autowired
32
    AuthenticationInterceptor authenticationInterceptor;
33
    AuthenticationInterceptor authenticationInterceptor;
33
 
34
 
-
 
35
    //This interceptor is to ensures only single POST Request is passed at a moment
-
 
36
    //based on idempotency key provided through client side
-
 
37
    @Autowired
-
 
38
    PostInterceptor postInterceptor;
-
 
39
 
34
    @Autowired
40
    @Autowired
35
    RoleInterceptor roleInterceptor;
41
    RoleInterceptor roleInterceptor;
36
 
42
 
37
    @Autowired
43
    @Autowired
38
    ObjectMapper objectMapper;
44
    ObjectMapper objectMapper;
Line 51... Line 57...
51
                "/checkplans", "/12dashboard34", "/mandii", "/imei/validate", "/fundfina/**", "/virtualaccount/push-credits", "/wa-invoice-send/**",
57
                "/checkplans", "/12dashboard34", "/mandii", "/imei/validate", "/fundfina/**", "/virtualaccount/push-credits", "/wa-invoice-send/**",
52
                "/click2call/report-handler", "/click2call/report-handler/recording-url", "/wa-listen", "/upsellPayment/callback");
58
                "/click2call/report-handler", "/click2call/report-handler/recording-url", "/wa-listen", "/upsellPayment/callback");
53
        registry.addInterceptor(roleInterceptor).excludePathPatterns("/hdfctest/**", "/hdfc/**", "/spicemoney/callback", "/upsellPayment/callback", "/click2call/report-handler/recording-url", "/click2call/report-handler",
59
        registry.addInterceptor(roleInterceptor).excludePathPatterns("/hdfctest/**", "/hdfc/**", "/spicemoney/callback", "/upsellPayment/callback", "/click2call/report-handler/recording-url", "/click2call/report-handler",
54
                "/login", "/login/", "/register", "/register/", "/forgetPassword", "/forgetPassword/", "/", "",
60
                "/login", "/login/", "/register", "/register/", "/forgetPassword", "/forgetPassword/", "/", "",
55
                "/12dashboard34", "/mandii", "/imei/validate", "/fundfina/**", "/virtualaccount/push-credits", "/wa-invoice-send/**", "/wa-listen");
61
                "/12dashboard34", "/mandii", "/imei/validate", "/fundfina/**", "/virtualaccount/push-credits", "/wa-invoice-send/**", "/wa-listen");
-
 
62
        registry.addInterceptor(postInterceptor).addPathPatterns("/**").excludePathPatterns("/login", "/login/", "/upsellPayment/callback", "/click2call/report-handler/recording-url", "/click2call/report-handler");
56
    }
63
    }
57
 
64
 
58
    @Override
65
    @Override
59
    public void addFormatters(FormatterRegistry registry) {
66
    public void addFormatters(FormatterRegistry registry) {
60
        DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
67
        DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();