Numerical research is conducted to investigate the effects of plasma boundary shape on the tearing mode triggering explosive bursts in toroidal tokamak plasmas. In this work, m/n = 2/1 mode is responsible for the triggering of the explosive burst. Plasma boundary shape can be adjusted via the adjustment of the parameters triangularity δ and elongation κ. The investigations are conducted both under low β (close to zero) and under finite β regimes. In the low β regime, triangularity and elongation both have stabilizing effect on the explosive burst and the stabilizing effect of elongation is stronger. Under a large elongation (κ = 2.0), the elongation effect can evidently enhance the stabilizing effect in a positive triangularity regime, but barely affects the stabilizing effect in a negative triangularity regime. In the finite β regime, the explosive burst is delayed in comparison with that in the low β regime. Similar to the low β cases, the effects of triangularity and elongation both are stabilizing. Under a large elongation (κ = 2.0), the elongation effect can evidently enhance the stabilizing effect on the explosive burst in a positive triangularity regime, but impair the stabilizing effect in a negative triangularity regime. The explosive burst disappears in the large triangularity case (δ = 0.5), indicating that the explosive burst can be effectively prevented in experiments via carefully adjusting plasma boundary shape. Moreover, strong magnetic stochasticity appears in the negative triangularity case during the nonlinear phase.