Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- 1차원 DP
- 2차원 dp
- 99클럽
- @BeforeAll
- @BeforeEach
- @Builder
- @Entity
- @GeneratedValue
- @GenericGenerator
- @NoargsConstructor
- @Query
- @Table
- @Transactional
- Actions
- Amazon EFS
- amazon fsx
- Android Studio
- ANSI SQL
- api gateway 설계
- api gateway 필터
- ApplicationEvent
- argocd
- assertThat
- async/await
- AVG
- AWS
- aws autoscaling
- aws eks
- AWS KMS
- aws vpc peering
Archives
- Today
- Total
기록
Spring/Jsp 사용설정 본문
프로젝트 생성
파일구조
build.gradle
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
annotationProcessor 'org.projectlombok:lombok'
providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
// jsp
implementation 'org.apache.tomcat.embed:tomcat-embed-jasper'
implementation 'javax.servlet:jstl'
}
HomeController
@Controller
public class HomeController {
@RequestMapping(value = "/", method = RequestMethod.GET)
public String home(){
return "index";
}
}
application.properties
spring.mvc.view.prefix: /WEB-INF/views/
spring.mvc.view.suffix: .jsp
#JSP수정시 서버 재시작없이 바로 적용될 수 있게 설정
server.servlet.jsp.init-parameters.development=true
index.jsp
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<body>
<h1>hello</h1>
</body>
</html>
결과
'Web > Spring' 카테고리의 다른 글
이미지 처리 및 저장 방법 : 로컬 저장소 업로드/조회/삭제 (0) | 2024.02.05 |
---|---|
API/이미지 처리 및 저장 방법 (0) | 2024.01.29 |
[bug] SpringBoot/The dependencies of some of the beans in the application context form a cycle (0) | 2023.12.13 |
Spring Boot와 JPA를 활용한 커스텀 아이디 생성 전략 구현 (0) | 2023.10.31 |
Spring/Feign API로 외부 RESTful API 호출하기 (0) | 2023.08.07 |
Comments