Coder Social home page Coder Social logo

board's Introduction


1. 프로젝트 버전
spring-boot : 2.7.5
java : 17
mysql : 8.0.29
lombok : 1.18.24

2. 참고 출처
<점프 투 스프링부트>
https://wikidocs.net/book/7601

3. 프로젝트 설명
토이 프로젝트의 일환으로 나만의 자료실을 만들어 보았습니다.

ERD 입니다.


이 프로젝트의 메인 페이지 입니다.



카테로기 세부 내역의 페이지 처리 밑 검색기능이 있습니다.



회원가입 기능이 있으며 유저admin으로 구분 됩니다.



게시글 작성 페이지
카테고리 선택,제목, 내용, 파일 첨부칸이 있습니다. 내용부분은 summernote를 가져왔습니다.

<meta name="_csrf" th:content="${_csrf.token}"/>  
<meta name="_csrf_header" th:content="${_csrf.headerName}"/>  
    
    function uploadSummernoteImageFile(file, editor) {
		var token = $("meta[name='_csrf']").attr("content");
		var header = $("meta[name='_csrf_header']").attr("content");
		
		console.log(token)
		data = new FormData();
		data.append("file", file);
		$.ajax({
			data : data,
			type : "POST",
			url : "/question/summernote",
			contentType : false,
			processData : false,
			beforeSend : function(xhr){
				xhr.setRequestHeader(header, token);
			},
			success : function(data) {
            	//항상 업로드된 파일의 url이 있어야 한다.
				$(editor).summernote('insertImage', data);
			}
		});
	}

시큐리티 사용 시 ajax로 파일을 보내려면 csrf토큰을 해더에 추가해 줘야 합니다.



게시글의 상세 페이지 입니다.



4. 외부 라이브러리
<jquery> : 3.5.1
<summernote> : 0.8.18
<bootstrap> : 3.4.1


board's People

Contributors

consr2 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.