i have a old code that needs to be converted to stateless service using springframeowrk

problem : the old code has a setter and getter for user object and this user object is used by all the function in the service code

how do i convert this internal state (user object) to external state, so that it is stateless and singleton service