-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGestionCommercialeApplication.java
More file actions
47 lines (37 loc) · 1.13 KB
/
GestionCommercialeApplication.java
File metadata and controls
47 lines (37 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package com.gc;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import com.gc.dao.ClientRepository;
import com.gc.dao.ClientRepositoryCustom;
import com.gc.entities.CategorieClient;
import com.gc.entities.Client;
/**
* @author mkonzali
* 20-07-2018
*/
@SpringBootApplication
public class GestionCommercialeApplication implements CommandLineRunner {
@Autowired
private ClientRepository cr;
@Autowired
private ClientRepositoryCustom crc;
public static void main(String[] args) {
SpringApplication.run(GestionCommercialeApplication.class, args);
}
@Override
public void run(String... args) throws Exception {
// Client c = new Client();
// c.setAdresse_client("ahmes jsnsuy ushnu");
// c.setNom_client("sancf");
// c.setTel_client("91453322");
// c.setVille("Paris");
// CategorieClient cat = crc.getCateg(2);
// c.setCategorieClient(cat);
// cr.save(c);
cr.findAll().forEach(cl->{
System.out.println(cl.getNom_client());
});
}
}