Initialize Spring Boot application with HTTPS support and add Docker configuration
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
package https;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@SpringBootApplication
|
||||
@RestController
|
||||
public class SpringBootHttpsApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(SpringBootHttpsApplication.class, args);
|
||||
}
|
||||
|
||||
@GetMapping("/hello")
|
||||
public String hello() {
|
||||
return "Hello World! 🚀";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
server.ssl.enabled=true
|
||||
server.ssl.certificate=${FULLCHAINPEM}
|
||||
server.ssl.certificate-private-key=${PRIVKEYPEM}
|
||||
@@ -0,0 +1,5 @@
|
||||
server:
|
||||
ssl:
|
||||
enabled: true
|
||||
certificate: ${FULLCHAINPEM}
|
||||
certificate-private-key: ${PRIVKEYPEM}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package https;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@SpringBootTest
|
||||
class SpringBootHttpsApplicationTests {
|
||||
|
||||
@Test
|
||||
void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user