Rotate around a spline?

Is it possible to use a spline as the path/axis to rotate an object around so it creates a constant diameter spring shape but bendy for example?