반응형
반응형
다중 도메인을 사용하는 스프링 프로젝트 구조를 살펴보고, Host 헤더를 통한 경로 분기 처리 방법을 알아보겠습니다.프로젝트 개요이 프로젝트는 하나의 스프링 애플리케이션에서 세 가지 다른 도메인을 처리합니다:admin.example.com: 관리자 전용 페이지customer.example.com: 고객용 페이지gtc.example.com: GTC(Global Trading Center) 페이지개발 환경 접속 주소로컬에서 개발 시 다음 URL로 각 서비스에 접근할 수 있습니다:domain router 적용 : http://localhost:8888/관리자: http://localhost:8888/admin/dashboard대고객: http://localhost:8888/go-customerGTC: http..
1. 의존성 다운로드 방법기본 명령어# 모든 의존성을 offline-repo 폴더에 다운로드mvn dependency:go-offline -Dmaven.repo.local=./offline-repo플러그인과 소스코드도 함께 다운로드# 플러그인과 소스코드까지 모두 다운로드mvn dependency:resolve-plugins dependency:resolve -Dclassifier=sources -Dclassifier=javadoc -Dmaven.repo.local=./offline-repo2. 로컬 JAR 파일 처리두 개의 로컬 JAR 파일(Dataconverter.jar, RelaySocket.jar)은 별도로 복사해 두어야 합니다.# 로컬 JAR 파일 복사mkdir -p ./offline-repo/l..
프로젝트 구조 build.gradle buildscript { repositories { mavenCentral() } dependencies { classpath "gradle.plugin.com.ewerk.gradle.plugins:querydsl-plugin:1.0.10" } } plugins { id 'java' id 'war' id 'org.springframework.boot' version '2.7.14' id 'io.spring.dependency-management' version '1.1.2' id 'com.ewerk.gradle.plugins.querydsl' version '1.0.10' // Querydsl 플러그인 추가 } group = 'com.naya' version = '0..
JAVA 11 사용 build.gradle plugins { id 'java' id 'war' id 'org.springframework.boot' version '2.7.14' id 'io.spring.dependency-management' version '1.1.2' } group = 'com.naya' version = '0.0.1-SNAPSHOT' java { sourceCompatibility = '11' } configurations { compileOnly { extendsFrom annotationProcessor } } repositories { mavenCentral() } dependencies { implementation 'org.springframework.boot:spring..
Java 파일과 thymeleaf 템플릿 html 파일수정시 새로고침 없이 자동으로 리로드 되는 방법을 소개합니다. mac : cmd + shift +a window : ctrl + shift +a registry 검색 후 compiler.automake.allow.when.app.running 체크 setting > Build, Execution, Depoyment >Compiler Build project automatically 체크 resources > application.yml server: port: 8080 spring: datasource: driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy url: jdbc:log4jdbc:mysql:/..