(1) If you have found another one and are really in a hurry to leave now, explain to your boss why you need to leave and expect him to let you go. If the boss has been very kind to you, plus your emotional persuasion, you should be persuaded.
(2) If you think that the company and the boss have been very kind to you, you can go or not. It is better to take the opportunity to clearly put forward some standards of your own, such as salary increase and promotion. If the boss really wants to keep you, maybe he can agree.
In the second case, it means that the boss has a fever and a cold for your resignation. He didn't have a very good impression of you. This time, he deliberately played tricks to spite you.
In this case, our advice is: gentlemen first, villains later.
The first gentleman's practice is to talk it over with the boss. If I have any "problems" with my boss, I will bow my head at this time. I hope the boss can cut you some slack and satisfy your kindness.
After the villain's approach, that is, when the gentleman's approach is ineffective, see if there is any direct evidence that can threaten the boss. If you can't find a friend's collection, use it to drive him to contribute.
In case these common tricks don't work, you have to leave at once. However, the adverse effects of this will lead to some complications, such as personal social security renewal. I don't know about your contract with your company, and it is very likely that you will be sued by your original company in the future.
If a notice of unilaterally dissolving the labor contract is sent to the unit 30 days in advance, even if the leading cadres of the unit are not allowed to sign, they can leave the original unit 30 days later. If the unit does not meet the relevant procedures, it can file a labor dispute lawsuit, or apply for social security supervision, requiring the unit to fulfill its legal obligations.