분류 전체보기(212)
-
RedisTemplate - Spring 에서 \xaa 문자 안들어가게 하는 방법
DefaultSerializer 를 치환해서 UTF-8 대신 US-ASCII (US 알파벳과 숫자만으로 깔끔하게) 인코딩으로 변환 : 변경 전 - 현상 : "redisTemplate.setDefaultSerializer(new StringRedisSerializer());" 를 썼을 땐 UTF-8 인코딩 변환에 의해 원치 않는 결과가 들어감. 최종 코드 : @Bean(name = "template") public RedisTemplate redisTemplateConfig(JedisConnectionFactory jedisConnectionFactory) { RedisTemplate redisTemplate = new RedisTemplate(); redisTemplate.setDefaultSeriali..
2023.04.05 -
React 클래스형 + (코드 분리 방식)
원문 출처 : https://ljh86029926.gitbook.io/coding-apple-react/1/component-of-react#undefined-1 Component Of React - React 이런식으로 하나의 HTML파일에 header, main, footer부분까지 하나의 파일에 작성하게 됩니다. 그러나 리액트는 컴포넌트 구조로 작성을 할 수 있기 때문에 각각의 부분을 분리해서 작업을 진행할 수 ljh86029926.gitbook.io
2023.04.05 -
React 함수형 선언방식
npx create-react-app 을 실행하면 생성되는 src/App.js 에서 볼 수 있다. import logo from './logo.svg'; import './App.css'; function App() { return ( Edit src/App.js and save to reload. Learn React ); } export default App;
2023.04.05 -
React 방식으로 요소 추가하기
https://stackoverflow.com/questions/66966134/how-to-pass-child-element-to-parent-in-react How to pass child element to parent in React How can i pass child element to parent element and then render it using React? Example of my code: let persons = [{name: 'Bill', age: '25'}, {name: 'John', age: '35'}]; // etc etc function stackoverflow.com
2023.04.05 -
render 테스트
import React from 'react'; import ReactDOM from 'react-dom/client'; import './index.css'; const myElement = I Love JSX!; //const divElement = React.createElement('div') const myElement2 = React.createElement('h1', {}, 'I do not use JSX!'); const root = ReactDOM.createRoot(document.getElementById('root')); root.render(myElement); function runAfter() { root.render(myElement2); } setTimeout(runAfte..
2023.04.05 -
정규식을 활용한 Underscore / Camel Case 전환
1. Underscore to Camel Case 찾을 내용 : _(.) 바꿀 내용 : \U$1 노트패드++ 에서 통하는 방법이다. 다만, 저 방법을 적용하기 전에 우선 모두 소문자로 변환해야 한다. 그렇게 하지 않으면 요렇게 되지~~ (적용 전 : I_LOVE_SALSA, 적용 후 : ILOVESALSA) 모두 소문자로 변환하면 (전 : I_LOVE_SALSA, 후 : i_love_salsa) 하지만 거치는 과정이 다소 번거롭다. 이런 기능이 플러그인으로 존재한다면 감사히 편리하게 사용할텐데.. 해설) () 는 그룹(묶음)이다. . 은 어느 한 문자 또는 숫자를 의미한다. 따라서 _(.) 는 I_LOVE_SALSA 에서 _L, _S 가 해당된다. \U 는 뒤에 따라오는 문자를 알파벳 대문자로 변환한다...
2023.04.05