-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
29 changed files
with
507 additions
and
160 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
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
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
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
17 changes: 16 additions & 1 deletion
17
.../java/com/jmsoftware/boot/mediastreamingsampleapp/MediaStreamingSampleAppApplication.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,19 +1,34 @@ | ||
package com.jmsoftware.boot.mediastreamingsampleapp; | ||
|
||
import lombok.extern.slf4j.Slf4j; | ||
import lombok.val; | ||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
|
||
import java.time.Duration; | ||
import java.time.Instant; | ||
import java.util.TimeZone; | ||
|
||
/** | ||
* Description: MediaStreamingSampleAppApplication, change description here. | ||
* | ||
* @author Johnny Miller (鍾俊), email: [email protected] | ||
* date 10/16/2020 2:58 PM | ||
**/ | ||
@Slf4j | ||
@SpringBootApplication | ||
public class MediaStreamingSampleAppApplication { | ||
private static final String LINE_SEPARATOR = System.lineSeparator(); | ||
|
||
public static void main(String[] args) { | ||
val startInstant = Instant.now(); | ||
SpringApplication.run(MediaStreamingSampleAppApplication.class, args); | ||
val endInstant = Instant.now(); | ||
val duration = Duration.between(startInstant, endInstant); | ||
log.info("🥳 Congratulations! 🎉"); | ||
log.info("🖥 {} started!", MediaStreamingSampleAppApplication.class.getSimpleName()); | ||
log.info("⏳ Deployment duration: {} seconds ({} ms)", duration.getSeconds(), duration.toMillis()); | ||
log.info("⏰ App started at {} (timezone - {})", endInstant, TimeZone.getDefault().getDisplayName()); | ||
log.info("{} App running at{} - Local: http://localhost:8080/", LINE_SEPARATOR, LINE_SEPARATOR); | ||
} | ||
|
||
} |
5 changes: 5 additions & 0 deletions
5
media-streaming-sample-app/src/main/resources/application.yml
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,2 +1,7 @@ | ||
media-streaming: | ||
video-directory-on-file-system: 'C:\\Users\\Johnny\\Videos\\Mine' | ||
|
||
# Configure logging level of Media Streaming | ||
logging: | ||
level: | ||
com.jmframework.boot.mediastreamingspringbootautoconfigure: DEBUG |
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,23 @@ | ||
${AnsiStyle.BOLD}${AnsiColor.BRIGHT_GREEN} | ||
__ | ||
/|/| _ _/'_ ( _/_ _ _ _ ' _ | ||
/ |(-(//(/ __)// (-(///)//)(/ | ||
_/ | ||
__ _ | ||
( _ _ /_ /_| | ||
__)(///)/)((- ( |/)/) | ||
/ / / | ||
${AnsiStyle.BOLD}Media Streaming Sample App :: Powered by Spring Boot ::${spring-boot.formatted-version} | ||
${AnsiColor.CYAN}Author: Johnny Miller (鍾俊), email: [email protected] | ||
${AnsiStyle.NORMAL}${AnsiColor.MAGENTA}http://patorjk.com/software/taag/#p=display&f=Italic&t=Media%20Streaming%0ASample%20App | ||
${AnsiColor.BRIGHT_BLACK} | ||
-------------------------------------------Font Info------------------------------------------- | ||
italic.flf Version 2 | ||
by: Bas Meijer [email protected] [email protected] | ||
fixed by: Ryan Youck [email protected] | ||
|
||
------------------------------------------Banner Info------------------------------------------ | ||
Banner generated by Text ASCII Art Generator. | ||
A web app that lets you type in large ASCII Art text lettering. | ||
This can create art you can put in your email signature, on your webpage, etc etc. | ||
More at http://patorjk.com/software/taag/ |
35 changes: 31 additions & 4 deletions
35
.../com/jmsoftware/boot/mediastreamingsampleapp/MediaStreamingSampleAppApplicationTests.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,13 +1,40 @@ | ||
package com.jmsoftware.boot.mediastreamingsampleapp; | ||
|
||
import com.jmframework.boot.mediastreamingspringbootautoconfigure.model.Video; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.junit.jupiter.api.Test; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebTestClient; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
import org.springframework.http.MediaType; | ||
import org.springframework.test.web.reactive.server.EntityExchangeResult; | ||
import org.springframework.test.web.reactive.server.WebTestClient; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* Description: MediaStreamingSampleAppApplicationTests, change description here. | ||
* | ||
* @author Johnny Miller (锺俊), email: [email protected], date: 10/20/2020 1:04 PM | ||
**/ | ||
@Slf4j | ||
@SpringBootTest | ||
@AutoConfigureWebTestClient | ||
class MediaStreamingSampleAppApplicationTests { | ||
@Autowired | ||
private WebTestClient webTestClient; | ||
|
||
@Test | ||
void contextLoads() { | ||
} | ||
|
||
@Test | ||
void videosTest() { | ||
EntityExchangeResult<List<Video>> returnResult = webTestClient | ||
.get() | ||
.uri("/videos") | ||
.accept(MediaType.ALL) | ||
.exchange() | ||
.expectStatus() | ||
.isOk() | ||
.expectBodyList(Video.class) | ||
.returnResult(); | ||
log.info("Video test: {}", returnResult.getResponseBody()); | ||
} | ||
} |
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
34 changes: 0 additions & 34 deletions
34
...main/java/com/jmframework/boot/mediastreamingspringbootautoconfigure/api/VideoRoutes.java
This file was deleted.
Oops, something went wrong.
39 changes: 0 additions & 39 deletions
39
...a/com/jmframework/boot/mediastreamingspringbootautoconfigure/configuration/Bootstrap.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.