본문 바로가기

분류 전체보기423

[Spring] 오라클 연결 설정 및 context를 불러오는 과정 처음 실행할때 프로젝트의 web.xml실행 web.xml contextConfigLocation classpath*:*-context.xml dispatcherServlet org.springframework.web.servlet.DispatcherServlet contextConfigLocation classpath*:/spring/servlet-context.xml 1 web.xml에서 servlet-context와 root-context를 불러옴 servlet-context root-context classpath:/main/java/com/mobile/sqlmap/**/*Mapper.xml classpath:/sqlmap/**/*Mapper.xml No qualifying bean of type .. 2021. 12. 3.
[Spring]Dynamic Web Project를 Spring Project로 변경(mybatis 설정) 1. 프로젝트 우클릭 - Configure - Convert to Maven Project Create new POM 창이 나오면 finish를 할경우 WebContent에 pom.xml이 생성된다. pom.xml을 아래 코드와같이 수정 4.0.0 com spring_maven 0.0.1-SNAPSHOT war http://maven.apache.org oracle https://maven.jahia.org/maven2 1.8 5.1.5.RELEASE 1.6.10 1.6.6 jstl jstl 1.2 org.slf4j slf4j-api ${org.slf4j-version} org.slf4j jcl-over-slf4j ${org.slf4j-version} runtime org.slf4j slf4j-log4j.. 2021. 11. 26.
이클립스 STS가 Eclipse Marketplace에서 조회가 안될때 Help - Install New SoftWare에서 Add를 누른다 Location에는 아래 주소에서 링크 확인후 넣는다. http://dist.springsource.com/snapshot/STS/nightly-distributions.html Spring Tool Suite 3 - Nightly builds dist.springsource.com 전체선택 Or 필요한부분만 체크후 다음으로 넘어간다. 2021. 11. 26.
중첩클래스 사용이유 중첩클래스(NestedClass)는 외부에 선언하는 일반 클래스와 다를바없다. 하지만 중첩클래스를 사용하는 이유는 class의 private에 별다른 제약없이 접근할수있기때문에 사용한다. class OuterClass{ companion object{ private val a = 1 private val d = 2 } private val b = 2 class NestedClass{ private val c = 3 companion object{ private val d = 4 fun getA1() = a fun getA2() = OuterClass.a fun getA3() = OuterClass.Companion.a // 에러 : Unresolved reference: b fun getB() = b /.. 2021. 11. 26.