simple-homepage

simple-homepage Boot Template

eGovFrame Spring Boot
simple-homepage

Boot 전환 템플릿

홈페이지 접근 주소: http://localhost:8080/sht_webapp/cmm/main/mainPage.do


수정 내용

파일내용비고
context-common.xmlMultipartResolver 타입의 빈이 2개에 대한 primary=“true” 처리에러처리
egov-com-servlet.xmlresources로 복사boot에서 파일을 인식
application.properties 생성context 경로 처리
빈 등록시 중복처리 해결
설정추가
pom.xmlboot관련 설정 추가설정추가
EgovBootApplication.javaBoot 기동설정설정추가

EgovBootApplication.java

package egovframework;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ImportResource;

@SpringBootApplication
@ImportResource({"classpath:/egovframework/spring/com/context-*.xml"
        ,"classpath:/egovframework/spring/springmvc/egov-com-servlet.xml"})
public class EgovBootApplication {
    public static void main(String[] args) {
        SpringApplication.run(EgovBootApplication.class, args);
    }
}

pom.xml 주요 설정

<!-- spring Boot Parent 설정 -->
<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.7.18</version>
</parent>

<!-- ... 생략 ... -->

<!-- spring-boot-maven-plugin -->
<plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
    <configuration>
        <executable>true</executable>
    </configuration>
</plugin>