본문 바로가기

Programming321

Gatsby Tailwind CSS 적용하기 1. Tailwind CSS 와 PostCSSnpm install tailwindcss postcss autoprefixer gatsby-plugin-postcss 2. Tailwind CSS 초기화npx tailwindcss inittailwind.config.js 파일이 생성됨3. PostCSS 설정프로젝트 루트 디렉토리에 postcss.config.js 파일을 생성한다.module.exports = { plugins: { tailwindcss: {}, autoprefixer: {}, },} 4. Gatsby 설정파일에 PostCSS 플러그인 추가gatsby-config.jsmodule.exports = { ... plugins: [ `gatsby-plugin-postcss`,.. 2024. 7. 30.
Next.js 14 버전 Netlify에 배포하기 1. next.config.mjs 수정 - 위와 같은 package.json 이 있다고 할 때, "npm run build" 를 하면 .next 폴더가 만들어지는데, next.config.mjs파일을 아래와 같이 수정해서 out파일을 배포하도록 설정을 바꿔줘야함. - 이미지 등의 경로를 제대로 인식할 수 있도록 basePath를 설정합니다.  [Next.js 의 모든 URL 앞에 추가되는 기본 경로를 설정]/** @type {import('next').NextConfig} */const nextConfig = { output: 'export', basePath: '', images: { unoptimized: true, },};export default nextConfig; 예전에는 next.. 2024. 7. 27.
Python Oracle 연결하여 Insert하기 (cx_Oracle -> oracledb 사용) 최신 오라클  라이브러리가 cx_Oracle에서 oracledb 변경되었다. Insert# Plan MH 일괄 추출from datetime import datetimeimport oracledbimport osos.putenv('NLS_LANG', '.UTF8')now = datetime.today()# DB연결conn = oracledb.connect(user='myuser', password='1234', dsn='abcd.abcde.com:1526/abcd')cursor = conn.cursor() #지시자 생성query_str = "insert into SOME_TABLE values (:1,:2,:3,:4,:5,:6,:7,:8)"data = ('20240125',.. 2024. 4. 24.
Spring boot - Thymeleaf 적용하기 1. template/hello.html 데이터를 받아들일 html템플릿을 만들어둔다. Hello Thymeleaf!! 2.Controller.java 자료를 넘길때는 ModelAndView객체에 담아서 보낸다. ... @GetMapping("/user") public ModelAndView hello(@RequestParam("id") String id) throws Exception { ModelAndView mav = new ModelAndView(); UserDto res = userService.getUserById(id); mav.setViewName("hello"); mav.addObject("user",res.getName()); return mav; } ... 2024. 4. 8.
Spring boot - DB / Mybatis / Mapper 1. Controller: UserProfileController.java package com.example.myba.controller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestParam; import org.spri.. 2024. 4. 7.
Spring Maven Swagger설치 여기서 최신버전을 복사해서 pom.xml의 디펜던시에 넣어준다. Maven Repository: org.springdoc » springdoc-openapi-starter-webmvc-ui » 2.5.0 (mvnrepository.com) org.springdoc springdoc-openapi-starter-webmvc-ui 2.5.0 localhost:8080/swagger-ui/index.html 2024. 4. 6.