java - Should the service layer not write http-related operations?
给我你的怀抱
给我你的怀抱 2017-06-23 09:14:01
0
3
810

Prerequisite: java, springmvc.

I have a service class of userService, which contains 2 methods to operate the current user, getCurrenUser and setCurrenUser.
But these two methods either obtain token from request, or read information from session.
The leader told me that the service layer should not write request related code,

Is this reasonable?
I personally believe that the service layer should only focus on logic and should not be strongly dependent on certain environments. but. . . Where should I write a class that operates CurrenUser?

给我你的怀抱
给我你的怀抱

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!