Added server-side additional code to support HTTPS protocol with self-signed cert
This commit is contained in:
parent
0d82b9feb3
commit
db4308dd29
4 changed files with 25 additions and 1 deletions
14
pom.xml
14
pom.xml
|
@ -50,7 +50,19 @@
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-websocket</artifactId>
|
<artifactId>spring-boot-starter-websocket</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
|
<artifactId>httpcore</artifactId>
|
||||||
|
<version>4.4.11</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
|
<artifactId>httpclient</artifactId>
|
||||||
|
<version>4.5.9</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
|
|
@ -1,10 +1,14 @@
|
||||||
package me.imsonmia.epqapi;
|
package me.imsonmia.epqapi;
|
||||||
|
|
||||||
|
import javax.net.ssl.SSLContext;
|
||||||
|
|
||||||
|
import org.apache.tomcat.jni.SSL;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.web.client.RestTemplate;
|
||||||
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
||||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||||
|
|
||||||
|
|
|
@ -13,3 +13,11 @@ spring.jpa.show-sql: true
|
||||||
# validate for semi-production
|
# validate for semi-production
|
||||||
# none for serious prod scenarios
|
# none for serious prod scenarios
|
||||||
spring.jpa.hibernate.ddl-auto=update
|
spring.jpa.hibernate.ddl-auto=update
|
||||||
|
|
||||||
|
server.ssl.key-store-type=PKCS12
|
||||||
|
server.ssl.key-store=classpath:key/cert.p12
|
||||||
|
server.ssl.key-store-password=epqchat
|
||||||
|
server.ssl.enabled=true
|
||||||
|
|
||||||
|
trust.store=classpath:key/cert.p12
|
||||||
|
trust.store.password=epqchat
|
BIN
src/main/resources/key/cert.p12
Normal file
BIN
src/main/resources/key/cert.p12
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue