Skip to content

Commit 996ccc4

Browse files
author
Juraj Veverka
committed
springboot demo created
1 parent 9384a01 commit 996ccc4

File tree

7 files changed

+102
-0
lines changed

7 files changed

+102
-0
lines changed

spring/springboot/.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
.gradle
2+
/build/
3+
/out/
4+
!gradle/wrapper/gradle-wrapper.jar
5+
6+
### STS ###
7+
.apt_generated
8+
.classpath
9+
.factorypath
10+
.project
11+
.settings
12+
.springBeans
13+
.sts4-cache
14+
15+
### IntelliJ IDEA ###
16+
.idea
17+
*.iws
18+
*.iml
19+
*.ipr
20+
/out/
21+
22+
### NetBeans ###
23+
/nbproject/private/
24+
/nbbuild/
25+
/dist/
26+
/nbdist/
27+
/.nb-gradle/

spring/springboot/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Simple Spring Boot 2.0 demo
2+
3+
### Build and run
4+
```
5+
gradle clean build
6+
java -jar build/libs/demo-0.0.1-SNAPSHOT.jar
7+
```

spring/springboot/build.gradle

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
buildscript {
2+
ext {
3+
springBootVersion = '2.1.0.M2'
4+
}
5+
repositories {
6+
mavenCentral()
7+
maven { url "https://repo.spring.io/snapshot" }
8+
maven { url "https://repo.spring.io/milestone" }
9+
}
10+
dependencies {
11+
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
12+
}
13+
}
14+
15+
apply plugin: 'java'
16+
apply plugin: 'eclipse'
17+
//apply plugin: 'application'
18+
apply plugin: 'org.springframework.boot'
19+
apply plugin: 'io.spring.dependency-management'
20+
21+
group = 'itx.examples.springboot'
22+
version = '0.0.1-SNAPSHOT'
23+
24+
//mainClassName = 'itx.examples.springboot.demo.DemoApplication'
25+
26+
sourceCompatibility = 10
27+
targetCompatibility = 10
28+
29+
repositories {
30+
mavenCentral()
31+
maven { url "https://repo.spring.io/snapshot" }
32+
maven { url "https://repo.spring.io/milestone" }
33+
}
34+
35+
36+
dependencies {
37+
compile('org.springframework.boot:spring-boot-starter-web')
38+
testCompile('org.springframework.boot:spring-boot-starter-test')
39+
}

spring/springboot/settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rootProject.name = 'demo'
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package itx.examples.springboot.demo;
2+
3+
import org.springframework.boot.SpringApplication;
4+
import org.springframework.boot.autoconfigure.SpringBootApplication;
5+
6+
@SpringBootApplication
7+
public class DemoApplication {
8+
9+
public static void main(String[] args) {
10+
SpringApplication.run(DemoApplication.class, args);
11+
}
12+
}

spring/springboot/src/main/resources/application.properties

Whitespace-only changes.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package itx.examples.springboot.demo;
2+
3+
import org.junit.Test;
4+
import org.junit.runner.RunWith;
5+
import org.springframework.boot.test.context.SpringBootTest;
6+
import org.springframework.test.context.junit4.SpringRunner;
7+
8+
@RunWith(SpringRunner.class)
9+
@SpringBootTest
10+
public class DemoApplicationTests {
11+
12+
@Test
13+
public void contextLoads() {
14+
}
15+
16+
}

0 commit comments

Comments
 (0)