Spaces:
Sleeping
Sleeping
Taki Eddine RAHAL
commited on
Commit
·
7f9bec3
1
Parent(s):
650b92a
Add project
Browse files
src/main/java/com/example/demo/DemoApplication.java
CHANGED
@@ -13,7 +13,7 @@ import java.util.List;
|
|
13 |
|
14 |
@SpringBootApplication
|
15 |
@RestController
|
16 |
-
public class DemoApplication
|
17 |
|
18 |
@Autowired
|
19 |
UserRepository userRepository;
|
@@ -22,13 +22,13 @@ public class DemoApplication implements CommandLineRunner {
|
|
22 |
SpringApplication.run(DemoApplication.class, args);
|
23 |
}
|
24 |
|
25 |
-
@Override
|
26 |
-
public void run(String... args) throws Exception {
|
27 |
-
User user = new User();
|
28 |
-
user.setFirstName("Rahal");
|
29 |
-
user.setLastName("Taki");
|
30 |
-
userRepository.save(user);
|
31 |
-
}
|
32 |
|
33 |
@GetMapping("test")
|
34 |
public String helloWorld(){
|
|
|
13 |
|
14 |
@SpringBootApplication
|
15 |
@RestController
|
16 |
+
public class DemoApplication {
|
17 |
|
18 |
@Autowired
|
19 |
UserRepository userRepository;
|
|
|
22 |
SpringApplication.run(DemoApplication.class, args);
|
23 |
}
|
24 |
|
25 |
+
// @Override
|
26 |
+
// public void run(String... args) throws Exception {
|
27 |
+
// User user = new User();
|
28 |
+
// user.setFirstName("Rahal");
|
29 |
+
// user.setLastName("Taki");
|
30 |
+
// userRepository.save(user);
|
31 |
+
// }
|
32 |
|
33 |
@GetMapping("test")
|
34 |
public String helloWorld(){
|
src/main/resources/application.properties
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
|
2 |
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect
|
3 |
spring.jpa.hibernate.ddl-auto=update
|
|
|
1 |
+
server.tomcat.accesslog.enabled=true
|
2 |
|
3 |
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect
|
4 |
spring.jpa.hibernate.ddl-auto=update
|