본문 바로가기

전체 글43

vue import { createRouter, createWebHistory } from 'vue-router'import { useAuthStore } from '@/stores/auth'import LoginView from '@/views/LoginView.vue'import DashboardView from '@/views/DashboardView.vue'import ProfileView from '@/views/ProfileView.vue'const routes = [ { path: '/login', name: 'Login', component: LoginView, meta: { requiresAuth: false, hideNavbar: true } .. 2025. 8. 6.
jwt3 import { defineStore } from 'pinia'import { ref, computed } from 'vue'import axios from 'axios'import { useRouter } from 'vue-router'export const useAuthStore = defineStore('auth', () => { // 상태 (State) const user = ref(null) const token = ref(localStorage.getItem('jwt-token')) const loading = ref(false) const error = ref('') // 계산된 속성 (Getters) const isAuthenticated = computed(() => !!to.. 2025. 8. 5.
테이블 2. Authority 테이블 (권한 테이블)-- 권한 테이블 생성CREATE TABLE authority ( authority_name VARCHAR(50) NOT NULL PRIMARY KEY, description VARCHAR(255) NULL, created_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, COMMENT = '사용자 권한 테이블') ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;-- 기본 권한 데이터 삽입INSERT INTO authority (authority_name, description) VALUES ('ROLE_USER', '일반 사용자 권한'),('RO.. 2025. 8. 1.
jwt3.0 2. JWT 유틸리티 클래스 (Spring Boot 3 버전)JwtUtil.javapackage com.example.jwt.util;import io.jsonwebtoken.*;import io.jsonwebtoken.io.Decoders;import io.jsonwebtoken.security.Keys;import jakarta.annotation.PostConstruct;import lombok.extern.slf4j.Slf4j;import org.springframework.beans.factory.annotation.Value;import org.springframework.security.core.Authentication;import org.springframework.security.cor.. 2025. 8. 1.
jwt package com.example.jwt.controller;import com.example.jwt.dto.LoginDto;import com.example.jwt.dto.TokenDto;import com.example.jwt.jwt.JwtFilter;import com.example.jwt.jwt.TokenProvider;import jakarta.validation.Valid;import lombok.RequiredArgsConstructor;import org.springframework.http.HttpHeaders;import org.springframework.http.HttpStatus;import org.springframework.http.ResponseEntity;import or.. 2025. 8. 1.
여름철 맥주 통풍 걱정 끝! 건강한 여름 보내는 통풍 관리법 대공개 여름밤 시원한 맥주 한 잔, 퇴근 후 스트레스를 날려주는 최고의 힐링이죠. 하지만 ‘치맥’의 계절, 여러분의 관절 건강은 안녕하신가요? “맥주만 피하면 괜찮겠지”라는 생각, 정말 맞을까요? 실제로 여름철에는 통풍 환자가 급증하며, 맥주뿐 아니라 모든 술이 통풍 발작을 부르는 원인이 될 수 있습니다. 오늘 포스팅에서는 통풍과 술의 진실, 그리고 건강한 여름을 위한 실천법까지 알려드립니다. 이 글을 끝까지 읽으시면 모든 술이 통풍에 미치는 영향과 과학적 이유, 술 대신 선택할 수 있는 안전한 음료와 식습관, 여름철 통풍 예방을 위한 실천 관리법 QA에 대해서 완벽히 이해하실 수 있습니다.여름철 통풍, 왜 위험할까?여름은 통풍 환자에게 가장 위험한 계절입니다. 땀을 많이 흘리면 체내 수분이 부족해지고, 이로 .. 2025. 7. 7.