带有 MySql 和 Maven 的 Spring Data JPA 简单 Web 示例
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16585903/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Spring Data JPA simple web Example with MySql and Maven
提问by user1111880
I am very new to JPA and Spring, so can you people give me a link or any working code of Spring Data JPA with MVC integration which have used Mysql and Maven.
我对 JPA 和 Spring 很陌生,所以你们可以给我一个链接或任何使用 Mysql 和 Maven 的带有 MVC 集成的 Spring Data JPA 的工作代码。
采纳答案by Meriton Husaj
I think what you're looking for is SpringMVC(controller?) on top of what you asked, as you commented on Mustafa's answer:
我认为您正在寻找的是 SpringMVC(controller?) 在您提出的问题之上,正如您对 Mustafa 的回答所做的评论:
this is console based example, whereas I am looking for simple web based
这是基于控制台的示例,而我正在寻找基于 Web 的简单示例
This example might help you for Spring Data JPA:
这个例子可能对你的 Spring Data JPA 有帮助:
Or this for Spring MVC:
或者这对于 Spring MVC:
http://www.journaldev.com/3531/spring-mvc-hibernate-mysql-integration-crud-example-tutorial
http://www.journaldev.com/3531/spring-mvc-hibernate-mysql-integration-crud-example-tutorial
回答by Mustafa Gen?
You can easily find hundreds of example. Here you can find a blogpost : http://hop2croft.wordpress.com/2011/07/06/jpa-basic-example-with-entitymanager-spring-and-maven/
您可以轻松找到数百个示例。在这里你可以找到一篇博文:http: //hop2croft.wordpress.com/2011/07/06/jpa-basic-example-with-entitymanager-spring-and-maven/

