Spring 썸네일형 리스트형 [Spring] Loading desciptor for ~ 에러 스프링으로 게임프로젝트를 개발하던 중DB를 폴더화 시키니 다음과 같은 에러가 발생했습니다. 디테일을 읽어보니 An internal error occurred during: "Loading descriptor for gameProject.". org.eclipse.emf.ecore.xmi.FeatureNotFoundException: Feature 'multipart-config' not found. (platform:/resource/gameProject/src/main/webapp/WEB-INF/web.xml, 41, 19) Web.xml의 multipart-config가 없다는 내용이었습니다. 구글링을 해보니 multipart-config는 web-app viersion 3.0 이상부터 지원된는 것.. 더보기 [Spring] MyBatis MyBatis는ORM(Object Relationship Mapping)이라고하는데객체와 관계형 데이터베이스를 연결해주는 Framework입니다.결과를 자바 객체로 내보내주는데자동으로 연결해주기 위한 객체는 DB컬럼명 = Java멤버변수명(조건) 이 선행 되어야합니다. 한편, Spring MVC는 요청파라미터를 자동으로 객체로 보낼 수 있습니다.그때의 조건은 요청파라미터명 = Java의 멤버변수명(조건)이기 때문에 결과적으로Spring MVC + Maven + MyBatis를 사용하기 위해서는요청파라미터명과 Java멤버변수명, DB컬럼명이 모두 같아야합니다. Oracle의 number 자료형은 정수, 실수도 받을 수 있었기 떄문에Java에서도 정수, 실수를 모두 포함하는 자료형인BigDecimal을 사용.. 더보기 [Spring] Singleton 두 값을 입력받아서 form으로 post요청을 보낸 뒤두 값을 더한 값과 계산 횟수를 콘솔에 출력하려고합니다. form action = "calculate.do" method = "post">table> tr> td>이름: input name="n" placeholder = "name" autofocus = "autofocus">td> tr> tr> td>X: input name="x" placeholder = "X" autofocus = "autofocus">td> tr> tr> td>Y: input name="y" placeholder = "Y" autofocus = "autofocus">td> tr> tr> td>button>버튼button>td> tr>table>form> j.. 더보기 [Spring] POST요청 index.jsp에 다음과 같은 코드가 있다고 가정합시다.form button태그를 사용하는데 값을 입력하고 버튼을 누르면calculate.do라는 주소에 post요청을 보내게 됩니다. Spring에서는 위와같은 POST 요청이 들어올 때 어떻게 처리하는지 알아봅시다.@RequestMapping(value = "calculate.do", method = RequestMethod.POST) public String calcXY(@RequestParam(value="n") String n, @RequestParam(value="x") int x, @RequestParam(value="y") int y) { System.out.println(n); .. 더보기 [Spring] Autowired Autowired 어노테이션을 사용하면생성자와 setter가 필요없이 해당 기능을사용할 수 있습니다. 이 Autowired를 사용하려면beans.xml파일의beans태그 속성에context관련 내용을 추가해야합니다. http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-b.. 더보기 [Spring] Bean Bean은 Java의 객체를 외부에서 생성하는 방법입니다.프로그램 실행 속도는 느려질 수 있지만,관리와 유지보수가 편해진다는 장점이 있습니다. package com.puft.feb101; public class Dog { private String name; private int age; public Dog() { } public Dog(String name, int age) { super(); this.name = name; this.age = age; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getAge(.. 더보기 이전 1 2 3 다음