본문 바로가기

전체 글

(171)
스프링 시큐리티(Spring Security) 커스텀 폼으로 제이쿼리div로 로그인 정보 전송하기 + 제이쿼리(jQuery) 시큐리티가 form 데이터 전송 밖에 못받는건지.. 아직 아는게 많이 없어서 야매로 전송 하기로 했다 .html // 기존 로그인 폼 ID PW Log-in // 실제 데이터 전송 폼 (실제 데이터 전송하는걸 숨겨서 만듬) //name 은 .usernameParameter,.passwordParameter시큐리티 설정이랑 맞춘다 .script function fn_loginSubmit() { //url은 시큐리티 .loginProcessingUrl 랑 맞춤 $('#LoginPageForm').attr('action', '/login_pro_do'); //pc // 윗쪽 데이터 값을 가져옴 $("#username").val($("#userId").val()); $("#password").val($("#us..
A bean with that name has already been defined in class path 문제 해결하기 SecurityConfiguration을 작성하던 중에 에러가 발생했다. authenticationManagerBean이 중복선언되었다는 내용이다. 열심히 오버라이딩을 할 방안을 찾다가 action에 있는 문구를 발견했다. Action: Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true. spring.main.allow-bean-definition-overriding=true 그래서 application.yml로 가서 spring. 밑에 아래와 같은 내용을 추가했다. properties 인경우 spring.main.allow-bean-defin..
[React] 4. React 컴포넌트(5) - map() 반복문, 배열 컴포넌트 4. React 컴포넌트(5) - map() 반복문, 배열 컴포넌트 사용하기 이번 포스팅은 [ React 반복문 사용하기 ] 입니다. : ) https://ko.reactjs.org/docs/lists-and-keys.html 0. 들어가기 앞서 - 어떨때 map 함수를 쓰면 좋을까? 앞으로 알아가겠지만 for문, 반복문을 대체하여 사용한다면 아주 유용하다. 간단히 형태 살펴보고 자세히 알아보도록 하자. ex) for문 const numbers = [1, 3, 5] for (let i = 0; i < numbers.length; i++) { console.log(numbers[i]) } ex) map() const numbers = [1, 3, 5]; const listItems = numbers.map..
[React] 4. React 컴포넌트(4) - 이벤트 처리 방법 4. React 컴포넌트(4) - 이벤트 처리 방법 이번 포스팅은 [ React에서 이벤트 handling 하는 방법 ] 입니다. : ) 1. 컴포넌트에서 DOM 이벤트 사용 - 컴포넌트에서 출력된 특정 DOM 객체에 이벤트 컴포넌트가 동작하기 위해선 DOM이벤트 프로퍼티를 사용해야 한다. - 우리가 흔히 쓰고 있는 HTML 엘리먼트의 이벤트들은 JSX내에서 'on + 이벤트명' 형태의 프로퍼티로 제공된다. ex) 프로퍼티 샘플 이벤트 명 JSX DOM 이벤트 프로퍼티 이벤트 호출 시점 click onClick 엘리먼트에 마우스나 키보드가 클릭 된 경우 change onChange 엘리먼트의 내용이 변경된 경우 submit onSubmit 폼의 데이터가 전송될 때 keydown onKeyDown 키보드 ..
template might not exist or might not be accessible by any of the configured Template Resolvers 화면 템플릿을 찾지 못했다 는 에러 템플릿 이름을 잘 살펴보거나 경로를 맞춰줘야 한다 나같은 경우에는 Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exce ption [Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: Error resolving template [/fragment/header], template might not exist or might no t be accessible by any of the configured Template Resolvers (template: ..
[Error] jdbcUrl is required with driverClassName. defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans .BeanInstantiationException: Failed to instantiate [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean]: Factory method 'entityManagerFactory' threw exception; nested exception ..
[intellij] 그래들 스프링부트 프로젝트 화면으로 데이터 가져오기(gradle + springboot) - 4 이번 글에서는 화면에서 디비에 접근해서 데이터를 가져와보려 합니다. 데이터는 임시로 넣어놨습니다 테스트를 위한 버튼 메인 페이지 입니다. gogo ++ ajax 사용법 더보기 $.ajax({ type: "post", global: true, async: true, url: "ajax_request.php", dataType : "html", timeout: 30000, cache: true, data: {"id":"1", "mode":"write"}, contentType : "application/x-www-form-urlencoded; charset=utf-8", error: function (jqXHR, textStatus, errorThrown) { // 통신에 에러가 있을경우 처리할 내용(생략가..
[intellij]그래들 스프링부트 프로젝트 쿼리 적용 해보기(gradle + springboot) - 3 이번 글은 디비에 접근하는 코드 입니다. mybatiseconfig 다시 셋팅 여기서 이걸로 변경해 준다. 마바 콘피그 셋팅은 다른 곳에서 참고한거라 정확히 알진 못하지만 basePackages 에 패키지명만 신경써주면 될것 같다 package com.example3.demo3.config; import org.apache.ibatis.session.SqlSessionFactory; import org.mybatis.spring.SqlSessionFactoryBean; import org.mybatis.spring.SqlSessionTemplate; import org.mybatis.spring.annotation.MapperScan; import org.springframework.beans.facto..