Skip to content

Commit 6ef25be

Browse files
author
Trung Nguyen
committed
initial commit
1 parent a73e733 commit 6ef25be

File tree

119 files changed

+5537
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+5537
-0
lines changed

etc/contacts.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
001|David|David Byrne|Project Manager|[email protected]|123 456 7890|dbyrne90
2+
002|John|John Smith|Business Analyst|[email protected]|123 456 7891|jsmith91
3+
003|Diana|Diana Lopez|Software Architect|[email protected]|123 456 7892|dlopez92
4+
004|Sarah|Sarah Leggett|Software Engineer|[email protected]|123 456 7893|sleggett93
5+
005|Carol|Carol Ling|Senior Software Engineer|[email protected]|123 456 7894|cling94
6+
006|Pete|Petter Brown|Quality Analyst|[email protected]|123 456 7895|pbrown95

etc/photos/001.png

38.2 KB
Loading

etc/photos/002.png

36.4 KB
Loading

etc/photos/003.png

41.6 KB
Loading

etc/photos/004.png

43.2 KB
Loading

etc/photos/005.png

41.5 KB
Loading

etc/photos/006.png

41.8 KB
Loading

etc/photos/contact-photo.png

2.81 KB
Loading

pom.xml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<groupId>com.kms.contact</groupId>
6+
<artifactId>contact-sbs</artifactId>
7+
<version>0.0.1-SNAPSHOT</version>
8+
<!-- uncomment for WAR deployment
9+
<packaging>war</packaging>
10+
-->
11+
12+
<parent>
13+
<groupId>org.springframework.boot</groupId>
14+
<artifactId>spring-boot-starter-parent</artifactId>
15+
<version>1.0.2.RELEASE</version>
16+
</parent>
17+
18+
<dependencies>
19+
<dependency>
20+
<groupId>org.springframework.boot</groupId>
21+
<artifactId>spring-boot-starter</artifactId>
22+
</dependency>
23+
<dependency>
24+
<groupId>org.springframework.boot</groupId>
25+
<artifactId>spring-boot-starter-data-jpa</artifactId>
26+
</dependency>
27+
<dependency>
28+
<groupId>com.h2database</groupId>
29+
<artifactId>h2</artifactId>
30+
</dependency>
31+
<dependency>
32+
<groupId>org.springframework.boot</groupId>
33+
<artifactId>spring-boot-starter-web</artifactId>
34+
</dependency>
35+
<!-- uncomment for WAR deployment
36+
<dependency>
37+
<groupId>org.springframework.boot</groupId>
38+
<artifactId>spring-boot-starter-tomcat</artifactId>
39+
<scope>provided</scope>
40+
</dependency>
41+
-->
42+
<dependency>
43+
<groupId>org.hibernate</groupId>
44+
<artifactId>hibernate-validator</artifactId>
45+
</dependency>
46+
<dependency>
47+
<groupId>commons-fileupload</groupId>
48+
<artifactId>commons-fileupload</artifactId>
49+
<version>1.3.1</version>
50+
</dependency>
51+
<dependency>
52+
<groupId>org.springframework.boot</groupId>
53+
<artifactId>spring-boot-starter-security</artifactId>
54+
</dependency>
55+
<dependency>
56+
<groupId>org.springframework.boot</groupId>
57+
<artifactId>spring-boot-starter-actuator</artifactId>
58+
</dependency>
59+
<dependency>
60+
<groupId>org.springframework.boot</groupId>
61+
<artifactId>spring-boot-starter-remote-shell</artifactId>
62+
</dependency>
63+
64+
<dependency>
65+
<groupId>org.springframework.boot</groupId>
66+
<artifactId>spring-boot-starter-test</artifactId>
67+
<scope>test</scope>
68+
</dependency>
69+
</dependencies>
70+
71+
<build>
72+
<finalName>contact</finalName>
73+
<plugins>
74+
<plugin>
75+
<groupId>org.springframework.boot</groupId>
76+
<artifactId>spring-boot-maven-plugin</artifactId>
77+
</plugin>
78+
</plugins>
79+
</build>
80+
81+
<properties>
82+
<start-class>com.kms.contact.Application</start-class>
83+
<java.version>1.8</java.version>
84+
</properties>
85+
</project>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Copyright (c) 2014 KMS Technology, Inc.
2+
package com.kms.contact;
3+
4+
import java.io.IOException;
5+
6+
import org.springframework.boot.SpringApplication;
7+
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
8+
import org.springframework.boot.builder.SpringApplicationBuilder;
9+
import org.springframework.boot.context.web.SpringBootServletInitializer;
10+
import org.springframework.context.ApplicationContext;
11+
import org.springframework.context.annotation.ComponentScan;
12+
import org.springframework.transaction.annotation.EnableTransactionManagement;
13+
14+
import com.kms.contact.service.ContactService;
15+
16+
/**
17+
* @author trungnguyen
18+
*/
19+
@ComponentScan
20+
@EnableAutoConfiguration
21+
@EnableTransactionManagement
22+
public class Application extends SpringBootServletInitializer {
23+
@Override
24+
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
25+
return application.sources(Application.class);
26+
}
27+
28+
public static void main(String... args) throws IOException {
29+
ApplicationContext appContext = SpringApplication.run(Application.class, args);
30+
31+
ContactService contactService = appContext.getBean(ContactService.class);
32+
String filePath = (args.length > 0)? args[0] : "etc/contacts.txt";
33+
contactService.loadContacts(filePath);
34+
}
35+
}

0 commit comments

Comments
 (0)