본문 바로가기

국비교육103

국비교육 73일차 1.어제 내용 복습SpringWeb / WebContext /WEB-INFStep01 = 설정 파일 MVC패턴ⓐ web.xml = = applicationContext.xml (beans를 가장 먼저 로딩) = ⓑ applicationContext.xml = beans, model을 연동하기 위한 파일ⓒ dispatcher-servlet-xml = view 2.MVC 설계 ⓐ Class를 패키지별로 구현 ⓑ Controller / Modelⓒ Beans에 등록 - src : class- WebContent : 가상의 디렉토리이며 하위에 url로 매핑할 수 있는 view 파일들을 관리한다.- WebContent/META-INF : 현재 프로젝트 기본 정보, Context.xml - JNDI- WebCont.. 2019. 3. 21.
국비교육 72일차 1. 1) JDBC (SimpleDriverDataSource로 db를 연결하고 javax.sql.DataSource로 값 대입)2) Spring JDBC (dataSource로 db를 연결하고 JDBCTemplate으로 CRUD를 한다) org.springframework.jdbc.datasourceorg.springframework.dao.support.DaoSupport 3) ORM ⓐ beansⓑ resourceⓒ spring java Source 가. 2+ⓐ나. 2+ⓑ다. 2+3+ⓐ+ⓑ 2.driverClassName은 주의할 것password나 url 등은 setPassword 처럼 쓰이지만, driverClassName은 setDriverClassName으로 쓰임 3. SpringWeb/We.. 2019. 3. 20.
국비교육 71일차 1.config.xml 2. String resource = "org/mybatis/builder/mybatis-config.xml"; InputStream inputStream = Resources.getResourceAsStream(resource); SqlSessionFactoryBuilder builder = new SqlSessionFactoryBuilder(); SqlSessionFactory factory = builder.build(inputStream); 3.@Insert@Update@Delete@SelectMethodEach of these annotations represents the actual SQL that is to be executed. They each take an ar.. 2019. 3. 19.
국비교육 70일차 1.JDBC 종류 ⓐ Java(JDBC) ⓑ Spring(JDBC)ⓒ ORM 환경설정ⓐ Spring bean.xmlⓑ db속성파일(my.properties)ⓒ 스프링소스로 ORM - 속성파일(configuration.xml(환경설정), mapper.xml(CRUD 코드)) 2.에서 매개체를 주지 않으면 위의 property와 같다고 생각한다.그래서 자동으로 당겨온다. 3. 4.SqlSessionFactoryBuilder : ⓐ 환경설정과 Mapper(CRUD, 1개이상)를 읽어온다. SqlSessionFactoryⓐ Mapper를 하나의 객체 단위로 관리한다.SqlSessionⓐ Mapper 객체를 id(CRUD 객체)로 찾아온다. 5. 2019. 3. 18.
국비교육 69일차 1. Class AspectJExpressionPointcutAdvisor JoinPoint를 인식해주는 클래스 2.AOP에서 가장 중요한 것 : 횡단 관심 3.Proceed를 한 시점을 Pointcut이라고 한다. 4.1) 결합점(Join Point) : 인스턴스의 생성시점. 메소드를 호출하는 시점. Exception이 발생하는 시점과 같이 애플리케이션이 실행될 때 특정 작업이 실행되는 시점을 의미 2) 교차점(PointCut) : 충고가 어떤 결합점에 적용되어야 하는지 정의. 명시적인 클래스의 이름 3) 충고 : 충고는 교차점에서 지정한 결합점에서 실행(삽입)되어야 하는 코드. Aspect의 실제 구현체 4) Aspect : AOP의 중심단위. Advice와 PointCut을 합친 것이다. 구현하고자.. 2019. 3. 15.
국비교육 68일차 1.sample01 : injection 구현- MTest.java(main)- Nic_name.java- Nic_namePrn.java- applicationContext.xml sample01.anno : Injection을 @로 변경 sample02 : @Autowired를 has a 관계에 멤버로 지정한 다음 beans.xml에서 값전달을 확인 sample03 : sample05 : @Resource 연동확인* Spring의 @autowired, @Component는 ID로 관리된다.- @Resource : javax.annotation- @Autowired : org.springframework.bean.factory- @Qualifier : 어떤 클래스를 @Autowired 하는지를 지정하는 .. 2019. 3. 14.