-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5dd1760
commit 7b45da3
Showing
26 changed files
with
242 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
eclipse.preferences.version=1 | ||
encoding//src/main/java=UTF-8 | ||
encoding//src/main/resources=UTF-8 | ||
encoding//src/test/java=UTF-8 | ||
encoding//src/test/resources=UTF-8 | ||
encoding/<project>=UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 | ||
org.eclipse.jdt.core.compiler.compliance=1.8 | ||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning | ||
org.eclipse.jdt.core.compiler.source=1.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<faceted-project> | ||
<installed facet="cloudfoundry.standalone.app" version="1.0"/> | ||
</faceted-project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
---------------------------------------------------------------- | ||
Wed Apr 25 22:23:49 CST 2018: | ||
Booting Derby version The Apache Software Foundation - Apache Derby - 10.13.1.1 - (1765088): instance a816c00e-0162-fd30-618b-00000ca12a28 | ||
---------------------------------------------------------------- | ||
Sun Apr 29 16:06:49 CST 2018: | ||
Booting Derby version The Apache Software Foundation - Apache Derby - 10.13.1.1 - (1765088): instance a816c00e-0163-1070-a9c7-00000923aa58 | ||
on database directory memory:D:\workspace\course-api\testdb with class loader sun.misc.Launcher$AppClassLoader@73d16e93 | ||
Loaded from file:/C:/Users/Admin/.m2/repository/org/apache/derby/derby/10.13.1.1/derby-10.13.1.1.jar | ||
Loaded from file:/C:/Users/Admin/.m2/repository/org/apache/derby/derby/10.13.1.1/derby-10.13.1.1.jar | ||
java.vendor=Oracle Corporation | ||
java.runtime.version=1.8.0_101-b13 | ||
user.dir=D:\workspace\course-api | ||
user.dir=D:\workspace\course-api | ||
os.name=Windows 10 | ||
os.arch=amd64 | ||
os.version=10.0 | ||
derby.system.home=null | ||
Database Class Loader started - derby.database.classpath='' | ||
os.version=10.0 | ||
derby.system.home=null | ||
Database Class Loader started - derby.database.classpath='' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,72 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>io.huangbaixun.springbootquickstart</groupId> | ||
<artifactId>course-api</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
<parent> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-parent</artifactId> | ||
<version>1.5.1.RELEASE</version> | ||
</parent> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-web</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-data-jpa</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-actuator</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.derby</groupId> | ||
<artifactId>derby</artifactId> | ||
<scope>runtime</scope> | ||
</dependency> | ||
</dependencies> | ||
<properties> | ||
<java.version>1.8</java.version> | ||
</properties> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>io.huangbaixun.springbootquickstart</groupId> | ||
<artifactId>course-api</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
<parent> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-parent</artifactId> | ||
<version>1.5.1.RELEASE</version> | ||
</parent> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-web</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-data-jpa</artifactId> | ||
</dependency> | ||
<!--dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-actuator</artifactId> | ||
</dependency--> | ||
<dependency> | ||
<groupId>org.apache.derby</groupId> | ||
<artifactId>derby</artifactId> | ||
<scope>runtime</scope> | ||
</dependency> | ||
</dependencies> | ||
<properties> | ||
<java.version>1.8</java.version> | ||
</properties> | ||
<build> | ||
<plugins> | ||
|
||
<plugin> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-maven-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
<configuration> | ||
<archive> | ||
<manifest> | ||
<mainClass>io.huangbaixun.springbootstarter.CourseApiApp</mainClass> | ||
</manifest> | ||
</archive> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>com.spotify</groupId> | ||
<artifactId>docker-maven-plugin</artifactId> | ||
<configuration> | ||
<imageName>io.huangbaixun.course-api</imageName> | ||
<baseImage>java:8</baseImage> | ||
<entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint> | ||
<!-- copy the service's jar file from target into the root directory | ||
of the image --> | ||
<resources> | ||
<resource> | ||
<targetPath>/</targetPath> | ||
<directory>${project.build.directory}</directory> | ||
<include>${project.build.finalName}.jar</include> | ||
</resource> | ||
</resources> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
41 changes: 27 additions & 14 deletions
41
src/main/java/io/huangbaixun/springbootstarter/hello/HelloController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,27 @@ | ||
package io.huangbaixun.springbootstarter.hello; | ||
|
||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@RestController | ||
public class HelloController { | ||
|
||
@RequestMapping("/hello") | ||
public String SayHi() | ||
{ | ||
return "Hi"; | ||
} | ||
} | ||
package io.huangbaixun.springbootstarter.hello; | ||
|
||
import java.net.InetAddress; | ||
import java.net.UnknownHostException; | ||
|
||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@RestController | ||
public class HelloController { | ||
|
||
@RequestMapping("/hello") | ||
public String SayHi() | ||
{ | ||
String ip =""; | ||
try { | ||
InetAddress addr = InetAddress.getLocalHost(); | ||
ip= addr.getHostAddress(); | ||
} catch (UnknownHostException e) { | ||
// TODO Auto-generated catch block | ||
e.printStackTrace(); | ||
} | ||
|
||
return "Hi from "+ip; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
server.port=80 | ||
debug = true | ||
# =============================== | ||
# = JPA / HIBERNATE | ||
# =============================== | ||
# Show or not log for each sql query | ||
spring.jpa.show-sql=true | ||
# Hibernate ddl auto (create, create-drop, update): with "create-drop" the database | ||
# schema will be automatically created afresh for every start of application | ||
spring.jpa.hibernate.ddl-auto=create-drop | ||
# Allows Hibernate to generate SQL optimized for a particular DBMS | ||
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.DerbyDialect | ||
server.port=80 | ||
# debug = true | ||
# =============================== | ||
# = JPA / HIBERNATE | ||
# =============================== | ||
# Show or not log for each sql query | ||
spring.jpa.show-sql=true | ||
# Hibernate ddl auto (create, create-drop, update): with "create-drop" the database | ||
# schema will be automatically created afresh for every start of application | ||
spring.jpa.hibernate.ddl-auto=create-drop | ||
# Allows Hibernate to generate SQL optimized for a particular DBMS | ||
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.DerbyDialect | ||
management.port=9090 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
Manifest-Version: 1.0 | ||
Implementation-Title: course-api | ||
Implementation-Version: 0.0.1-SNAPSHOT | ||
Built-By: Admin | ||
Implementation-Vendor-Id: io.huangbaixun.springbootquickstart | ||
Build-Jdk: 1.8.0_101 | ||
Implementation-URL: http://projects.spring.io/spring-boot/course-api/ | ||
Created-By: Maven Integration for Eclipse | ||
Implementation-Vendor: Pivotal Software, Inc. | ||
|
||
Manifest-Version: 1.0 | ||
Implementation-Title: course-api | ||
Implementation-Version: 0.0.1-SNAPSHOT | ||
Built-By: Admin | ||
Implementation-Vendor-Id: io.huangbaixun.springbootquickstart | ||
Build-Jdk: 1.8.0_101 | ||
Implementation-URL: http://projects.spring.io/spring-boot/course-api/ | ||
Created-By: Maven Integration for Eclipse | ||
Implementation-Vendor: Pivotal Software, Inc. | ||
Main-Class: io.huangbaixun.springbootstarter.CourseApiApp | ||
|
14 changes: 7 additions & 7 deletions
14
target/classes/META-INF/maven/io.huangbaixun.springbootquickstart/course-api/pom.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#Generated by Maven Integration for Eclipse | ||
#Wed Apr 25 22:19:13 CST 2018 | ||
version=0.0.1-SNAPSHOT | ||
groupId=io.huangbaixun.springbootquickstart | ||
m2e.projectName=course-api | ||
m2e.projectLocation=D\:\\workspace\\course-api | ||
artifactId=course-api | ||
#Generated by Maven Integration for Eclipse | ||
#Sun May 27 11:47:44 CST 2018 | ||
version=0.0.1-SNAPSHOT | ||
groupId=io.huangbaixun.springbootquickstart | ||
m2e.projectName=course-api | ||
m2e.projectLocation=D\:\\workspace\\course-api | ||
artifactId=course-api |
104 changes: 71 additions & 33 deletions
104
target/classes/META-INF/maven/io.huangbaixun.springbootquickstart/course-api/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,72 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>io.huangbaixun.springbootquickstart</groupId> | ||
<artifactId>course-api</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
<parent> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-parent</artifactId> | ||
<version>1.5.1.RELEASE</version> | ||
</parent> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-web</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-data-jpa</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-actuator</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.derby</groupId> | ||
<artifactId>derby</artifactId> | ||
<scope>runtime</scope> | ||
</dependency> | ||
</dependencies> | ||
<properties> | ||
<java.version>1.8</java.version> | ||
</properties> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>io.huangbaixun.springbootquickstart</groupId> | ||
<artifactId>course-api</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
<parent> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-parent</artifactId> | ||
<version>1.5.1.RELEASE</version> | ||
</parent> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-web</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-data-jpa</artifactId> | ||
</dependency> | ||
<!--dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-actuator</artifactId> | ||
</dependency--> | ||
<dependency> | ||
<groupId>org.apache.derby</groupId> | ||
<artifactId>derby</artifactId> | ||
<scope>runtime</scope> | ||
</dependency> | ||
</dependencies> | ||
<properties> | ||
<java.version>1.8</java.version> | ||
</properties> | ||
<build> | ||
<plugins> | ||
|
||
<plugin> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-maven-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
<configuration> | ||
<archive> | ||
<manifest> | ||
<mainClass>io.huangbaixun.springbootstarter.CourseApiApp</mainClass> | ||
</manifest> | ||
</archive> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>com.spotify</groupId> | ||
<artifactId>docker-maven-plugin</artifactId> | ||
<configuration> | ||
<imageName>io.huangbaixun.course-api</imageName> | ||
<baseImage>java:8</baseImage> | ||
<entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint> | ||
<!-- copy the service's jar file from target into the root directory | ||
of the image --> | ||
<resources> | ||
<resource> | ||
<targetPath>/</targetPath> | ||
<directory>${project.build.directory}</directory> | ||
<include>${project.build.finalName}.jar</include> | ||
</resource> | ||
</resources> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
server.port=80 | ||
debug = true | ||
# =============================== | ||
# = JPA / HIBERNATE | ||
# =============================== | ||
# Show or not log for each sql query | ||
spring.jpa.show-sql=true | ||
# Hibernate ddl auto (create, create-drop, update): with "create-drop" the database | ||
# schema will be automatically created afresh for every start of application | ||
spring.jpa.hibernate.ddl-auto=create-drop | ||
# Allows Hibernate to generate SQL optimized for a particular DBMS | ||
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.DerbyDialect | ||
server.port=80 | ||
# debug = true | ||
# =============================== | ||
# = JPA / HIBERNATE | ||
# =============================== | ||
# Show or not log for each sql query | ||
spring.jpa.show-sql=true | ||
# Hibernate ddl auto (create, create-drop, update): with "create-drop" the database | ||
# schema will be automatically created afresh for every start of application | ||
spring.jpa.hibernate.ddl-auto=create-drop | ||
# Allows Hibernate to generate SQL optimized for a particular DBMS | ||
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.DerbyDialect | ||
management.port=9090 |
Binary file modified
BIN
+0 Bytes
(100%)
target/classes/io/huangbaixun/springbootstarter/Course/Course.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
target/classes/io/huangbaixun/springbootstarter/Course/CourseController.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
target/classes/io/huangbaixun/springbootstarter/Course/CourseRepository.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
target/classes/io/huangbaixun/springbootstarter/Course/CourseService.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
target/classes/io/huangbaixun/springbootstarter/CourseApiApp.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
target/classes/io/huangbaixun/springbootstarter/Topic/Topic.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
target/classes/io/huangbaixun/springbootstarter/Topic/TopicController.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
target/classes/io/huangbaixun/springbootstarter/Topic/TopicRepository.class
Binary file not shown.
Binary file modified
BIN
-48 Bytes
(98%)
target/classes/io/huangbaixun/springbootstarter/Topic/TopicService.class
Binary file not shown.
Binary file modified
BIN
+582 Bytes
(190%)
target/classes/io/huangbaixun/springbootstarter/hello/HelloController.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM java:8 | ||
ADD /course-api-0.0.1-SNAPSHOT.jar // | ||
ENTRYPOINT ["java", "-jar", "/course-api-0.0.1-SNAPSHOT.jar"] |
Binary file not shown.
Oops, something went wrong.