Skip to content

Commit 5751288

Browse files
committed
Fixes resources loading
1 parent 7ec7fc9 commit 5751288

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ WORKDIR ${runningFolder}
66

77
RUN apt-get update
88

9-
RUN touch /etc/postfix/main.cf
10-
119
#COPY docker-files/default.conf /etc/nginx/conf.d/default.conf
1210
#
1311
#COPY docker-files/nginx.conf /etc/nginx/nginx.conf

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ eval $(docker-machine env dev)
88

99
docker-compose down
1010

11-
#mvn clean install
11+
mvn clean install
1212

1313
#cd concert-demos-gui
1414
#yarn install --force

concert-demos-rest-service-webflux/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@
253253
<artifactId>spring-boot-maven-plugin</artifactId>
254254
<version>${spring-boot-maven-plugin.version}</version>
255255
<configuration>
256+
<addResources>true</addResources>
256257
<mainClass>org.jesperancinha.concerts.ConcertDemosRootApplicationKt</mainClass>
257258
</configuration>
258259
<executions>

concert-demos-rest-service-webflux/src/main/kotlin/org/jesperancinha/concerts/configuration/Configuration.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ private val logger = KotlinLogging.logger {}
1515

1616
@Configuration
1717
class Configuration(
18-
@Value("\${org.jesperancinha.concerts.schema.file:schema.sql}")
18+
@Value("\${org.jesperancinha.concerts.schema.file:/schema.sql}")
1919
val schema: String
2020
) {
2121

@@ -31,7 +31,7 @@ class Configuration(
3131

3232
@Throws(URISyntaxException::class)
3333
private fun getSchema(): Mono<String> {
34-
val reader = BufferedReader(getSystemResourceAsStream(schema).reader())
34+
val reader = BufferedReader(Configuration::class.java.getResourceAsStream(schema).reader())
3535
reader.use {
3636
val content: String = reader.readText()
3737
return Mono.just(content)

entrypoint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
#!/usr/bin/env bash
2+
3+
java -jar -Dspring.profiles.active=dev concert-demos-rest-service-webflux-0.0.1-SNAPSHOT.jar --postgres.host=postgres &
24
java -jar -Dspring.profiles.active=dev concert-demos-rest-service-mvc-0.0.1-SNAPSHOT.jar --postgres.host=postgres
3-
#java -jar -Dspring.profiles.active=dev concert-demos-rest-service-webflux-0.0.1-SNAPSHOT.jar --postgres.host=postgres

0 commit comments

Comments
 (0)