• 로그인
  • 장바구니에 상품이 없습니다.

home2 게시판 Spring 게시판 ./gradlew bootRun 오류

./gradlew bootRun 오류

  • 이 주제에는 3개 답변, 2명 참여가 있으며 codingapple7 월 전에 전에 마지막으로 업데이트했습니다.
4 글 보임 - 1 에서 4 까지 (총 4 중에서)
  • 글쓴이
  • #133015

    황승현
    참가자
    PS C:\Users\iamhs\Downloads\shop> ./gradlew bootRun
    > Task :compileJava FAILED
    C:\Users\iamhs\Downloads\shop\src\main\java\com\apple\shop\sales\SalesController.java:3: error: cannot find symbol
    import com.apple.shop.member.CustomUser;
                                ^
      symbol:   class CustomUser
      location: package com.apple.shop.member
    1 error
    FAILURE: Build failed with an exception.
    * What went wrong:
    Execution failed for task ':compileJava'.
    > Compilation failed; see the compiler error output for details.
    * Try:
    > Run with --info option to get more log output.
    > Run with --scan to get full insights.
    BUILD FAILED in 1s
    1 actionable task: 1 executed
    PS C:\Users\iamhs\Downloads\shop>
    
    
    변경사항 발견시 코드 재실행 기능 사용하고 싶어 ./gradlew build --continuous, ./gradlew bootRun 터미널에 실행하려는데 위와 같은 오류가 생깁니다. 
    
    (CustomUser.java)
    
    package com.apple.shop.member;
    import org.springframework.security.core.GrantedAuthority;
    import org.springframework.security.core.userdetails.User;
    import java.util.Collection;
    public class CustomUser extends User {
      public String displayName;
      public Long id;
      public CustomUser(String username,
                        String password,
                        Collection<? extends GrantedAuthority> authorities) {
        super(username, password, authorities);
      }
    }
    
    오른쪽 위에 Run 단축키로 실행할 땐 문제가 생기지 않는데 왜 ./gradlew bootRun 실행할때 문제가 생길까요?
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    		
    	
    #133039

    codingapple
    키 마스터
    CustomUser 파일 지우고 다시 만들어보거나 SalesController.java에서 다시 import 해보거나
    터미널에 ./gradlew clean 입력해봅시다
    
    #133073

    황승현
    참가자
    세가지 다 했는데 해결됬습니다. 감사합니다. 그런데 이렇게 터미널 명령어 2개로 스프링 실행한 경우에는 sout 로 출력한 내역은 어디서 볼 수 있나요?
    #133083

    codingapple
    키 마스터
    아마 터미널 2개 중에 하나에서 출력될걸요
4 글 보임 - 1 에서 4 까지 (총 4 중에서)
  • 답변은 로그인 후 가능합니다.

About

현재 월 700명 신규수강중입니다.

  (09:00~20:00) 빠른 상담은 카톡 플러스친구 코딩애플 (링크)
  admin@codingapple.com
  이용약관
ⓒ Codingapple, 강의 예제, 영상 복제 금지
top

© Codingapple, All rights reserved. 슈퍼로켓 에듀케이션 / 서울특별시 강동구 고덕로 19길 30 / 사업자등록번호 : 212-26-14752 온라인 교육학원업 / 통신판매업신고번호 : 제 2017-서울강동-0002 호 / 개인정보관리자 : 박종흠