-
-
Save julianjupiter/83d0d5c6535011c4f24bc4345bbcef52 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.File; | |
import java.io.FileOutputStream; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
import java.net.URL; | |
// java Curl.java | |
public class Curl { | |
public static void main(String[] args) throws Exception { | |
URL url = new URL("https://start.spring.io/starter.zip?name=reservation-service-1" + | |
"&groupId=com.example&artifactId=reservation-service-1&version=0.0.1-SNAPSHOT&description=Demo+project+for+Spring+Boot&packageName=com.example.demo&type=maven-project&packaging=jar&javaVersion=1.8&language=java&" + | |
"bootVersion=2.0.5.RELEASE&dependencies=devtools&dependencies=data-mongodb-reactive" + | |
"&dependencies=actuator&dependencies=webflux"); | |
try (InputStream inputStream = url.openStream(); | |
OutputStream outputStream = new FileOutputStream( | |
new File(new File(System.getProperty("user.home"), "Desktop"), "reactive-spring.zip"))) { | |
inputStream.transferTo( outputStream); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment