Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem that individual fields can not be found in the returned data from the SSM Mapper file?

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article will explain in detail how to solve the problem that the returned data from the SSM Mapper file can not find individual fields. The editor thinks it is very practical, so I share it for you to do a reference. I hope you can get something after reading this article.

SSM Mapper query finds out the reason why individual fields cannot be found in the returned data.

Hump naming rule is enabled. The fields in Bean are not recognized.

Comment out or remove the field in the entity class from transposition capitalization

SSM cannot query database data

These two days set up a ssm environment, want to test first, the result of the test will be a problem, the same sql can be executed normally in navicate, not in mapper, it will always be null.

Finally found the reason.

The column names of my database tables are all underlined, and I need to turn on automatic hump naming rule (camel case) mapping in mybatis-config.xml, which is a similar mapping from the classic database column name A_COLUMN to the classic Java attribute name aColumn.

On "how to solve the SSM Mapper file query returned data can not find individual fields of the problem" this article is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge, if you think the article is good, please share it out for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report