작성
·
664
0
너무 안되어서 게시판에있는 gradle-> intellij로 바꾸어실행하기 등등 다 해봤는데 해결되지가 않네요 ㅠㅠ
답변 3
0
안녕하세요. hoon님, 공식 서포터즈 y2gcoder입니다.
스스로 잘 해결하셨습니다!
먼저 기존에 보여주신 캡처본을 보면 실행하고 바로 종료된 것입니다. == 정상적으로 실행과 종료를 한 것입니다.
왜냐하면 스프링 부트 애플리케이션에
implementation 'org.springframework.boot:spring-boot-starter-web'
위의 의존성을 추가해줘야 내장 톰캣(웹서버)이 해당 프로젝트에 추가되고, 이 내장 톰캣을 사용해서 웹 어플리케이션으로 띄울 수 있기 때문입니다. 위의 의존성 없이 실행하시면 단순 자바 애플리케이션과 같이 메인 메서드를 실행하고 나서 그대로 종료합니다.
감사합니다.
0
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
} 를 추가하였더니 정상작동합니다 이유가 뭔가요????
0
/Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home/bin/java -javaagent:/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar=63069:/Applications/IntelliJ IDEA CE.app/Contents/bin -Dfile.encoding=UTF-8 -classpath /Users/kimyunsoo/Downloads/jdbc 7/out/production/classes:/Users/kimyunsoo/Downloads/jdbc 7/out/production/resources:/Users/kimyunsoo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-jdbc/2.7.5/b57c3f8fb2fe235a8ff368755092371423bbc5b3/spring-boot-starter-jdbc-2.7.5.jar:/Users/kimyunsoo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter/2.7.5/c28e1546461803490588085345ba5d2897d232bc/spring-boot-starter-2.7.5.jar:/Users/kimyunsoo/.gradle/caches/modules-2/files-2.1/com.zaxxer/HikariCP/4.0.3/107cbdf0db6780a065f895ae9d8fbf3bb0e1c21f/HikariCP-4.0.3.jar:/Users/kimyunsoo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-jdbc/5.3.23/c859919a644942822e49cb7f2404b2c4d3cba040/spring-jdbc-5.3.23.jar:/Users/kimyunsoo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-autoconfigure/2.7.5/96646e63a2296d0a3209383e81cdb8c87ab2f913/spring-boot-autoconfigure-2.7.5.jar:/Users/kimyunsoo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot/2.7.5/fd04e228e6e21b7ad13c10ae29afd31868d842e5/spring-boot-2.7.5.jar:/Users/kimyunsoo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-logging/2.7.5/61f4c53e35baa31a269bbeb7bb9d5e781448feef/spring-boot-starter-logging-2.7.5.jar:/Users/kimyunsoo/.gradle/caches/modules-2/files-2.1/jakarta.annotation/jakarta.annotation-api/1.3.5/59eb84ee0d616332ff44aba065f3888cf002cd2d/jakarta.annotation-api-1.3.5.jar:/Users/kimyunsoo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-core/5.3.23/91407dc1106ea423c44150f3da1a0b4f8e25e5ca/spring-core-5.3.23.jar:/Users/kimyunsoo/.gradle/caches/modules-2/files-2.1/org.yaml/snakeyaml/1.30/8fde7fe2586328ac3c68db92045e1c8759125000/snakeyaml-1.30.jar:/Users/kimyunsoo/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-api/1.7.36/6c62681a2f655b49963a5983b8b0950a6120ae14/slf4j-api-1.7.36.jar:/Users/kimyunsoo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-tx/5.3.23/ab313b4028c62e18fe02defdd5050af704778428/spring-tx-5.3.23.jar:/Users/kimyunsoo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-beans/5.3.23/3bdefbf6042ed742cbe16f27d2d14cca9096a606/spring-beans-5.3.23.jar:/Users/kimyunsoo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-context/5.3.23/530b36b2ce2c9e471c6a260c3f181bcd20325a58/spring-context-5.3.23.jar:/Users/kimyunsoo/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-classic/1.2.11/4741689214e9d1e8408b206506cbe76d1c6a7d60/logback-classic-1.2.11.jar:/Users/kimyunsoo/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-to-slf4j/2.17.2/17dd0fae2747d9a28c67bc9534108823d2376b46/log4j-to-slf4j-2.17.2.jar:/Users/kimyunsoo/.gradle/caches/modules-2/files-2.1/org.slf4j/jul-to-slf4j/1.7.36/ed46d81cef9c412a88caef405b58f93a678ff2ca/jul-to-slf4j-1.7.36.jar:/Users/kimyunsoo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-jcl/5.3.23/3c7eb5fcca67b611065f73ff4325e398f8b051a3/spring-jcl-5.3.23.jar:/Users/kimyunsoo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-aop/5.3.23/30d0034ba29178e98781d85f51a7eb709a628e9b/spring-aop-5.3.23.jar:/Users/kimyunsoo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-expression/5.3.23/3a676bf4b9bc42bd37ab5ad264acb6ceb63397a2/spring-expression-5.3.23.jar:/Users/kimyunsoo/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-core/1.2.11/a01230df5ca5c34540cdaa3ad5efb012f1f1f792/logback-core-1.2.11.jar:/Users/kimyunsoo/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-api/2.17.2/f42d6afa111b4dec5d2aea0fe2197240749a4ea6/log4j-api-2.17.2.jar:/Users/kimyunsoo/.gradle/caches/modules-2/files-2.1/com.h2database/h2/2.1.214/d5c2005c9e3279201e12d4776c948578b16bf8b2/h2-2.1.214.jar hello.jdbc.JdbcApplication
. ____ _
/\\ / ___'_ __ (_)_ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.7.5)
2023-08-04 11:11:53.900 INFO 59660 --- [ main] hello.jdbc.JdbcApplication : Starting JdbcApplication using Java 11.0.18 on gim-yeonsuui-MacBookAir.local with PID 59660 (/Users/kimyunsoo/Downloads/jdbc 7/out/production/classes started by kimyunsoo in /Users/kimyunsoo/Downloads/jdbc 7)
2023-08-04 11:11:53.903 INFO 59660 --- [ main] hello.jdbc.JdbcApplication : No active profile set, falling back to 1 default profile: "default"
2023-08-04 11:11:54.570 INFO 59660 --- [ main] hello.jdbc.JdbcApplication : Started JdbcApplication in 0.908 seconds (JVM running for 1.132)
Process finished with exit code 0
이렇게 뜨고 바로 꺼집니다 ㅠㅠ