본문 바로가기

Spring Framework77

스프링 부트 jar 파일 Error creating bean with name 'entityManagerFactory' defined in class path resource : Invocation of init method failed 에러 해결 아래 내용을 추가하고 mvn packge 를 해보자. 1 2 3 4 5 javax.xml.bind jaxb-api Colored by Color Scripter cs 스프링 부트이기 때문에 버전은 입력하지 않아도 된다 build 부분은 아래처럼 작성하면 된다. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 org.springframework.boot spring-boot-maven-plugin com.example.postgresdemo.PostgresDemoApplication//메인 클래스 위치 true true com.example.postgresdemo//메인 클래스가 있는 패키지 이름 Colored by Color Scripter cs 2018. 11. 23.
스프링 부트 manifest 를 찾을 수 없습니다. 에러 해결 pom.xml 빌드 부분에 아래와 같이 작성하면 된다. 123456789101112131415161718192021222324252627282930313233343536373839404142 org.springframework.boot spring-boot-maven-plugin com.example.postgresdemo.PostgresDemoApplication//메인 클래스 위치 true true com.example.postgresdemo//메인 클래스가 있는 패키지 이름 Colored by Color Scriptercs 이후 mvn package 하면 된다. 2018. 11. 23.
스프링 부트 타임리프 단순 반복문 (for 문) 쓰는 방법 스프링 부트 타임 리프에서 반복문 사용하는 방법 아래 코드처럼 #numbers.sequence ( 1, 5) 이렇게 적으면 된다. 이렇게 작성하면 1부터 5까지 5번 반복을 수행한다. 1 2 3 4 5 6 7 8 9 10 11 12 hello Colored by Color Scripter cs 아래 그림은 html 코드가 나타낸 화면이다. hello 가 5번 출력 된 것을 확인 할 수 있다. 2018. 11. 23.
thymeleaf 타임리프 <a href=javascript 함수에 값 전달하는 방법> </a> 타임 리프에서는 어떻게 javascript 에 값을 전달하는가 아래와 같이 하면 된다. « »​ ​ 이렇게 th:onclick과 함께 작성하면 된다. page는 javascript 함수의 이름이다. ​ 2018. 11. 23.
spring sts thymeleaf 페이지 기본 설정 스프링 부트에서는 웹페이지를 만들 때 .jsp 대신에 thymeleaf 를 많이 사용합니다. 타임리프 페이지는 이렇게 생겼습니다. ( 출처 : https://www.thymeleaf.org/doc/tutorials/3.0/usingthymeleaf.html ) Good Thymes Virtual Grocery Welcome to our grocery store! 파일의 확장자는 .html 입니다. 그런데 spring sts( eclipse ) 에서 html 파일을 생성하면 이렇게 생겼습니다. 저는 웹 페이지를 타임리프로 만듭니다.만약 html 파일을 생성할 때마다 타임리프 형태로 생성되면 참 편리하겠네요. 이렇게 하면 됩니다. Window - Preferences 에 들어갑니다. Web - HTML Fi.. 2018. 11. 22.