File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
src/main/java/in/erail/route Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 1414public class SessionRouteBuillder extends AbstractRouterBuilderImpl {
1515
1616 private SessionStore mSessionStore ;
17+ private boolean mEnableSession = false ;
1718
1819 public SessionStore getSessionStore () {
1920 return mSessionStore ;
@@ -28,8 +29,18 @@ public Router getRouter(Router pRouter) {
2829 Route route = pRouter .route ();
2930 route .handler (BodyHandler .create ());
3031 route .handler (CookieHandler .create ());
31- route .handler (SessionHandler .create (getSessionStore ()));
32+ if (isEnableSession ()) {
33+ route .handler (SessionHandler .create (getSessionStore ()));
34+ }
3235 return pRouter ;
3336 }
3437
38+ public boolean isEnableSession () {
39+ return mEnableSession ;
40+ }
41+
42+ public void setEnableSession (boolean pEnableSession ) {
43+ this .mEnableSession = pEnableSession ;
44+ }
45+
3546}
You can’t perform that action at this time.
0 commit comments