老师的方法过期了
if(sessionFactory==null){
Configuration config=new Configuration().configure();
ServiceRegistry serviceRegistry = (ServiceRegistry) new StandardServiceRegistryBuilder().configure().build();
sessionFactory = config.buildSessionFactory(serviceRegistry);
return sessionFactory;
if(sessionFactory==null){
Configuration config=new Configuration().configure();
ServiceRegistry serviceRegistry = (ServiceRegistry) new StandardServiceRegistryBuilder().configure().build();
sessionFactory = config.buildSessionFactory(serviceRegistry);
return sessionFactory;
2017-06-08
SchemaExport export = new SchemaExport(serviceRegistry, metadataImplementor);
export.create(true, true);
}
export.create(true, true);
}
报错了,后来发现是这方法过时了
public void testSchemaExport() {
ServiceRegistry serviceRegistry = (ServiceRegistry) new StandardServiceRegistryBuilder().configure().build();
MetadataImplementor metadataImplementor = (MetadataImplementor) new MetadataSources(serviceRegistry).buildMetadata();
public void testSchemaExport() {
ServiceRegistry serviceRegistry = (ServiceRegistry) new StandardServiceRegistryBuilder().configure().build();
MetadataImplementor metadataImplementor = (MetadataImplementor) new MetadataSources(serviceRegistry).buildMetadata();
最新回答 / 丶子非鱼
<result name="query_success">students/Students_query_success.jsp</result> 路劲不对 <result name="query_success">/students/Students_query_success.jsp</result>students包前面加一个斜杠
2017-06-07
这里我的建议是作为初学者最好是将所有的jar包拷贝到工程webroot下的webinf下的lib文件中,这样可能比较麻烦一点,属于笨办法,老师的属于在全局进行配置,所有工程都可以使用,我的这种只是对目前工程起作用,所使用的版本对于工程来说很重要,自己没有太多的经验,还是简单一些比较好
2017-06-07
这里无法显示主要有两个问题:
有可能Struts.xml上少了一个
<result name="input">/students/Students_query_success.jsp</result>
调整浏览器的页面的大小Chrome内核的需要100%以下
有可能Struts.xml上少了一个
<result name="input">/students/Students_query_success.jsp</result>
调整浏览器的页面的大小Chrome内核的需要100%以下
2017-06-07