File tree Expand file tree Collapse file tree 7 files changed +102
-0
lines changed
java/itx/examples/springboot/demo
test/java/itx/examples/springboot/demo Expand file tree Collapse file tree 7 files changed +102
-0
lines changed Original file line number Diff line number Diff line change 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 /
Original file line number Diff line number Diff line change 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+ ```
Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 1+ rootProject. name = ' demo'
Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments