Skip to content

Commit

Permalink
correção autoincrement
Browse files Browse the repository at this point in the history
  • Loading branch information
caiobrreis committed May 9, 2019
1 parent d95efae commit e8740b6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ public class Poda {


@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="course_seq")
@SequenceGenerator(
name="course_seq",
sequenceName="course_sequence",
allocationSize=1
)
@Column(name="poda_id")
private int id;

Expand Down
5 changes: 2 additions & 3 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
spring.datasource.url = jdbc:mysql://aa1ffi1qo19jzir.can2hgy8vy8r.us-east-2.rds.amazonaws.com/inciclo_main

spring.jpa.hibernate.ddl-auto=update
spring.datasource.username = sysadmin
spring.datasource.password = risoflora
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
server.port=8082
spring.datasource.driver-class-name=com.mysql.jdbc.Driver

0 comments on commit e8740b6

Please sign in to comment.