WEB/SpringBoot 20

[SpringBoot] 6. Creating a table in the MariaDB

- Goal After writing the post, it should be kept in the DB. To keep it, we need a table to keep the post. That's why we will create a table in Schema using MySQL workbench. 게시물을 작성한 후에는 DB에 보관해야한다. 보관을 하려면 그 게시글을 보관할 테이블이 필요하다. 그래서 우리는 MySQL workbench를 사용해서 Schema에 테이블을 생성할 것이다. 1. MySQL Workbench를 사용해서 MariaDB 들어가기 pw 123456 여기서 board가 바로 스키마이다. 2. 스키마에 테이블 만들기 id : 게시글의 고유한 번호를 가진다 title : 제목 ..

WEB/SpringBoot 2024.03.09

[SpringBoot] 5.2 Create a Project_Show "Hello World" on the localhost page (JAVA file)

1. Controller 만들어주기 2. Controller 안에 Java Class 만들어주기 3. 스프링이 이곳이 Controller라는 것을 알 수 있게 annotation 지정해주기 4. 안에 method 만들어주기 Getmapping은 localhost 8080이다. 그 주소("/" 경로)로 들어갔을 때, ResponseBody를 한다. ResponseBody는 이제 아래 있는 이 글자를 그대로 띄어줄 수 있게 해주는 annotation이다 package com.study.board.controller; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping;..

WEB/SpringBoot 2024.03.09