diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..384bb17 --- /dev/null +++ b/pom.xml @@ -0,0 +1,73 @@ + + 4.0.0 + + com.trhoanglee.expense + team-expense-manager + 0.0.1-SNAPSHOT + team-expense-manager + + + + org.springframework.boot + spring-boot-starter-parent + 1.4.1.RELEASE + + + + + org.springframework.boot + spring-boot-starter + + + org.springframework.boot + spring-boot-starter-data-jpa + + + + com.h2database + h2 + + + org.springframework.boot + spring-boot-starter-web + + + + org.hibernate + hibernate-core + + + org.hibernate + hibernate-validator + + + commons-fileupload + commons-fileupload + 1.3.2 + + + org.springframework.boot + spring-boot-starter-security + + + org.springframework.boot + spring-boot-starter-actuator + + + org.springframework.boot + spring-boot-starter-test + test + + + + UTF-8 + UTF-8 + 1.8 + ${project.version} + + diff --git a/src/main/java/com/trhoanglee/expense/Application.java b/src/main/java/com/trhoanglee/expense/Application.java new file mode 100644 index 0000000..cf1f655 --- /dev/null +++ b/src/main/java/com/trhoanglee/expense/Application.java @@ -0,0 +1,24 @@ +package com.trhoanglee.expense; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.EnableAutoConfiguration; +import org.springframework.context.ApplicationContext; +import org.springframework.context.annotation.ComponentScan; + +/** + * @author hoangtle + */ +@ComponentScan +@EnableAutoConfiguration +public class Application { + private static final Logger LOG = LoggerFactory.getLogger(Application.class.getCanonicalName()); + public static void main(String... args) { + ApplicationContext appContext = SpringApplication.run(Application.class, args); + + MemberService memberService = appContext.getBean(MemberService.class); + LOG.info(memberService.ping()); + SpringApplication.exit(appContext); + } +} diff --git a/src/main/java/com/trhoanglee/expense/MemberService.java b/src/main/java/com/trhoanglee/expense/MemberService.java new file mode 100644 index 0000000..4316dcd --- /dev/null +++ b/src/main/java/com/trhoanglee/expense/MemberService.java @@ -0,0 +1,10 @@ +package com.trhoanglee.expense; + +import org.springframework.stereotype.Service; + +@Service +public class MemberService { + public String ping() { + return "pong"; + } +} diff --git a/src/test/java/com/trhoanglee/expense/ApplicationTest.java b/src/test/java/com/trhoanglee/expense/ApplicationTest.java new file mode 100644 index 0000000..65d1f48 --- /dev/null +++ b/src/test/java/com/trhoanglee/expense/ApplicationTest.java @@ -0,0 +1,19 @@ +package com.trhoanglee.expense; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +public class ApplicationTest extends TestCase { + public ApplicationTest(String testName) { + super(testName); + } + + public static Test suite() { + return new TestSuite(ApplicationTest.class); + } + + public void testApp() { + assertTrue(true); + } +}