atjiu / pybbs

更实用的Java开发的社区(论坛),Better use of Java development community (forum)
GNU Affero General Public License v3.0
1.84k stars 706 forks source link

在IDEA里启动,首次启动正常,Stop后重新运行卡住 #152

Closed chinamcafee closed 3 years ago

chinamcafee commented 3 years ago

首次运行正常,再次运行时,控制台打印到如下Log后就再无反应,服务也无法启动: 2021-06-22 20:56:41 [restartedMain] INFO c.y.p.PybbsApplication - Starting PybbsApplication using Java 11.0.9.1 on iMac.local with PID 70590 (/Users/linker21/IdeaProjects/pybbs/target/classes started by linker21 in /Users/linker21/IdeaProjects/pybbs) 2021-06-22 20:56:41 [restartedMain] INFO c.y.p.PybbsApplication - The following profiles are active: dev 2021-06-22 20:56:41 [restartedMain] INFO o.s.b.d.r.ChangeableUrls - The Class-Path manifest attribute in /Users/linker21/.m2/repository/com/sun/xml/bind/jaxb-impl/2.1/jaxb-impl-2.1.jar referenced one or more files that do not exist: file:/Users/linker21/.m2/repository/com/sun/xml/bind/jaxb-impl/2.1/jaxb-api.jar,file:/Users/linker21/.m2/repository/com/sun/xml/bind/jaxb-impl/2.1/activation.jar,file:/Users/linker21/.m2/repository/com/sun/xml/bind/jaxb-impl/2.1/jsr173_1.0_api.jar,file:/Users/linker21/.m2/repository/com/sun/xml/bind/jaxb-impl/2.1/jaxb1-impl.jar 2021-06-22 20:56:41 [restartedMain] INFO o.s.b.d.e.DevToolsPropertyDefaultsPostProcessor - Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable 2021-06-22 20:56:41 [restartedMain] INFO o.s.b.d.e.DevToolsPropertyDefaultsPostProcessor - For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG' 2021-06-22 20:56:41 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'mybatisPlusConfig' of type [co.yiiu.pybbs.config.MybatisPlusConfig$$EnhancerBySpringCGLIB$$90295bd5] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

请问会是什么原因?

chinamcafee commented 3 years ago

发现是Web容器关闭的时候没有释放数据库锁,具体原因还需要再看一下,但如果在profile里加入优雅停服配置,可以解决上面的问题: server: shutdown: graceful.

atjiu commented 3 years ago

感谢反馈,这问题我貌似没有碰到过,再观望一下吧.

另外你给的配置好像是2.3里新增的,pybbs的springboot版本是2.2.2,还没有这个配置