일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
- db
- springboot
- 이미지엑박
- 다중기본키
- C#
- javascript
- oracle
- ascx.cs
- mssql
- 다중pk
- mysql
- 데이터베이스
- 자동증가열
- 오라클
- SQL
- windows7
- memoryDB
- 자바스크립트
- VMWare
- 코딩테스트
- 쿼리
- HTML
- PHP
- ASP
- 프로그래머스
- 가상머신
- CrossSiteScripting
- 트리플DES
- 람다식함수
- 스프링부트
- Today
- Total
목록springboot (4)
개발바닥 아방수

스프링부트 데이터베이스 설정을 해보자! -- 테스트 db 때 사용한다. 다음 파일에 해당 내용을 추가해준다. \src\main\resources\application.properties #h2 console 활성화 및 경로 설정 spring.h2.console.enabled=true spring.h2.console.path=/h2-console #h2 db 설정 spring.datasource.url=jdbc:h2:~/test; spring.datasource.driverClassName=org.h2.Driver spring.datasource.username=sa spring.datasource.password= spring.jpa.database-platform=org.hibernate.dialect..

타임리프 방식으로 form을 보내는 것은 form 자체에서 DTO 객체를 던져주는 것이 키포인트다. 그렇기 때문에, controller에서 view를 던져줄 때부터 DTO 객체를 생성하여 model.addAttribute로 던져주는 것이 중요하다. hello.html 하단 코드에서 타임리프 이용하여 보내기 주석 부분을 보면 된다. html에서부터 sampleDTO로 controller에 보내는 방식이다. form axios first : second : last : form sumbit first : last : hello view link test link test Hello~~~~ List click me helloController.java mapping 값인 hello에 들어갈 때부터 폼에서 가지..

Controller, RestController, View 예제 HelloController.java dispatcher -> view resolver view를 리턴해준다. package com.jieun.chunjae.controller; import java.util.Arrays; import java.util.List; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; @Contro..

vs code와 java 11를 다운로드 한다. (환경변수 설정도!) extension에서 spring boot와 gradle를 설치한다. ctrl + shift + p 누르고 spring gradle 검색하여 프로젝트를 생성한다. 가장 낮은 버전으로 생성한다. 패키지명은 자율적으로 한다. java code generators도 설치해준다. dependencies의 경우 아래 5개를 선택하고 생성한다. 원하는 위치에 지정하고, 오른쪽 하단에 뜨는 open을 누르면 된다. trust 해준다. 왼쪽 사이드바의 Spring Boot Dashboard를 클릭하고, APPS 에서 Debug(사진상으로는 네모버튼 보이는 것)을 눌러준다. localhost:/8080/world 로 접속하면 다음과 같이 실행된 것을 ..