Spring MVC 3.0.5 with Hibernate and Maven project

I’ve just started trying to piece together a Spring MVC project with Hibernate and Maven in Eclipse. So far it has been VERY frustrating as Eclipse wasn’t publishing the app with the lib files. That took over an hour of my time up and I haven’t yet managed to get it to run. I will update the following when I finally get it working, but here are the basics of what I have so far Ok, I’ve got it working finally. Turns out there are some unusual settings files that contain relevant paths for web app deployment. The following have been updated and should work:

MyObject.java

package uk.co.vsf.MyApp.database.beans;

import javax.persistence.Entity;
import javax.persistence.Id;

@Entity
public class MyObject
{
	@Id
	private Integer myId;

	public MyObject(Integer myId)
	{
		this.myId = myId;
	}

	public void setMyId(Integer myId)
	{
		this.myId = myId;
	}

	public Integer getMyId()
	{
		return myId;
	}
}

Continue reading “Spring MVC 3.0.5 with Hibernate and Maven project”