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 easily configure iBatis.net

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article introduces you how to easily configure iBatis.net, the content is very detailed, interested friends can refer to, hope to be helpful to you.

Two days ago, I wanted to use ibatis.net to do a project, but it didn't have to be so complicated, because the project time was very short, but I couldn't escape my curiosity and used you while I was learning. After downloading DataMapper 1.6.1 and DataAccess 1.9.1, I feel that this framework is really good and powerful.

As soon as I started configuring ibatis.net, it took me a whole day to configure the environment. I wrote down the problems and precautions I encountered in configuring ibatis.net this time, so as to avoid friends from making similar shocking mistakes.

1. Configure iBatis.net

two。 If you download NPetShop or NPetShop2 code, or refer to some of your friends' previous configuration files for iBatis.net, note that the configuration files used in these projects or articles are likely to be obsolete and not suitable for ibatis.net version 1.3 or above. Be sure to configure it in the way iBatis.net is configured in the official documentation. Keep in mind that the root of everything that cannot be run may not lie in your code, but in that the configuration file is not configured. Pay particular attention to the header information of each configuration file, especially xmlns and xmlns:xsi, and be sure to check it against the official documentation.

3. Be sure to refer to the Castle.DynamicProxy class library correctly, which is the key and is described in detail in the official documentation.

4. When you encounter this error prompt that ibatis.net This SQL map does not contain a MappedStatement named is often caused by not loading SqlMap.config, the easiest way to verify is to change the configuration of url in SqlMap.config to a non-existent .xml file. At this time, you will definitely report an error and cannot find the file after starting the project.

5. If you report System.NullReferenceException: an error that the object reference is not set to the instance of the object, that is:

Line 35: DomDaoManagerBuilder builder = new DomDaoManagerBuilder ()

Line 36: builder.ConfigureAndWatch ("dao.config", handler)

Generally speaking, there is no correct reference to the Castle.DynamicProxy class library.

On how to easily configure iBatis.net to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it 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