您的位置:首页 > 编程语言 > Java开发

springboot启动过程中数据库连接池初始化后直接关闭了

2018-11-17 23:08 295 查看

最近在项目中增加新功能模块时遇到这样的问题:项目加载完成后,在初始化数据库连接池时,连接池关闭了。

 

[code]Looking for resource handler mappings
Found resource handler mapping: URL pattern=,//**/favicon.ico^, locations:[class path resource [META-INF/resources/], class path resource [resources/], class path resource [static/], class path resource [public/], l Found resource handler mapping: URL pattern=,//webjars/**,/, locations:[class path resource [META-INF/resources/webjars/]], resolvers=[org.springframework, web.servlet, resource.PathResourceResolver@4e8afdad]
Found resource handler mapping: URL pattern:”/**”,locations:[class path resource [META-INF/resources/], class path resource [resources/], class path resource [static/], class path resource [public/], URL [file:E:/
Tomcat started on port(s): 8080 (http) with context path
Adding PropertySource * server, ports' with highest search precedence
Started SzinsApplication in 8.129 seconds (JVM running for 9.13)
{dataSource-l} inited
{dataSource-l} closed

 原因:参数类型写错了 parameterType写成了parameterMap

[code]<select id="getMenuLabelCode" parameterMap="java.lang.String" resultType="java.lang.String">
SELECT
t2.CODE
FROM dp_directory_split_sub tl
INNER JOIN dp_base_label t2
ON tl.ELE_ID = t2.ID
WHERE tl.SPLIT_ID = #{splitld, jdbcType=VARCHAR}
〈/select〉

 

阅读更多
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: