JAVA 헛다리 (3) 썸네일형 리스트형 스프링부트 구조&설정 (mybatis ( XML ) + dto + jsp) 스프링부트 구조&설정 (mybatis ( XML ) + dto + jsp) src └── main ├── java │ └── com.example.demo │ ├── controller # 컨트롤러 (HTTP 요청 처리) │ ├── dto # DTO (Data Transfer Object) │ ├── mapper # MyBatis Mapper (SQL 쿼리 정의) │ ├── service # 서비스 (비즈니스 로직 처리) │ └── DemoApplication.java # Spring Boot 애플리케이션 엔트리 포인트.. 스프링부트 throw new IllegalStateException("msg"); - php exit; 스프링부트 throw new IllegalStateException("msg"); - php exit; 기능 // 로그인 상태 체크 → 비로그인 시 리다이렉트 public void check_auth_info() throws IOException { if (!isLoggedIn()) { // 로그인 페이지로 리다이렉트 response.sendRedirect(request.getContextPath() + "/login/loginForm"); throw new IllegalStateException("비로그인 사용자 접근 차단"); } } 스프링부트 sts4 - redis 설정(세션외부저장) 스프링부트 sts4/maven - redis 설정일반적으로 redis 은 분산서버의 세션을 공유하기위해 사용한다.java코드 바뀔때마다 프로젝트 어플리케이션이 재시작 되면서 로그인 풀리는게 짜증나서 진행함. https://huningyo.tistory.com/350 centos7 Redis 설치centos7 Redis 설치//epel-release 설치 (Redis 패키지 위해 필요)sudo yum install epel-release -y//Redis 설치sudo yum install redis -y//Redis 서비스 시작 및 부팅시 자동 시작 설정sudo systemctl start redissudo systemctl enable rehuningyo.tistory.com Maven .. 이전 1 다음