想在业务层所处的项目里面, 创建一个共通工具类来返回SESSION里保存的用户信息
可以实现吗?
PHP中文网2017-04-17 17:50:36
Session is something in the Controller layer and should not be passed to the Service and Dao layers. You should extract the user information at the Controller layer and save it in the cache, and then the Service layer obtains the user information through userKey.