Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
196 changes: 0 additions & 196 deletions PhotoAppAPIConfigServer/UnlimitedJCEPolicyJDK8/README.txt

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file modified PhotoAppAPIConfigServer/apiEncryptionKey.jks
Binary file not shown.
5 changes: 3 additions & 2 deletions PhotoAppAPIConfigServer/dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM openjdk:8-jdk-alpine
FROM openjdk:11
VOLUME /tmp
COPY apiEncryptionKey.jks apiEncryptionKey.jks
COPY UnlimitedJCEPolicyJDK8/* /usr/lib/jvm/java-1.8-openjdk/jre/lib/security/
# this is no longer needed as with jdk11 unlimited crypto policies are installed by default:
#COPY UnlimitedJCEPolicyJDK8/* /usr/lib/jvm/java-1.8-openjdk/jre/lib/security/
COPY target/PhotoAppAPIConfigServer-0.0.1-SNAPSHOT.jar ConfigServer.jar
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","ConfigServer.jar"]
9 changes: 4 additions & 5 deletions PhotoAppAPIConfigServer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.3.RELEASE</version>
<version>2.3.12.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>com.appsdeveloperblog.photoapp.api</groupId>
Expand All @@ -16,8 +16,8 @@
<description>Config Server</description>

<properties>
<java.version>1.8</java.version>
<spring-cloud.version>Greenwich.SR1</spring-cloud.version>
<java.version>11</java.version>
<spring-cloud.version>Hoxton.SR8</spring-cloud.version>
</properties>

<dependencies>
Expand All @@ -31,8 +31,7 @@
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>



<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bus-amqp</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
@EnableConfigServer
public class PhotoAppApiConfigServerApplication {

public static void main(String[] args) {
SpringApplication.run(PhotoAppApiConfigServerApplication.class, args);
}
public static void main(String[] args) {
SpringApplication.run(PhotoAppApiConfigServerApplication.class, args);
}

}
31 changes: 25 additions & 6 deletions PhotoAppAPIConfigServer/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,19 +1,38 @@
spring.application.name=PhotoAppAPIConfigServer
server.port=8012
spring.profiles.active=native
# Use this GET request to list fetched properties http://localhost:8012/PhotoAppAPIConfigServer/git
spring.profiles.active=git

spring.cloud.config.server.native.searchLocations=file://${user.home}/Desktop/dev/config-server-nfs
#spring.cloud.config.server.native.searchLocations=file://${user.home}/Desktop/dev/config-server-nfs

spring.cloud.config.server.git.uri=https://github.com/simplyi/PhotoAppConfiguration
spring.cloud.config.server.git.username=simplyi
spring.cloud.config.server.git.password=
spring.cloud.config.server.git.uri=git@github.com:zkvarz/PhotoAppConfiguration.git
spring.cloud.config.server.git.clone-on-start=true
spring.cloud.config.server.git.force-pull=true
spring.cloud.config.server.git.searchPaths=usersws,zuul
spring.cloud.config.server.git.default-label=main
#spring.cloud.config.server.git.searchPaths=usersws,zuul
spring.cloud.config.server.git.ignore-local-ssh-settings=true

#Make sure to generate RSA keys in PEM format! Here is the command I used: ssh-keygen -m PEM -t rsa -b 4096
spring.cloud.config.server.git.private-key=\
-----BEGIN RSA PRIVATE KEY-----\n\
YOURKEY3\n\
YOURKEY3\n\
-----END RSA PRIVATE KEY-----

# You can use public cloud config example for testing purposes, just uncommenting:
#spring.cloud.config.server.git.uri=https://github.com/spring-cloud-samples/config-repo
#Location where properties will be stored:
#spring.cloud.config.server.git.basedir=target/config
#spring.cloud.config.server.git.default-label=main
#spring.cloud.config.server.git.clone-on-start=true
#spring.cloud.config.server.git.force-pull=true

management.endpoints.web.exposure.include=bus-refresh

spring.rabbitmq.host=localhost
spring.rabbitmq.port=5672
spring.rabbitmq.username=guest
spring.rabbitmq.password=guest

logging.level.root=INFO
logging.level.org.springframework.cloud=TRACE
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Uncomment to use symmetric encrypted properties.
# You can encrypt sending text in request body with POST http://localhost:8012/encrypt
# You can also decrypt sending encrypted text in request body with POST http://localhost:8012/decrypt
#encrypt.key=fhf73odjsjkhHld98yurH983ndksku48slfhcflfdjG

encrypt.key-store.location=file://${user.home}/Desktop/dev/apiEncryptionKey.jks
encrypt.key-store.password=1q2w3e4r
# Generated encryption key for asymmetric encryption via command, e.g.:
# keytool -genkeypair -alias apiEncryptionKey -keyalg RSA -dname "CN=Kirill,OU=API Development,O=kirill.com,L=Kherson,S=Kherson,C=Ukraine" -keypass 1asdfasdf -keystore apiEncryptionKey.jks -storepass 1asdfasdf
encrypt.key-store.location=file:///C:/Users/kvarivoda/apiEncryptionKey.jks
encrypt.key-store.password=1asdfasdf
encrypt.key-store.alias=apiEncryptionKey
6 changes: 3 additions & 3 deletions PhotoAppApiAccountManagement/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.3.RELEASE</version>
<version>2.3.12.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>com.appsdeveloperblog.photoapp.api.account</groupId>
Expand All @@ -16,8 +16,8 @@
<description>Account Management microservice</description>

<properties>
<java.version>1.8</java.version>
<spring-cloud.version>Greenwich.RELEASE</spring-cloud.version>
<java.version>11</java.version>
<spring-cloud.version>Hoxton.SR12</spring-cloud.version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
server.port=0
spring.application.name=account-ws
eureka.client.serviceUrl.defaultZone = http://localhost:8010/eureka
spring.devtools.restart.enabled = true
eureka.client.serviceUrl.defaultZone=http://test:test@localhost:8010/eureka
spring.devtools.restart.enabled=true

spring.rabbitmq.host=localhost
spring.rabbitmq.port=5672
Expand Down
2 changes: 1 addition & 1 deletion PhotoAppApiAlbums/dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openjdk:8-jdk-alpine
FROM openjdk:11
VOLUME /tmp
COPY target/PhotoAppApiAlbums-0.0.1-SNAPSHOT.jar PhotoAppApiAlbums.jar
ENTRYPOINT ["java","-jar","PhotoAppApiAlbums.jar"]
8 changes: 4 additions & 4 deletions PhotoAppApiAlbums/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.2.RELEASE</version>
<version>2.3.12.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.appsdeveloperblog.photoapp.api.albums</groupId>
Expand All @@ -15,8 +15,8 @@
<description>Demo project for Spring Boot</description>

<properties>
<java.version>1.8</java.version>
<spring-cloud.version>Greenwich.RELEASE</spring-cloud.version>
<java.version>11</java.version>
<spring-cloud.version>Hoxton.SR12</spring-cloud.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -44,7 +44,7 @@
<dependency>
<groupId>org.modelmapper</groupId>
<artifactId>modelmapper</artifactId>
<version>2.0.0</version>
<version>2.4.4</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
server.port=${PORT:0}
spring.application.name=albums-ws

eureka.client.serviceUrl.defaultZone = http://localhost:8010/eureka
eureka.client.serviceUrl.defaultZone=http://test:test@localhost:8010/eureka
eureka.instance.instance-id=${spring.application.name}:${spring.application.instance_id:${random.value}}

spring.devtools.restart.enabled = true
Expand Down
2 changes: 1 addition & 1 deletion PhotoAppApiUsers/dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openjdk:8-jdk-alpine
FROM openjdk:11
VOLUME /tmp
COPY target/PhotoAppApiUsers-0.0.1-SNAPSHOT.jar users-microservice.jar
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/users-microservice.jar"]
Loading