Advertisement
Guest User

Untitled

a guest
Jul 4th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. <dependencies>
  2. <dependency>
  3. <groupId>org.springframework.boot</groupId>
  4. <artifactId>spring-boot-starter-data-jpa</artifactId>
  5. </dependency>
  6. <dependency>
  7. <groupId>org.springframework.boot</groupId>
  8. <artifactId>spring-boot-starter-web</artifactId>
  9. </dependency>
  10. <dependency>
  11. <groupId>mysql</groupId>
  12. <artifactId>mysql-connector-java</artifactId>
  13. </dependency>
  14.  
  15. <dependency>
  16. <groupId>org.springframework.boot</groupId>
  17. <artifactId>spring-boot-starter-test</artifactId>
  18. <scope>test</scope>
  19. </dependency>
  20. </dependencies>
  21.  
  22. spring.datasource.url = jdbc:mysql://localhost:3306/springboot
  23. spring.datasource.username =
  24. spring.datasource.password =
  25.  
  26. spring.jpa.show-sql = true
  27.  
  28. spring.jpa.hibernate.ddl-auto = update
  29.  
  30. spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQLDialect
  31.  
  32. package com.manoj.springdata;
  33.  
  34. import org.springframework.boot.SpringApplication;
  35. import org.springframework.boot.autoconfigure.SpringBootApplication;
  36.  
  37. @SpringBootApplication
  38. public class CourseApiDataApplication {
  39.  
  40. public static void main(String[] args) {
  41. SpringApplication.run(CourseApiDataApplication.class, args);
  42. }
  43. }
  44.  
  45. @Entity
  46. public class TheVo{
  47.  
  48. @Id
  49. private String id;
  50. private String name;
  51. private String description;
  52.  
  53. public TheVo() {
  54.  
  55. }
  56.  
  57. public TheVo(String id, String name, String description) {
  58. this.id = id;
  59. this.name = name;
  60. this.description = description;
  61. }
  62. //setter and getter
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement