@@ -0,0 +1,874 @@
+/**%0A * Created by Djidjelly Siclait on 12/14/2016.%0A */%0Apackage com.clinichelper.Service.Security;%0A%0Aimport com.clinichelper.Entity.User;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.stereotype.Service;%0A%0Aimport javax.servlet.http.HttpSession;%0A%0A@Service%0Apublic class SessionService %7B%0A%0A    // Attributes%0A    @Autowired%0A    private HttpSession session;%0A%0A    public Object getSessionAttr(String name)%0A    %7B%0A        return session.getAttribute(name);%0A    %7D%0A%0A    public void setSessionAttr(String name,Object obj)%0A    %7B%0A        session.setAttribute(name,obj);%0A    %7D%0A%0A    public boolean isUserLoggedIn() %7B%0A        return null != session.getAttribute(%22user%22);%0A    %7D%0A%0A    public void logOut()%0A    %7B%0A        session.invalidate();%0A    %7D%0A%0A    public User getCurrentLoggedUser()%0A    %7B%0A        return (User)session.getAttribute(%22user%22);%0A    %7D%0A%7D%0A

Create SessionService