# java-helloworld-demo **Repository Path**: biancl/java-helloworld-demo ## Basic Information - **Project Name**: java-helloworld-demo - **Description**: java helloworld - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2024-06-04 - **Last Updated**: 2024-08-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Demo for Springboot & Docker Public Docker Image: biancl/java-helloworld-demo:0.1 ## Compile and Build Docker Image ``` mvn clean package docker build . -t java-helloworld-demo:0.1 ``` ## Run With Docker Image ``` docker run -d --name=demo -p 8080:8080 java-helloworld-demo:0.1 ``` ## Run With Maven 3 ``` mvn clean spring-boot:run ``` ## API List 1. Default - path:/ - method: get - parameters: - result:Hello,{name} - example: curl http://\:8080/ 1. plus - path:/plus - method:get - parameters: [double]x、[double]y - result:x+y - example: curl http://\:8080/plus?x=10&y=8 1. minus - path:/minus - method:get - parameters: [double]x、[double]y - result:x-y - example: curl http://\:8080/minus?x=10&y=8