[spring] fix wrong refactor
also added resource for tests