본문 바로가기

Spring boot Web project10

[Thymeleaf] 하나부터 열까지 ( Part 1 ) + 참고 : Thymeleaf Document https://www.thymeleaf.org/doc/tutorials/3.0/usingthymeleaf.html#standard-expression-syntax Tutorial: Using Thymeleaf 1 Introducing Thymeleaf 1.1 What is Thymeleaf? Thymeleaf is a modern server-side Java template engine for both web and standalone environments, capable of processing HTML, XML, JavaScript, CSS and even plain text. The main goal of Thymeleaf is to provide .. 2020. 2. 17.
[Java] Controller 작성법 - value : 접근가능한 이름 - method : RequestMethod.POST or RequestMethod.GET - ajax 이용시 Controller 함수 위에 mapping =>> Method 명칭 위에 mapping - data 넘겨받음 - value : Method 안에서의 data 변수 명칭 선언 - required : true 가 기본값 , 생략시 true 로 설정 -> 즉 required : false 일 때에만 설정 하면 OK false 인 경우에는 data 가 넘어올 수도 안넘어 올 수도 있음 + 형식 @RequestParam ( value = " kk ", required = fa.. 2020. 2. 14.
[Ajax] 작성법 및 형식 ajax 작성법 및 형식 $.ajax({ url : ' ', -> 자바 controller 에서 RequestMapping 하는 value 값 type : 'POST', async : true, -> 기본값 ( 비동기식 ) dataType : "Json", data : { "page_size" : page_size, "page_num" : page_num }, -> 데이터 여러개 전송 success : function(data){ -> 성공시 로직 }, error : function (e){ -> 실패시 로직 } }); 2020. 2. 14.
[Spring] 스프링 부트 Web project 기타 file 설정 => 두파일 모두 src/main/resources 아래 위치 log4j2.xml - basedir 에 값을 "가 / 나 / 다" 로 설정시 -> c 드라이브의 가 폴더안에 나 폴더 안에 다 폴더 안에 로그파일이 생성 됨 - project_name 에 값을 "라" 로 설정시 -> 로그파일의 이름이 "라" 로 설정됨 ex) 라.log application.yml ( 본래 파일명 application.properties ) - database 설정 datasource 에 jdbc 주소를 넣음 driver-class-name 에 드라이버 주소를 넣음 username과 password 설정 - server port 와 context-path 설정 => http://localhost:8888/kkkk server.. 2020. 2. 13.