처음엔 자동 리로드 잘 되다가 갑자기 안되고 여러가지 설정을 셋팅해도 안될때
확장팩에 문제가 있는 듯....
build.gradle
plugins {
id 'java'
id 'war'
id 'org.springframework.boot' version '3.1.0'
id 'io.spring.dependency-management' version '1.1.6'
}
group = 'com.coforward'
version = '0.0.1-SNAPSHOT'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-devtools'
// implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:3.0.0'
implementation 'com.fasterxml.jackson.core:jackson-databind'
implementation 'org.springframework.boot:spring-boot-starter-websocket'
implementation 'jakarta.websocket:jakarta.websocket-api'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
//providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
implementation 'org.springframework.boot:spring-boot-starter-tomcat'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
// runtimeOnly 'mysql:mysql-connector-java:8.0.25'
}
tasks.named('test') {
useJUnitPlatform()
}
application.properties
# spring.datasource.url=jdbc:mysql://localhost:3306/test
# spring.datasource.username=root
# spring.datasource.password=newpassword
# spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
# mybatis.mapper-locations=classpath:/mapper/*.xml
# mybatis.type-aliases-package=com.coforward.relay.model
spring.application.name=relay
spring.devtools.restart.enabled=true
spring.devtools.livereload.enabled=true
spring.devtools.restart.additional-paths=src/main/java
# logging.level.root=INFO
# logging.level.com.coforward.relay.config=DEBUG
spring.thymeleaf.cache=false
spring.thymeleaf.check-template-location=true
spring.thymeleaf.enabled=true
spring.thymeleaf.prefix=classpath:/templates/
spring.thymeleaf.suffix=.html
spring.output.ansi.enabled=always
- Spring Boot Tools 설치
- Language Support for Java 삭제한다.
- >clean java
- cancel
- vscode 종료후 재실행
- main 폴더 내의 클래스 파일을 하나 연뒤 터미널 콘솔 열어 아래 명령어 입력
- ./gradlew bootRun
- Language Support for Java 다시 설치 restart 누르지말고 vscode 재실행
'프로그래밍 > Java' 카테고리의 다른 글
전문 mymq 릴레이소켓 연결시 이슈 (0) | 2024.12.27 |
---|---|
스프링에서 빈(Bean)을 등록하는 두가지 방법 (0) | 2024.12.19 |
spring boot 와 java EE(WebSocket API) 통합 방법 (0) | 2024.12.11 |
[vscode] java17 + springboot3.1 + mysql8 + mybatis3.0 + themleaf (0) | 2024.11.26 |
인텔리제이 2020.3 에서 java 17 -> java 11 spring boot 3 -> 2 (0) | 2024.08.12 |