They are made both ways. Some springs just wrap around the inside of their tube and others are soldered to a wire.
I would say if you have a wire then solder it. I have a bunch that I screw to the end cap. And I have one that I used as you say by just setting the spring in. However, you must have one heck of a low resistance atty or some very small spring.