The time when the orm mapping defined by hbm.xml in SSH occurs

SSH will use org.springframework.orm.hibernate3.LocalSessionFactoryBean, that is, use the spring framework to deal with the hibernate problem (in fact, struts is also managed by spring), so the loading time of the spring environment is the orm mapping time, which is generated according to the entity class Corresponding data sheet time. The loading of the spring environment is managed by tomcat. Because the listener is configured in web.xml: <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  </listener>, that is, when tomcat starts, the spring environment will be loaded, so that according to The spring configuration file applicationContext.xml creates related classes (instantiates action classes, etc., orm mapping also occurs at this time, and tables are created in the database).

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326407629&siteId=291194637