본문 바로가기
반응형

전체 글149

[Mac] ERROR! MariaDB is not running 다음 명령어에서 에러가 났다. MacOS에서 Homebrew를 사용하여 mariadb를 설치했을 경우 mysql.server [명령어]가 아닌 brew services [명령어] mariadb를 사용해야했다. 다음과 같은 명령어를 사용한다. # mariadb 서버 시작 brew services start mariadb # mariadb 서버 중단 brew services stop mariadb # brew services 상태 보기 brew services list Reference: Homebrew Documentation brew(1) – The Missing Package Manager for macOS (or Linux) https://docs.brew.sh/Manpage#services-subc.. 2022. 12. 10.
[MYSQL] 서버 시작, 재시작 Mac Mac MySQL 서버 시작 mysql.server start MySQLl 서버 재시작 mysql.server restart 2022. 12. 10.
Java 객체지향 프로그래밍(Object Oriented Programming)이란 객체지향 프로그래밍(Object Oriented Programming)란(What): 객체지향 프로그래밍이란 객체에 역할을 부여하고 책임을 할당함으로 인해 협력관계를 만드는 것이다. 객체지향 프로그래밍(Object Oriented Programming)을 하는 이유(Why): 유지보수하기 좋은 코드를 짜기 위해서 새로운 요구사항이 생겼을 때 코드를 쉽게 변경하기 위해서 객체지향 프로그래밍(Object Oriented Programming)을 하는 방법(How): 객체에 역할을 부여하고 책임을 할당함으로 인해 협력관계를 만들기 위해서 3가지 과정으로 나누어보았다. 1. 시나리오를 짠다. 예를 들어, 음식점에 고객이 가서 한식 메뉴에 있는 순대국을 주문하는 시나리오를 짠다. 2. 역할(Role), 책임(Re.. 2022. 12. 10.
[MySQL] my.cnf 위치 찾기 (for port 변경) Mac MySQL port 변경하기 위해 my.cnf 파일을 열어야한다. 그런데 위치 찾기가 어려웠다 ㅠ Mac 터미널에서 다음 명령어로 찾을 수 있었다. mysqld --verbose --help | grep -A 1 'Default options' /opt/homebrew/etc/my.cnf 에 있었다. /opt/homebrew/etc로 이동 후 vi로 my.cnf 파일을 열고 맨아래에 port 번호를 적고 :wq로 저장후 종료하면 된다 my.cnf.default 파일에도 port를 적는다. 노트북을 재시작 후 터미널에서 mysql 서버 상태를 확인한다. mysql server status port 부분에 3307로 변경된 것을 확인할 수 있다. 2022. 12. 9.
What is DI(Dependency Injection), Why & How to use What DI(Dependency Injection): DI(Dependency Injection) is a core programming model supported by Spring Framework. Dependency is that one object uses another object. (depends on = uses) For example, if a QuestionController object uses a QuestionService object, The QuestionController object depends on the QuestionService object. public class QuestionController { private QuestionService questionSe.. 2022. 12. 9.
What is Dispatcher-Servlet, Why & How to use What is Dispatcher-Servlet: Dispatcher-Servlet is important in Spring MVC. Dispatcher-Servlet first gets client's requests and sends them to corresponding controller. Dispatcher-Servlet is called Front Controller. Why use Dispatcher-Servlet : To process common codes in each controller. To get all client requests using only a single dispatcher-servlet Don't have to use servlet in other controller.. 2022. 12. 8.
Dispatcher-Servlet(디스패처 서블릿) Dispatcher-Servlet이란(What): Dispatcher-Servlet은 Spring MVC에서 핵심이다. Dispatcher-Servlet은 클라이언트에서 들어오는 요청을 가장 먼저 처리하여 해당 컨트롤러에 전달한다. 프론트 컨트롤러(Front Controller)라고도 한다. Dispatcher-Servlet 사용하는 이유(Why): 디스패처 서블릿으로 인해 각 컨트롤러에 있는 공통 코드에 대해서 처리가 가능하다. 디스패처 서블릿 하나로 모든 클라이언트 요청을 받을 수 있기 때문 -> 들어오는 요청을 한 곳에서 다 받음 -> 편리함 디스패처 서블릿을 제외한 나머지 컨트롤러는 서블릿을 사용하지 않아도 되기 때문 Dispatcher-Servlet 사용하는 방법(How): 1. FrontCon.. 2022. 12. 8.
Spring DI(Dependency Injection, 의존성 주입) DI란(What): 의존성 주입(DI)은 Spring Framework에서 지원하는 핵심 프로그래밍 모델이다. 의존성이 있다는 말은 한 객체가 다른 객체를 사용할 때 의존성이 있다고 한다. (의존한다 = 사용한다) 예를 들어, QuestionController 객체가 QuestionService를 사용하고 있는 경우, QuestionController가 QuestionService에 의존성이 있는 것이다. public class QuestionController { private QuestionService questionService; 의존성 주입이란 두 객체 간의 관계를 맺어주는 것이다. 객체를 직접 생성하는 것이 아닌 외부에서 객체를 생성 후 주입시켜준다. 의존성 주입에는 여러가지가 있다. 생성자 .. 2022. 12. 7.

반응형
반응형