SpringBoot 报 Invalid destruction signature 是因为 destroy-method 指定的方法在类中没有定义
SpringBoot 报 Invalid destruction signature 是因为用xml注入时 destroy-method 指定的方法在类中没有定义
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="LifeCycleTest2403110139" class="z24dec.msbtLifeCycle.LifeCycleTest2403110139"
init-method="initMethod"
destroy-method="destroyMethod"
>
</bean>
</beans>
注意 https://www.springframework.org/schema/beans/spring-beans.xsd" 是https 在老版中是 http , 新版是 https