전체 글

안녕하세요 ?
카테고리 없음

CodeMirror

codeMirror쓸일은 없을것 같지만 , 그래도 그만큼 다음에 쓴다면 까먹을 것 같아서적는다라이브로 코딩하는데 과 같은 태그를 예쁘게 보여주는 것이고 나는 jsp 웹에서 실습용으로 만들기 위해 썼다. 이렇게라도 하지 안흔다면 가독성이 안좋아서 굳이 웹에서 할 이유가없기 때문이다. codeMirror는 100개의 언어를 지원한다고 한다. http://codemirror.net/codemirror.zip 에서 다운받을 수 있으며 mode에 여러가지 언어가 있다. index.html을 열어보면 쉽게 따라 할 수가 있는데, 나는 처음에 이걸몰라서 유튭보고 따라했다 ㅠ theme에는 드라큘라, 이클립스 같은 테마가 있다. addon 에는 여러가지 기능을 추가할 수 있는데 hint 같은 경우, 자동완성 을 할수있..

카테고리 없음

심각: Allocate exception for servlet appServlet org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean found for dependency [com.jsp.service.JspService]: expected at least 1 bean which qualifies as autowire candidate. Depe..

심각: Allocate exception for servlet appServletorg.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean found for dependency [com.jsp.service.JspService]: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.inject.Inject()} inject오류 걸리면 @Service, @Repository 어노테이션 확인하자 root-context.xml 의 되있는지 확인

카테고리 없음

script로 form 전송하기

console.info("Hello"); 홈페이지를 만들다보면 form을 전송하는 경우가 많다. 이 때, form들이 중복되는 코드가 많을 경우에는 어떻게 할까? script를 이용하자. console.info("Hello");/*-------JSP-----------------------*/ ModifyREMOVEGO LIST

카테고리 없음

Spring에서 Resource 실시간반영하기

학교에서 프로젝트하다가 오른쪽에 iframe을 프로젝트파일의 jsp를 받아오는데 이게 톰켓위에 처음에 올라간게 계속 뜬다 왼쪽에껄 submit하면 오른쪽에 반영이 되야하는데 수작업으로 리프레시를 해줘야 그때 정상작동을해서 실시간반영하는 법을 찾아보았다. 사실 이건 자바기반 웹어플리케이션의 큰 단점이다.. 정적파일(html,javascript,css)를 수정하고나면 서버를 재시작해야한다. 노드나 루비로 개발했다면 이런문제는 생각도 안해도 된다. 뭐 클래스같은경우에는 JRebel이나 에서의 reloadable="true"를 이용하라는 말이 나오는데 .jsp파일은 이미지파일처럼 그냥 리소스를 변환시키는거라 간단한것 같다. 그냥 실행중인 톰캣위치에 .jsp파일만 옮겨주면되네. 아니 이거 톰캣실행시에 .jsp를 ..

카테고리 없음

한글 깨질 때

1.jsp utf-8인지 확인 2.web.xml에 필터추가 encodingorg.springframework.web.filter.CharacterEncodingFilterencodingUTF-8encoding/* 3.AJAX 이용시 @RequestMapping() 에 produces 추가 (charset 앞에내용은 Content-Type이 들어감)@RequestMapping(value = "/r", method = RequestMethod.POST, produces="text/html; charset=utf8") 아니면 AJAX 헤더에 charset=UTF8 추가 $.ajax({ type : 'post', url : '/r', headers : { "Content-Type" : "text/html; ch..

카테고리 없음

sts 쓸때 초기 설정해야할 것

project facets java 1.8 변경 pom.xml 수정 자바 1.8 properties 변경스프링 버전 properties변경junit 버전 4.12서블릿api 버전 3.1javax.servletjavax.servlet-api3.1.0 org.mybatismybatis org.mybatismybatis-spring org.springframeworkspring-jdbc org.springframeworkspring-test mysqlmysql-connector-java root-context.xml에 DataSource 설정 , sessingFactory와 연결 resources/mybatis-config.xml 추가 log4jdbc-log4j2 org.bgee.log4jdbc-log4j2l..

카테고리 없음

스프링 addAttribute addFlashAttribute 차이점 (RedirectAttributes rttr) / 리다이렉트

addAttribute와 addFlashAttribute의 차이점 addAttribute는 삭제를 했을 때 url 을 보자. redirect는 list까지다. 근데 page , perPageNum, searchType, keyword 가 뒤에 따라 붙었다. rttr.addAttribute 때문에 붙은 것이다. rttr.addAttribute로 전달한 값은 url뒤에 붙으며, 리프레시해도 데이터가 유지된다. rttr.addFlashAttribute로 전달한 값은 url뒤에 붙지 않는다. 일회성이라 리프레시할 경우 데이터가 소멸한다.또한 2개이상 쓸 경우, 데이터는 소멸한다. 따라서 맵을 이용하여 한번에 값전달해야한다.

카테고리 없음

에러 원인

ERROR: org.springframework.web.context.ContextLoader - Context initialization failedorg.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'boardServiceImpl': Unsatisfied dependency expressed through field 'dao'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean found for dependency [org.zerock.persist..

bactoria
Bactoria