전체 글87 [Spring] Spring security https://spring.io/guides/gs/securing-web/ Securing a Web Applicationthis guide is designed to get you productive as quickly as possible and using the latest Spring project releases and techniques as recommended by the Spring teamspring.io 가이드 따라 하기🙄 1. 프로젝트 생성 2. Create an Unsecured Web Application2.1 먼저 template하위에 home.html, hello.html생성 2.2 메인패키지?안에 MvcConfig생성package com.spring.security.. 2021. 6. 10. [Database] caching_sha2_password 오류 root계정에 password비밀번호로 접속했을 때 mysql command line client 나 cmd에서 mysql/bin폴더에서 로그인 후에 아래 sql문 입력한다.alter 'root'@'localhost' identified with mysql_native_password by 'password';'작은따옴표' 잘보고 붙여주기 2021. 6. 6. [Spring] 예외처리 500에러같은거 뜨면 사용자입장에서는 에러메시지의 뜻을 몰라서 당황할수있으니에러가뜰때 jsp응답결과 화면을 만들어 브라우저로 전달하게 하는 것 @ExceptionHandler@ExceptionHandler(ArrayIndexOutOfBoundsException.class)public String exception1(){ return "error1";}컨트롤러 안에 있음. 컨트롤러마다 만들어줘야함.오류 종류별로 .class붙혀서 사용할 수 있음 Global Exception Handler@ControllerAdvicepublic class GlobalExceptionHandler extends RuntimeException{ @ExceptionHandler(java.lang.NullPointerExcep.. 2021. 6. 3. [Project2][Springboot] ResponseEntity id를 프런트에서 받아 axios로 put 문법을 써서 백엔드로 보내면 url과 put을 찾아서 컨트롤러에서 실행하는 과정이다. ResponseEntity 자바독https://docs.spring.io/spring-framework/docs/current/javadoc-api/ Spring Framework 5.3.7 API docs.spring.io 2021. 5. 28. [Project2][React] service // eslint-disable-next-lineimport axios from 'axios';const GOODS_API_BASE_URL = "http://localhost:8080/api/v1/goods";class GoodsService{ getGoods(){ return axios.get(GOODS_API_BASE_URL); } createGoods(goods){ return axios.post(GOODS_API_BASE_URL, goods); } getGoodsById(goodsId){ return axios.get(GOODS_API_BASE_URL+'/'+goodsId); } updateGoods(goodsId, upd.. 2021. 5. 28. [Project2][React] 컴포넌트 아래와 같이 컴포넌트들이랑 js파일 생성해준다. 스프링에서 썼던 타일즈는 설정과 문법이 어려웠는데 리액트 컴포넌트를 사용하면 쉽게 사용할 수 있다.App.js// eslint-disable-next-lineimport './App.css';import {BrowserRouter as Router, Route, Switch} from 'react-router-dom';import ListGoodsComponent from './components/ListGoodsComponent';import HeaderComponent from './components/HeaderComponent';import FooterComponent from './components/FooterComponent';import C.. 2021. 5. 28. 이전 1 2 3 4 5 6 ··· 15 다음