본문 바로가기

반응형

분류 전체보기

(305)
Thymeleaf에서 DaisyUI Theme 사용해 보기 이전에 Spring Boot 기반의 프로젝트에서 Thymeleaf와 함께 Tailwind CSS를 사용하는 방법에 대해 소개하였었다. 2023.11.16 - [Study/Java] - Spring Boot + Thymeleaf + Tailwind CSS 사용해보기 DaisyUI 소개 Tailwind CSS가 bootstrap보다 자유도가 높은 대신 많은 설정이 필요하기 때문에 이를 보완하기 위해 Daisy UI를 사용하였다. DaisyUI는 Tailwind CSS기반에서 Bootstrap의 component 단위(Button, Form, Menu 같은...)의 CSS를 제공해 준다. 따라서 Component 단위로는 Tailwind CSS를 사용하면서 그 외의 CSS 설정은 Tailwind CSS를 같이..
Spring의 SpEL 을 custom하게 사용해 보기 Spring은 SpEL (Spring Expression Language)를 제공하고 있다. Spring Expression Language (SpEL) RequestMapping이나 value binding 등 Spring을 사용하는 수많은 부분에 SpEL을 사용할 수 있고 다양한 기능을 지원한다. Literal expressions Boolean and relational operators Regular expressions Class expressions Accessing properties, arrays, lists, and maps Method invocation Assignment Calling constructors Bean references Array construction Inline ..
@ConfigurationProperties를 사용하지 않고 method 내에서 properties의 변수 binding 하기 Spring Boot에서 @ConfigurationProperties를 사용하지 않고 method 내에서 Binder class를 사용해서 environment의 지정된 값들을 지정된 객체에 binding 할 수 있다. Binder class는 Spring Boot 2.0 이후 제공되는 기능이다 property-binding-in-spring-boot-2-0. 다음과 같이 Binder를 사용하여 설정 값을 binding 할 수 있다: @Test void testEnv() { ConfigurableEnvironment environment = new StandardEnvironment(); Map map = new HashMap(); map.put("myapp.database.url", "jdbc:mysq..
Spring에서 URL의 PathVariable을 Filter 단계에서 호출하여 사용하기 @PathVariable 변수의 사용 Spring의 RequestMapping은 다음과 같이 고정 값이 아닌 path variable을 지정하여 사용할 수 있다. @GetMapping("/{projectId}/setting/{mainMenuId}/{subMenuId}") public String page(@PathVariable String projectId, @PathVariable mainMenuId, @PathVariable String subMenuId) { // ... 생략 } 이렇게 설정되는 PathVariable 은 HandlerMethodArgumentResolver 중 PathVariableMethodArgumentResolver 를 통해 requestAttribute에 해당 값 들이 추..
Google Bard (Gemini)에게 Spring Boot 3.2의 변경점을 물어보았다. 오늘 구글이 Gemini라는 AI를 공개했다. https://korea.googleblog.com/2023/12/blog-post_652.html 가장 유능하고 범용적인 AI 모델 제미나이(Gemini)를 소개합니다 모든 사람들에게 더욱 유용한 AI를 만듭니다 이 블로그는 구글 The Keyword 블로그( 영문 )에서도 확인하실 수 있습니다. 순다 피차이(Sundar Pichai) 구글 및 알파벳 CEO 기술의 변화는 과학의 발전, 인류 korea.googleblog.com 관련해서 다수의 동영상을 통해 소개도 하였다. https://www.youtube.com/watch?v=jV1vkHv4zq8&list=PL590L5WQmH8cSyqzo1PwQVUrZYgLcGZcG openai의 gpt4 모델보다 상..
Spring Boot 3.2 Release Notes 전체 Release Notes 목록은 이 곳에서 확인할 수 있습니다.https://luvstudy.tistory.com/tag/Release%20Noteshttps://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.2-Release-Notes21 revisions 기준으로 작성됨Upgrading from Spring Boot 3.1Parameter Name DiscoverySpring Boot 3.2에서 사용하는 Spring Framework version은 더 이상 bytecode를 파싱하여 parameter name을 추론하지 않는다.dependency injection 또는 property binding 관련된 issue가 발생하면 -para..
Spring Boot WebMVC에서 Thymeleaf, Mustache ViewResolver 같이 사용하기 Spring은 HTML 페이지를 렌더링 하기 위해 Thymeleaf, FreeMarker, Mustache, Groovy 와 같은 Template Engine 을 지원한다. https://docs.spring.io/spring-boot/docs/current/reference/html/web.html#web.servlet.spring-mvc.template-engines 보통 Thymeleaf 를 많이 쓰지만 다른 것과 같이 사용하고 싶은 경우가 있을 수 있다. Spring은 이를 위해 요청에 따라 Template Engine을 분기하여 처리하는 ContentNegotiatingViewResolver 를 제공한다. 설정 사용하려는 template engine 관련 지원 dependency를 다음과 같이 ..
Spring Boot + Thymeleaf + Tailwind CSS 사용해 보기 Nuxt (Vue) 나 SvelteKit (Svelte) 같은 FE 개발 framework를 공부하는 것도 좋긴 한데 너무 빠르게 변화하다 보니 학습에 대한 부담이 크다고 느껴졌다. Spring Boot + Thymeleaf에서 Bootstrap을 사용해본적이 있었다. 그래서 Spring Boot + Thymeleaf 에서 Tailwind CSS를 사용해보고 싶어졌다. Tailwind CSS 소개 https://tailwindcss.com/ Tailwind CSS는 plex , pt-4 , text-center , rotate-90 과 같은 class로 구성된 utility-first CSS framework로, markup에서 바로 어떤 디자인이든 만들 수 있다. html에 style을 설정하는 부분을..

반응형