UTF-8 2

[SpringBoot] VSCode์— MariaDB5.5 ์—ฐ๋™ํ•˜๊ธฐ(3)

[SpringBoot] VSCode์— MariaDB5.5 ์—ฐ๋™ํ•˜๊ธฐ(1) [SpringBoot] VSCode์— MariaDB5.5 ์—ฐ๋™ํ•˜๊ธฐ(2) [SpringBoot] VSCode์— MariaDB5.5 ์—ฐ๋™ํ•˜๊ธฐ(3) Preview Error Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLInvalidAuthorizationSpecException: Could not connect to address=(host=10.0.100.58)(port=3306)(type=master) : (conn=5) Access denied ..

2021_07_01) ํ†ตํ•ฉ๊ฒ€์ƒ‰ ํ•œ๊ธ€ ๊นจ์งํ˜„์ƒ.

๋ฐฐํฌ ์ดํ›„ ํ•œ๊ธ€ ๊นจ์ง ํ˜„์ƒ. why? ๊ฐœ๋ฐœ ํ™˜๊ฒฝ์€ mac (๊ธฐ๋ณธ encoding์ด utf-8) ๊ทธ๋Ÿฌ๋‚˜ ์‹ค์ œ ๋ฐฐํฌ๋Š” window(euc-kr) Solution String text = getRequestApiGet(url); // return text return new String(text.getBytes(),"UTF-8"); ๊ธฐ์กด์˜ return text๋ฅผ utf-8๋กœ ํ•œ๋ฒˆ ๋ณ€ํ™˜ ์‹œํ‚ด. faile โ†’ ๊นจ์งํ˜„์ƒ์ด ์กฐ๊ธˆ ์ค„์–ด๋“ค๊ธด ํ–ˆ์ง€๋งŒ ์—ฌ์ „ํžˆ ๊นจ์ง. Solution 2 //BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream())); BufferedReader in = new BufferedReader( new Inpu..

Project2021 2021.07.01
1
728x90
๋ฐ˜์‘ํ˜•