안녕하세요. 우선 정말 좋은 강의 감사드립니다^^ 다름이 아니라 완강 후 새로 build하여 jar 파일을 만들었는데요. h2 서버를 항상 켜놔야돼서 그런지 그냥 jar 파일 실행하면 서버가 실행이 안되고, 항상 함께 h2.bat을 실행해야 구동됩니다ㅠㅠ 혹시 h2 서버 구동 안하고 jar 파일 실행만으로 실행 가능한 방법이 있을까요?
java 안에 @GetMapping("hello") 이라는 컨트롤러를 넣은 다음, template 안에 hello.html이라는 파일을 만들고 static 안에도 똑같은 hello.html 이라는 파일을 만들었습니다. 그 다음 localhost:8080/hello.html 을 검색했을 때 수업 내용대로라면 template안의 hello.html 파일이 출력돼야되는데 static 의 파일이 열렸습니다. 그래서 localhost:8080/hello 라고 검색해보니 이 때 templtate의 hello 파일이 열리더라고요. 따라서 localhost:8080/hello.html 이라고 웹브라우저에 치면 정적 파일이 열리고 localhost:8080/hello 이라 치면 template 파일이 열리는 것으로 봐서 웹 브라우저에 어떻게 검색하냐에 따라 파일이 열려지는게 달라지는 것 같습니다. 제가 수업에서 이해한건 뒤에 localhost:8080/hello.html 이라고 검색했을 때, 컨트롤러 먼저 찾고, 정적 파일을 찾는 우선순위 순으로 동작한다는 것이라서 이론대로라면 template 안에 hello.html이 먼저 열려야될 것 같은데 아니라 제가 이해한 것과 상충되어 이렇게 질문드립니다. 양질의 강의 감사합니다. 정말 잘 듣고 있어요
안녕하세요 영한님! 강의 내용 중 궁금한 점이 있어 질문 드립니다. Team refTeam = em.getReference(Team.class, 1L); refTeam.getName(); 을 하게되면 Proxy가 비어있으므로 1. 영속성 컨텍스트에 초기화 요청을 보내고, 2. 영속성 컨텍스트가 DB를 조회해 3. 실제 엔티티 객체를 생성 은 이해가 되었습니다. 그럼 여기서 영속성 컨텍스트가 실제 엔티티 객체를 생성하고 Proxy의 target에 연결을 해줄 뿐이지, 1차 캐시에 실제 엔티티가 저장되는 것은 아닌 건가요? 1차 캐시에는 'Proxy 객체만' 있고 Proxy의 target을 통해 실제 엔티티를 접근할 수 있는 건지 궁금하여 질문 드립니다! 감사합니다.
import java.util.ArrayList; import java.util.Collections; import java.util.PriorityQueue; import java.util.Scanner; class Lecture implements Comparable<Lecture>{ public int pay; public int day; Lecture(int pay, int day){ this.pay = pay; this.day = day; } @Override public int compareTo(Lecture ob) { return ob.day - this.day; } } public int solution(ArrayList<Lecture> arr){ int answer=0; PriorityQueue<Integer> pQ = new PriorityQueue<>(Collections.reverseOrder()); Collections.sort(arr); int j=0; //이 부분이 밖에서 선언하면 값(150) 이 나오고 //for 문안에서 int j=0; 선언하면 ex) for(int j=0; j<n; j++) {} //값이 180으로 나오는데 왜 틀린지 잘 모르겠습니다. for(int i=max; i>=1; i--){ for(; j<n; j++){ if(arr.get(j).day<i) break; pQ.offer(arr.get(j).pay); } if(!pQ.isEmpty()) answer+=pQ.poll(); } return answer; } public static void main(String[] args) { Main t = new Main(); Scanner kb = new Scanner(System.in); n = kb.nextInt(); ArrayList<Lecture> arr = new ArrayList<>(); for(int i=0; i<n; i++) { int pay = kb.nextInt(); int day = kb.nextInt(); arr.add(new Lecture(pay, day)); if(day>max) max = day; } //for(Lecture lt : arr) System.out.println(lt.pay+" "+lt.day); System.out.println(t.solution(arr)); } }
<input th:classappend="${errors?.containsKey('errorA')}?'field-error': _ " th:classappend="${errors?.containsKey('errorB')}?'field-error': _ " > 이런 식으로 사용해서 errorA가 있어도 errorB가 있어도 or 조건으로 input 테그 테두리를 붉게 해주고 싶은데요. th:classappend가 2개 들어가니까 오류가 뜨더라고요. 이렇게 오류가 2개 이상이 될 때 적용할 수 있는 방법이 있나요?
script.ajax에서 북마크부분이 잘못된듯 합니다. const bookmark = document . querySelector ( '.bookmark' ). innerHTML = btn_bookmark_text ; 이부분이, .bookmark중에 맨위에꺼만 잡기 때문에, 어떤 포스트를 클릭해서 저장하기를 눌러도 첫번째 포스트가 바뀝니다. 데이터베이스 상엔 영향을 미치지 않지만, 프런트에서 저장됨/저장하기가 첫번째꺼에만 영향을 미쳐요.
function ParentClass() {}; function ChildClass() {}; ChildClass.prototype = new ParentClass(); var mychild = new ChildClass(); var myparent = new ParentClass(); console.log(mychild); console.log(myparent); console.log(mychild.prototype); console.log(myparent.prototype); console.log(Object.getPrototypeOf(mychild)); console.log(Object.getPrototypeOf(myparent)); -> 위 예시에서 결과 값은 아래와 같습니다. ParentClass {} ParentClass {} undefined undefined ParentClass {} {} 1) 어떻게 console.log(mychild); 와 console.log(myparent); 의 값이 같게 나올수가 있나요....? 2) console.log(Object.getPrototypeOf(mychild));와 console.log(Object.getPrototypeOf(myparent)); 의 결과값이 각각 ChildClass()와 ParentClass();여야 하는거 아닌가요...?
좋은 강의 감사합니다. 강의대로 모든 준비를 마치고 heroku에 배포한 결과 Client는 정상적으로 동작하는데 서버가 정상적으로 동작하지 않는 것 같습니다. 로그인 또는 회원가입을 시도할때 다음과 같은 에러가 발생합니다. 일단 package.json 파일은 다음과 같이 수정했는데 어느 부분을 수정해야 할지 모르겠습니다. 배포를 해야 다음 강의를 진행할텐데 여기서 멈춰있습니다. 바쁘시겠지만 도움 부탁드립니다. 감사합니다. 수정한 부분은 다음과 같습니다. "scripts" : { "start" : "concurrently \" npm run server \" \" npm run client \" " , "server" : "node server/index.js" , "client" : "cd client && npm start" , "test" : "echo \" Error: no test specified \" && exit 1" , "heroku-postbuild" : "cd client && npm install && npm run build" }, const port = process . env . PORT || 5000 ; app . listen ( port , () => console . log ( `Example app listening on port ${ port } !` ));
안녕하세요 방금 강의를 보면서 vscode와 atom 설치를 마쳤는데요, 제 컴퓨터가 64bit인 것을 깜빡하고 3.8 32bit 버전을 다운받아서 사용해서 중간에 삭제하고 3.9 64bit 버전을 설치했는데 vscode에서 .py를 실행하면 output이 출력이 되지 않습니다(출력 시 Hello Python으로 나와야 됩니다) 원래 삭제 전에는 atom에서는 출력이 되었는데 이제는 그냥 Python이라고 나옵니다 ㅜㅜ 어떻게 해야될까요??