The missiles can only be stopped by resolving the conflict.
People have this mistaken idea that there's a military solution to everything. There isn't. Insurgencies are almost never defeated by military means (and when they are, it's only with an accompanying tremendous loss of civilian lives, as in Chechnya).
Didn't Israel engage in strikes before to stop the missiles? And yet here we are. And no doubt, if nothing is done to resolve the conflict, we will be here again.
Israel will never be truly safe until it reaches a political settlement. THAT is where all the effort should be directed, not futile military tactics that only prolong the agony.
You can't possibly think that just because Israel withdrew from Gaza, that the Gazans have no grievances. They are stateless, they have no rights, they are trapped in a tiny and impoverished territory, they are suffering hugely.
I know you will say, That's Hamas' fault! But it takes two to tango. Hamas cannot unilaterally declare peace. This has to be a joint process and Israel is not doing anything in that regard either.