Spaces:
Sleeping
Sleeping
Taki Eddine RAHAL
commited on
Commit
·
0533164
1
Parent(s):
981ec19
Add project
Browse files
README.md
CHANGED
@@ -55,11 +55,17 @@
|
|
55 |
|
56 |
|
57 |
## Create Postegres database from Render.com
|
58 |
-
https://dashboard.render.com/
|
59 |
|
60 |
|
61 |
### Modify connections params on application.properties
|
62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
spring.datasource.url=jdbc:postgresql://dpg-{custom-url}.render.com:5432/{name_database}
|
64 |
spring.datasource.username=your_username
|
65 |
spring.datasource.password=your_passeword
|
|
|
55 |
|
56 |
|
57 |
## Create Postegres database from Render.com
|
58 |
+
https://dashboard.render.com/
|
59 |
|
60 |
|
61 |
### Modify connections params on application.properties
|
62 |
|
63 |
+
server.tomcat.accesslog.enabled=true
|
64 |
+
|
65 |
+
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect
|
66 |
+
spring.jpa.hibernate.ddl-auto=update
|
67 |
+
spring.jpa.hibernate.show-sql=true
|
68 |
+
|
69 |
spring.datasource.url=jdbc:postgresql://dpg-{custom-url}.render.com:5432/{name_database}
|
70 |
spring.datasource.username=your_username
|
71 |
spring.datasource.password=your_passeword
|
src/main/java/com/example/demo/DemoApplication.java
CHANGED
@@ -1,16 +1,7 @@
|
|
1 |
package com.example.demo;
|
2 |
|
3 |
-
import com.example.demo.entity.User;
|
4 |
-
import com.example.demo.repository.UserRepository;
|
5 |
-
import org.springframework.beans.factory.annotation.Autowired;
|
6 |
-
import org.springframework.boot.CommandLineRunner;
|
7 |
import org.springframework.boot.SpringApplication;
|
8 |
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
9 |
-
import org.springframework.web.bind.annotation.GetMapping;
|
10 |
-
import org.springframework.web.bind.annotation.RestController;
|
11 |
-
|
12 |
-
import java.util.List;
|
13 |
-
import java.util.Optional;
|
14 |
|
15 |
@SpringBootApplication
|
16 |
public class DemoApplication {
|
|
|
1 |
package com.example.demo;
|
2 |
|
|
|
|
|
|
|
|
|
3 |
import org.springframework.boot.SpringApplication;
|
4 |
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
@SpringBootApplication
|
7 |
public class DemoApplication {
|
src/main/java/com/example/demo/entity/User.java
CHANGED
@@ -3,8 +3,6 @@ package com.example.demo.entity;
|
|
3 |
import javax.persistence.*;
|
4 |
import java.io.Serializable;
|
5 |
|
6 |
-
@Entity
|
7 |
-
@Table(name = "users")
|
8 |
public class User implements Serializable {
|
9 |
|
10 |
@Id
|
|
|
3 |
import javax.persistence.*;
|
4 |
import java.io.Serializable;
|
5 |
|
|
|
|
|
6 |
public class User implements Serializable {
|
7 |
|
8 |
@Id
|
src/main/java/com/example/demo/repository/UserRepository.java
CHANGED
@@ -1,9 +1,4 @@
|
|
1 |
package com.example.demo.repository;
|
2 |
|
3 |
-
|
4 |
-
import org.springframework.data.jpa.repository.JpaRepository;
|
5 |
-
import org.springframework.stereotype.Repository;
|
6 |
-
|
7 |
-
@Repository
|
8 |
-
public interface UserRepository extends JpaRepository<User, Long> {
|
9 |
}
|
|
|
1 |
package com.example.demo.repository;
|
2 |
|
3 |
+
public interface UserRepository{
|
|
|
|
|
|
|
|
|
|
|
4 |
}
|