我用spring + hibernate创建了一个应用程序,但我总是遇到这个错误.这是我第一次使用hibernate的应用程序,我读了一些指南,但我无法解决这个问题.我哪里做错了?
这是我的应用程序的代码
ott 05, 2014 4:03:06 PM org.springframework.context.support.ClassPathXmlApplicationContext prepareRefresh
Informazioni: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@1eab16b: startup date [Sun Oct 05 16:03:06 CEST 2014]; root of context hierarchy
ott 05, 2014 4:03:06 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
Informazioni: Loading XML bean definitions from class path resource [springConfig.xml]
ott 05, 2014 4:03:08 PM org.hibernate.annotations.common.reflection.java.JavaReflectionManager <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.5.Final}
ott 05, 2014 4:03:08 PM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.3.6.Final}
ott 05, 2014 4:03:08 PM org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found …Run Code Online (Sandbox Code Playgroud) @SessionAttributes和HttpSession有什么区别?这两个中的哪一个在会话中保留更长时间的对象?在哪些情况下,我必须使用一个,在另一个情况下?
谢谢
如何通过JSP和JSTL实现这一点?
int total = 0;
for (Article article : list) {
total += article.price;
}
Run Code Online (Sandbox Code Playgroud) 我将Glassfish服务器从4.0更新到4.1但现在如果我在Netbeans 7.3中添加它,我有"不是有效的GlassFish Server安装".Netbeans没有找到Glassfish.如何在不安装Glassfish 8.0.1的情况下解决?
如果我使用Spring,这两种方法哪个更正确。即使我使用了双亲注入,我也可以使用 new() 运算符吗?我可以混合使用两者吗?我想对这些概念做一些澄清。谢谢
第一种方法:
@RequestMapping(method=RequestMethod.GET)
public String create(Model model){
model.addAttribute(new User());
return "index";
}
Run Code Online (Sandbox Code Playgroud)
第二种方法:
@Autowired
User user;
@RequestMapping(method=RequestMethod.GET)
public String create(Model model){
model.addAttribute(user);
return "index";
}
Run Code Online (Sandbox Code Playgroud) Lookup 方法注入Provider<T>、ObjectFactory和factoryBean. 如果我想要将原型的新实例(多次)转换为单例,那么哪一个是最佳解决方案?如果我想要将原型 bean 的新实例(多次)转换为原型?
我想将输入标记的值作为参数(quantita)传递给href.我应该用javascript来做这件事吗?抱歉,我的英文谢谢
<input type="text" id="qta_field" value="${item.value}"/><a href="updateItem?codice=${item.key.codice}&quantita=">update</a>
Run Code Online (Sandbox Code Playgroud)

如何将图像与文本对齐?

<fieldset>
<legend>
<img src="http://www.placehold.it/50" width="50" height="50" />
<label id="dettagli_ordine">Dettagli Ordine N° ${numero_ordine}</label>
</legend>
</fieldset>Run Code Online (Sandbox Code Playgroud)
我下载了Eclipse Luna,我想安装spring的插件有什么区别:Spring IDE插件和Spring工具套件插件?我应该下载哪一个?
Eclipse + Spring Tool套件插件= Spring Tool Suite发布?
我使用Eclipse Luna创建了一个简单的Spring MVC项目,但是如果我在springConfig-servlet.xml中添加mvc:resources,它就无法工作.我在Tomcat中有这个错误:
PM org.springframework.web.servlet.PageNotFound noHandlerFound
Avvertenza: No mapping found for HTTP request with URI [/SpringStore/] in DispatcherServlet with name 'springConfig'
Run Code Online (Sandbox Code Playgroud)
我哪里做错了?谢谢
这是我项目的结构

Web.xml代码
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>SpringStore</display-name>
<servlet>
<servlet-name>springConfig</servlet-name>
<servlet-class> org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>springConfig</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
</web-app>
Run Code Online (Sandbox Code Playgroud)
springConfig-Servlet代码:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.1.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.1.xsd">
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsp/"/>
<property name="suffix" value=".jsp"/>
</bean>
<context:component-scan base-package="controller"/>
<mvc:resources mapping="/resources/**" location="/resources/"/>
</beans>
Run Code Online (Sandbox Code Playgroud)
HomeController.java …
spring ×6
spring-mvc ×5
java-ee ×3
html ×2
css ×1
eclipse ×1
foreach ×1
glassfish-3 ×1
glassfish-4 ×1
hibernate ×1
jakarta-ee ×1
javascript ×1
jsp ×1
jstl ×1
netbeans ×1
netbeans-7 ×1
spring-orm ×1
sum ×1