Implementing HTTP Server Framework using java socket.
project structure
src/
+- main/
+- java/
| +- <source code>
+- resources/
+- config/
| +- application.properties
+- static/
+- <static files>
<dependency>
<groupId>io.github.hypernova1</groupId>
<artifactId>sambastian</artifactId>
<version>1.0</version>
</dependency>
filename: resources/static/resource/application.properties
root-package-name=[root package name] # required
server.port=[port number]
server.maximum-pool-size=[maximum thread pool size]
file-buffer-size=[file buffer size]
# activate SSL
key-store.name=[keyStore name]
key-store.password=[keyStore password]
@ComponentScan
public class Application {
public static void main(String[] args) {
HttpServer.start();
}
}
22:26:34.015 [main] INFO org.sam.server.HttpServer - server started..
22:26:34.019 [main] INFO org.sam.server.HttpServer - server port: 8080