com.web.panacea.service.SessionServiceImpl.java Source code

Java tutorial

Introduction

Here is the source code for com.web.panacea.service.SessionServiceImpl.java

Source

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.web.panacea.service;

import javax.servlet.http.HttpSession;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class SessionServiceImpl implements SessionService {

    public String getRole(HttpSession session) {
        return session.getAttribute("role").toString();
    }

}