add method for spring