From d828e8d65803fe88849d20251d9719bfc5a162b3 Mon Sep 17 00:00:00 2001 From: nelson Date: Sun, 18 Aug 2019 15:24:45 +0800 Subject: [PATCH] init --- .gitignore | 32 +++++++++++++++++++ build.gradle | 20 ++++++++++++ settings.gradle | 1 + .../example/sbmongo/SbmongoApplication.java | 13 ++++++++ src/main/resources/application.yml | 2 ++ 5 files changed, 68 insertions(+) create mode 100644 .gitignore create mode 100644 build.gradle create mode 100644 settings.gradle create mode 100644 src/main/java/com/example/sbmongo/SbmongoApplication.java create mode 100644 src/main/resources/application.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6c01878 --- /dev/null +++ b/.gitignore @@ -0,0 +1,32 @@ +HELP.md +.gradle +build/ +!gradle/wrapper/gradle-wrapper.jar +!**/src/main/** +!**/src/test/** + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr +out/ + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ + +### VS Code ### +.vscode/ diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..6c31e8d --- /dev/null +++ b/build.gradle @@ -0,0 +1,20 @@ +plugins { + id 'org.springframework.boot' version '2.1.7.RELEASE' + id 'io.spring.dependency-management' version '1.0.7.RELEASE' + id 'java' +} + +group = 'com.example' +version = '0.0.1-SNAPSHOT' +sourceCompatibility = '1.8' + +repositories { + maven { url "http://maven.aliyun.com/nexus/content/groups/public/" } + maven { url "http://maven.aiprose.com/repository/maven-public/" } + mavenCentral() +} + +dependencies { + implementation 'org.springframework.boot:spring-boot-starter-data-mongodb' + implementation 'org.springframework.boot:spring-boot-starter-web' +} diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..f551f55 --- /dev/null +++ b/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'sbmongo' diff --git a/src/main/java/com/example/sbmongo/SbmongoApplication.java b/src/main/java/com/example/sbmongo/SbmongoApplication.java new file mode 100644 index 0000000..15ee0dc --- /dev/null +++ b/src/main/java/com/example/sbmongo/SbmongoApplication.java @@ -0,0 +1,13 @@ +package com.example.sbmongo; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class SbmongoApplication { + + public static void main(String[] args) { + SpringApplication.run(SbmongoApplication.class, args); + } + +} diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000..47fbb02 --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,2 @@ +server: + port: 8080 \ No newline at end of file