mac에서 gradle을 사용하여 SpringBoot로 WebAPI를 실행하고 싶습니다.
8479 단어 gradlespring-bootapi
mac에서 gradle을 사용하여 SpringBoot로 WebAPI를 실행하고 싶습니다.
터미널 정보
OS:macOS Mojave
バージョン:10.14.3
端末:MacBook Pro (13-inch,2017,Four Thunderbolt 3 Ports)
プロセッサ:3.1 GHz Intel Core i5
メモリ:8 GB 2133 MHz LPDDR3
내용 일람
Gradle 설치
API 실행
URL 확인
내용 상세
Gradle 설치
brew Update
$ brew update
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Updated 2 taps (homebrew/core and caskroom/cask).
==> New Formulae
allureofthestars cfn-lint cubelib itk leela-zero pipx
boringtun cpp-gsl cypher-shell ktlint otf2 scws
==> Updated Formulae
mysql ✔ faas-cli ipython mosquitto roll
(...省略...)
restic zola
exploitdb ios-sim mkvtoolnix rke
==> Deleted Formulae
imapsync node@6
gradle Install(실패)
$ brew install gradle
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Error: An exception occurred within a child process:
CompilerSelectionError: gradle cannot be built with any available compilers.
Install GNU's GCC:
brew install gcc
==> gcc를 설치합니까? ,,,,
gcc 설치 (실패)
$ brew install gcc
==> Installing dependencies for gcc: gmp, isl, mpfr and libmpc
==> Installing gcc dependency: gmp
==> Downloading https://homebrew.bintray.com/bottles/gmp-6.1.2_2.mojave.bottle.1.tar.gz
==> Downloading from https://akamai.bintray.com/84/84f74594086bccc53bdb141f4d06d7847680374e255ebe016654da1e47db2dfc?__gda__=exp=1556934978~hm
######################################################################## 100.0%
==> Pouring gmp-6.1.2_2.mojave.bottle.1.tar.gz
🍺 /usr/local/Cellar/gmp/6.1.2_2: 18 files, 3.1MB
==> Installing gcc dependency: isl
==> Downloading https://homebrew.bintray.com/bottles/isl-0.21.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/f9/f9188b5d486b2a835cd865f219be1a9848ce3926e27089a1538ee989db65447d?__gda__=exp=1556934983~hm
######################################################################## 100.0%
==> Pouring isl-0.21.mojave.bottle.tar.gz
🍺 /usr/local/Cellar/isl/0.21: 72 files, 4.3MB
==> Installing gcc dependency: mpfr
==> Downloading https://homebrew.bintray.com/bottles/mpfr-4.0.2.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/cf/cfce7ab866e98360c9364cd924da620ae7936d3a224d686aacc209c2107d19aa?__gda__=exp=1556934987~hm
######################################################################## 100.0%
==> Pouring mpfr-4.0.2.mojave.bottle.tar.gz
🍺 /usr/local/Cellar/mpfr/4.0.2: 28 files, 4.7MB
==> Installing gcc dependency: libmpc
==> Downloading https://homebrew.bintray.com/bottles/libmpc-1.1.0.mojave.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libmpc-1.1.0.mojave.bottle.tar.gz
🍺 /usr/local/Cellar/libmpc/1.1.0: 12 files, 354KB
==> Installing gcc
Warning: Building gcc from source:
The bottle needs the Xcode CLT to be installed.
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Error: An exception occurred within a child process:
CompilerSelectionError: gcc cannot be built with any available compilers.
Install GNU's GCC:
brew install gcc
==> 실패,,,, 다음 기사를 발견
<해결 방법 1:Mac>CompilerSelectionError: OO cannot be built with any available compilers.
xcode-select Install
$ xcode-select --install
xcode-select: note: install requested for command line developer tools
gcc 설치
$ brew install gcc
==> Downloading https://homebrew.bintray.com/bottles/gcc-8.3.0_2.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/78/78b5b3a98b82f7c89263c5d972a11f01d87a78f70842d889ae9698be57e68f94?__gda__=exp=1556936473~hm
######################################################################## 100.0%
==> Pouring gcc-8.3.0_2.mojave.bottle.tar.gz
🍺 /usr/local/Cellar/gcc/8.3.0_2: 1,414 files, 288.5MB
gradle 설치
$ brew install gradle
==> Downloading https://services.gradle.org/distributions/gradle-5.4.1-all.zip
==> Downloading from https://downloads.gradle.org/distributions/gradle-5.4.1-all.zip
######################################################################## 100.0%
🍺 /usr/local/Cellar/gradle/5.4.1: 13,767 files, 235.4MB, built in 3 minutes 22 seconds
gradle Install(확인)
$ gradle -v
Welcome to Gradle 5.4.1!
Here are the highlights of this release:
- Run builds with JDK12
- New API for Incremental Tasks
- Updates to native projects, including Swift 5 support
For more details see https://docs.gradle.org/5.4.1/release-notes.html
------------------------------------------------------------
Gradle 5.4.1
------------------------------------------------------------
Build time: 2019-04-26 08:14:42 UTC
Revision: 261d171646b36a6a28d5a19a69676cd098a4c19d
Kotlin: 1.3.21
Groovy: 2.5.4
Ant: Apache Ant(TM) version 1.9.13 compiled on July 10 2018
JVM: 1.8.0_152 (Oracle Corporation 25.152-b16)
OS: Mac OS X 10.14.3 x86_64
API 실행
$ java -jar ./build/libs/sample-0.0.1-SNAPSHOT.jar
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.1.1.RELEASE)
INFO SampleApplication - Starting SampleApplication on seirotauyanoMBP with PID 55437 (/Users/.../@.../11.Program/STS/workspace-3.9.4/spring_boot_part2/build/libs/sample-0.0.1-SNAPSHOT.jar started by tats in /Users/.../@.../11.Program/STS/workspace-3.9.4/spring_boot_part2)
INFO SampleApplication - No active profile set, falling back to default profiles: default
INFO TomcatWebServer - Tomcat initialized with port(s): 8080 (http)
INFO Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8080"]
INFO StandardService - Starting service [Tomcat]
INFO StandardEngine - Starting Servlet Engine: Apache Tomcat/9.0.13
INFO AprLifecycleListener - The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/Users/.../Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.]
INFO [/] - Initializing Spring embedded WebApplicationContext
INFO ContextLoader - Root WebApplicationContext: initialization completed in 1846 ms
INFO ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor'
INFO Http11NioProtocol - Starting ProtocolHandler ["http-nio-8080"]
INFO NioSelectorPool - Using a shared selector for servlet write/read
INFO TomcatWebServer - Tomcat started on port(s): 8080 (http) with context path ''
INFO SampleApplication - Started SampleApplication in 3.158 seconds (JVM running for 4.157)
INFO [/] - Initializing Spring DispatcherServlet 'dispatcherServlet'
INFO DispatcherServlet - Initializing Servlet 'dispatcherServlet'
INFO DispatcherServlet - Completed initialization in 10 ms
URL 확인
==> 어떻게 든 실행 확인까지 진행되었습니다.
Reference
이 문제에 관하여(mac에서 gradle을 사용하여 SpringBoot로 WebAPI를 실행하고 싶습니다.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/sfida11/items/1c668b7d7c35601091ba
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
OS:macOS Mojave
バージョン:10.14.3
端末:MacBook Pro (13-inch,2017,Four Thunderbolt 3 Ports)
プロセッサ:3.1 GHz Intel Core i5
メモリ:8 GB 2133 MHz LPDDR3
$ brew update
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Updated 2 taps (homebrew/core and caskroom/cask).
==> New Formulae
allureofthestars cfn-lint cubelib itk leela-zero pipx
boringtun cpp-gsl cypher-shell ktlint otf2 scws
==> Updated Formulae
mysql ✔ faas-cli ipython mosquitto roll
(...省略...)
restic zola
exploitdb ios-sim mkvtoolnix rke
==> Deleted Formulae
imapsync node@6
$ brew install gradle
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Error: An exception occurred within a child process:
CompilerSelectionError: gradle cannot be built with any available compilers.
Install GNU's GCC:
brew install gcc
$ brew install gcc
==> Installing dependencies for gcc: gmp, isl, mpfr and libmpc
==> Installing gcc dependency: gmp
==> Downloading https://homebrew.bintray.com/bottles/gmp-6.1.2_2.mojave.bottle.1.tar.gz
==> Downloading from https://akamai.bintray.com/84/84f74594086bccc53bdb141f4d06d7847680374e255ebe016654da1e47db2dfc?__gda__=exp=1556934978~hm
######################################################################## 100.0%
==> Pouring gmp-6.1.2_2.mojave.bottle.1.tar.gz
🍺 /usr/local/Cellar/gmp/6.1.2_2: 18 files, 3.1MB
==> Installing gcc dependency: isl
==> Downloading https://homebrew.bintray.com/bottles/isl-0.21.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/f9/f9188b5d486b2a835cd865f219be1a9848ce3926e27089a1538ee989db65447d?__gda__=exp=1556934983~hm
######################################################################## 100.0%
==> Pouring isl-0.21.mojave.bottle.tar.gz
🍺 /usr/local/Cellar/isl/0.21: 72 files, 4.3MB
==> Installing gcc dependency: mpfr
==> Downloading https://homebrew.bintray.com/bottles/mpfr-4.0.2.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/cf/cfce7ab866e98360c9364cd924da620ae7936d3a224d686aacc209c2107d19aa?__gda__=exp=1556934987~hm
######################################################################## 100.0%
==> Pouring mpfr-4.0.2.mojave.bottle.tar.gz
🍺 /usr/local/Cellar/mpfr/4.0.2: 28 files, 4.7MB
==> Installing gcc dependency: libmpc
==> Downloading https://homebrew.bintray.com/bottles/libmpc-1.1.0.mojave.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libmpc-1.1.0.mojave.bottle.tar.gz
🍺 /usr/local/Cellar/libmpc/1.1.0: 12 files, 354KB
==> Installing gcc
Warning: Building gcc from source:
The bottle needs the Xcode CLT to be installed.
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Error: An exception occurred within a child process:
CompilerSelectionError: gcc cannot be built with any available compilers.
Install GNU's GCC:
brew install gcc
$ xcode-select --install
xcode-select: note: install requested for command line developer tools
$ brew install gcc
==> Downloading https://homebrew.bintray.com/bottles/gcc-8.3.0_2.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/78/78b5b3a98b82f7c89263c5d972a11f01d87a78f70842d889ae9698be57e68f94?__gda__=exp=1556936473~hm
######################################################################## 100.0%
==> Pouring gcc-8.3.0_2.mojave.bottle.tar.gz
🍺 /usr/local/Cellar/gcc/8.3.0_2: 1,414 files, 288.5MB
$ brew install gradle
==> Downloading https://services.gradle.org/distributions/gradle-5.4.1-all.zip
==> Downloading from https://downloads.gradle.org/distributions/gradle-5.4.1-all.zip
######################################################################## 100.0%
🍺 /usr/local/Cellar/gradle/5.4.1: 13,767 files, 235.4MB, built in 3 minutes 22 seconds
$ gradle -v
Welcome to Gradle 5.4.1!
Here are the highlights of this release:
- Run builds with JDK12
- New API for Incremental Tasks
- Updates to native projects, including Swift 5 support
For more details see https://docs.gradle.org/5.4.1/release-notes.html
------------------------------------------------------------
Gradle 5.4.1
------------------------------------------------------------
Build time: 2019-04-26 08:14:42 UTC
Revision: 261d171646b36a6a28d5a19a69676cd098a4c19d
Kotlin: 1.3.21
Groovy: 2.5.4
Ant: Apache Ant(TM) version 1.9.13 compiled on July 10 2018
JVM: 1.8.0_152 (Oracle Corporation 25.152-b16)
OS: Mac OS X 10.14.3 x86_64
$ java -jar ./build/libs/sample-0.0.1-SNAPSHOT.jar
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.1.1.RELEASE)
INFO SampleApplication - Starting SampleApplication on seirotauyanoMBP with PID 55437 (/Users/.../@.../11.Program/STS/workspace-3.9.4/spring_boot_part2/build/libs/sample-0.0.1-SNAPSHOT.jar started by tats in /Users/.../@.../11.Program/STS/workspace-3.9.4/spring_boot_part2)
INFO SampleApplication - No active profile set, falling back to default profiles: default
INFO TomcatWebServer - Tomcat initialized with port(s): 8080 (http)
INFO Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8080"]
INFO StandardService - Starting service [Tomcat]
INFO StandardEngine - Starting Servlet Engine: Apache Tomcat/9.0.13
INFO AprLifecycleListener - The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/Users/.../Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.]
INFO [/] - Initializing Spring embedded WebApplicationContext
INFO ContextLoader - Root WebApplicationContext: initialization completed in 1846 ms
INFO ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor'
INFO Http11NioProtocol - Starting ProtocolHandler ["http-nio-8080"]
INFO NioSelectorPool - Using a shared selector for servlet write/read
INFO TomcatWebServer - Tomcat started on port(s): 8080 (http) with context path ''
INFO SampleApplication - Started SampleApplication in 3.158 seconds (JVM running for 4.157)
INFO [/] - Initializing Spring DispatcherServlet 'dispatcherServlet'
INFO DispatcherServlet - Initializing Servlet 'dispatcherServlet'
INFO DispatcherServlet - Completed initialization in 10 ms
Reference
이 문제에 관하여(mac에서 gradle을 사용하여 SpringBoot로 WebAPI를 실행하고 싶습니다.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/sfida11/items/1c668b7d7c35601091ba텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)