๋ฐ˜์‘ํ˜•
@ reverse 
 - ๋ฐฐ์—ด.reverse() : ๋ฐฐ์—ด ๋’ค์ง‘๊ธฐ
var test = [1,2,3,4,5]; 
test.reverse(); //test=[5,4,3,2,1] 

@ split 
 - ๋ฌธ์ž.split("๋Š๋Š”๋ฌธ์ž์—ด") : ๋ฌธ์ž์—ด ๋ฐฐ์—ดํ™” ํ•˜๊ธฐ
var testString = "1,2,3,4,5";
testString.split(",");// ["1", "2", "3", "4", "5"]

@ shift 
- ๋ฐฐ์—ด.shift("๋ฌธ์ž") : ๋ฐฐ์—ด ์ฒซ๋ฒˆ์งธ ๊ฐ’ ๋นผ๊ธฐ([๋ฐฉํ–ฅ:<--]์™ผ์ชฝ์œผ๋กœ ๋ฐ€๋ ค์ง)
var test = [1,2,3,4,5];
test.shift();//1
test.shift();//2
test.shift();//3
test.shift();//4
test.shift();//5
test.shift();//undefined
console.log(test);//

var testA = [6,7,8,9];
testA.shift();//6
console.log(testA);//(3) [7, 8, 9]

@ unshift 
- ๋ฐฐ์—ด.unshift("๋ฌธ์ž") : ๋ฐฐ์—ด๊ฐ’ ์ฒซ๋ฒˆ์งธ์— ๊ฐ’ ์ถ”๊ฐ€([๋ฐฉํ–ฅ:-->]์˜ค๋ฅธ์ชฝ์œผ๋กœ ๋ฐ€๋ ค์ง)
var test = [1,2,3]
test.unshift()
console.log(test);// (3) [1, 2, 3]
test.unshift(4) 
console.log(test); // (4) [4, 1, 2, 3]
test.unshift(6)
console.log(test);// (5) [6, 4, 1, 2, 3]

@ push 
- ๋ฐฐ์—ด.push(๋„ฃ๋Š”๊ฐ’) : ๋ฐฐ์—ด๊ฐ’ ๋์š”์†Œ์— ๊ฐ’ ์ถ”๊ฐ€
var test = [1,2,3,4,5,6];
test.push(7); //7
console.log(test); // (7) [1, 2, 3, 4, 5, 6, 7]

@ pop 
- ๋ฐฐ์—ด.pop() : ๋ฐฐ์—ด๋’ค์— ๋ฐฐ์—ด๊ฐ’ ๋นผ๊ธฐ
var test = [1,2,3,4,5,6];
test.push(); //6
console.log(test); // (5) [1, 2, 3, 4, 5]

@ splice 
- ๋ฐฐ์—ด.splice(์ˆœ์„œ,๊ฐฏ์ˆ˜) : ์ˆœ์„œ์œ„์น˜๋ถ€ํ„ฐ ๊ฐฏ์ˆ˜๊นŒ์ง€ ๋ฒ„๋ฆผ
var test = [1,2,3,4,5,6,7,8,9];
test.splice(0,2)// (2) [1, 2] : 0๋ฒˆ์งธ์—์„œ 2๊ฐœ ๋ฒ„๋ฆผ
console.log(test)// (7) [3, 4, 5, 6, 7, 8, 9]
test.splice(2,5)// (5) [5, 6, 7, 8, 9] : 012๋ฒˆ์งธ์—์„œ5๊ฐœ๋ฒ„๋ฆผ
console.log(test)// (2) [3, 4]

@ concat 
- A๋ฐฐ์—ด.concat(B๋ฐฐ์—ด) : ๋ฐฐ์—ดํ•ฉ์น˜๊ธฐ(A+B)
var A = [5,6,7]
var B = [1,2,3]
A.concat(B) //(6) [5, 6, 7, 1, 2, 3]

@ join 
- ๋ฐฐ์—ด.join("๋ฌถ๋Š”๋ฌธ์ž์—ด") : ๋ฐฐ์—ด์„ ๋ฌถ๋Š”๋ฌธ์ž์—ด๋กœ ์—ฐ๊ฒฐํ•˜์—ฌ ๋ฌธ์ž์—ด๋กœ ๋ณ€๊ฒฝ
var test = [1,2,3,4,555,6]
test.join(",") //"1,2,3,4,555,6"
test.join("555")//"15552555355545555555556"
test.join("1")//"1121314155516"
test.join("-")//"1-2-3-4-555-6"

@ sort 
- ๋ฐฐ์—ด.sort() : ๋ฐฐ์—ด ์ •๋ ฌ
var test = [4,3,6,1,2]
test.sort() //(5) [1, 2, 3, 4, 6]

@ substr 
- ๋ฌธ์ž.substr(์ˆœ์„œ,๊ฐฏ์ˆ˜) : ์ˆœ์„œ๋ถ€ํ„ฐ ๊ฐฏ์ˆ˜๊นŒ์ง€ ์ถ”์ถœ
var test = 'Hello, my world!!';
test.substr(2,3) //"llo"//012๋ฒˆ์งธ์—์„œ3๊ฐœ
test.substr(0,3)//"Hel"//0๋ฒˆ์งธ์—์„œ3๊ฐœ
test.substr(0,5) //"Hello" //0๋ฒˆ์งธ์—์„œ5๊ฐœ
test.substr(5,5)//", my " //012345๋ฒˆ์งธ์—์„œ 5๊ฐœ



๋ฐ˜์‘ํ˜•
๋ฐ˜์‘ํ˜•

Error [ERR HTTP HEADERS_SENT]: Cannot set headers after they are sent to the client



response.send() ํ•œ๋ฒˆ๋งŒ!

๋ฐ˜์‘ํ˜•
๋ฐ˜์‘ํ˜•

์ฐธ๊ณ ํ•จ : https://stackoverflow.com/questions/19051041/cannot-overwrite-model-once-compiled-mongoose



์—๋Ÿฌ๊ฐ€๋‚˜์„œ ๋ณด๋‹ˆ

์Šคํ‚ค๋งˆ ์„ ์–ธ์„ ํ•œ๋ฒˆ๋งŒ ๋กœ๋“œํ•˜๋ผ๋Š” ๋œป์ธ๊ฑฐ๊ฐ™์•˜๋‹ค.


์ „์—ญ์—๋‹ค๊ฐ€ ์„ ์–ธ์„ ํ•ด๋†“๋“ ,

์ตœ์ดˆ ์‹คํ–‰ ํ•จ์ˆ˜(์ƒ์„ฑ์ž) ๊ฐ™์€๊ณณ์— 

์ตœ์ดˆ ํ•œ๋ฒˆ๋งŒ ๋ถ€๋ฅด๋‹ˆ ์—๋Ÿฌ๊ฐ€ ์•ˆ๋‚œ๋‹ค.



๋ฐ˜์‘ํ˜•
๋ฐ˜์‘ํ˜•

์ž˜๋˜๋˜ ํ”„๋กœ์ ํŠธ์˜€๋Š”๋ฐ,


์„œ๋ฒ„๋ฅผ ์‹คํ–‰ํ•˜๋‹ˆ, 500์—๋Ÿฌ๋ฅผ ๋ฑ‰์œผ๋ฉด์„œ

Servlet.init() for servlet appServlet threw exception


์ด๋Ÿฐ๋ฌธ๊ตฌ์™€ํ•จ๊ป˜,

Error creating bean with name 'org.springframework.validation.beanvalidation.OptionalValidatorFactoryBean#0

์ด๋Ÿฌํ•œ ์—๋Ÿฌ๊ฐ€ ๋‚˜์™€์„œ ์ฐพ๋˜์ค‘

- ์ฐธ๊ณ  : https://stackoverflow.com/questions/35986200/error-creating-bean-with-name-org-springframework-validation-beanvalidation-opt


์œ„์˜ ์‚ฌ์ดํŠธ์˜ ๋‚ด์šฉ์œผ๋กœ ํ•ด๊ฒฐํ•จ!



๊ฐ€๋” *.jar ๋ฒ„์ „์ด ์•ˆ๋งž๊ฑฐ๋‚˜(๋ฒ„์ „์ด ์˜ฌ๋ผ๊ฐ€๊ฑฐ๋‚˜) ํ•˜๋ฉด ์ €๋Ÿฐ์‹์œผ๋กœ ์•ˆ๋งž๋Š”๋‹ค๊ณ  ์—๋Ÿฌ๋ฅผ ๋‚ด๋ฑ‰๋Š” ๋ชจ์–‘


pom.xml์„ 

<dependency> 

<groupId>org.hibernate</groupId> 

<artifactId>hibernate-validator</artifactId> 

<version>5.2.4.Final</version>

</dependency> 


์œผ๋กœ ๋งž์ถฐ์ฃผ๊ณ , 


dtoํŒจํ‚ค์ง€์˜ ๊ด€๋ จ ํด๋ž˜์Šค๋„ ๋งž์ถฐ์ฃผ๋‹ˆ ํ•ด๊ฒฐ!

๋ฐ˜์‘ํ˜•
๋ฐ˜์‘ํ˜•

๋ฉ”์ด๋ธ ํ”„๋กœ์ ํŠธ ๋นŒ๋“œ ์ค‘์—


Invalid LOC header


๋ผ๋Š” ์—๋Ÿฌ๊ฐ€ ๋‚˜์™€์„œ ๋ญ”๊ฐ€ํ•˜๊ณ  ์ฐพ์•„๋ณด์•˜๋Š”๋ฐ,


jar ํŒŒ์ผ์ด ๊นจ์ ธ์„œ ํ˜น์€ jar ํŒŒ์ผ์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์—†์–ด์„œ ๋‚˜๋Š” ์—๋Ÿฌ๋ผ๊ณ  ํ•œ๋‹ค.


๋ฐฉ๋ฒ•์œผ๋กœ๋Š” ํ•ด๋‹น ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ํŒŒ์ผ(*.jar)์„ ์ฐพ์•„ ์ง€์šฐ๊ณ  ๋‹ค์‹œ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ(*.jar)๋ฅผ ๋ถˆ๋Ÿฌ์™€๋ผ์˜€๋‹ค.

(๋‹ค์‹œ ๋ถˆ๋Ÿฌ์˜จ๋‹ค๋Š”๊ฑด pom.xml ์— ๋‹ค์‹œ ์„ค์ •์„ ํ•˜์—ฌ ๋ถˆ๋Ÿฌ์˜ค๋ผ๋Š” ์–˜๊ธฐ์ผ ๊ฒƒ์ด๊ฒ ์ง€)



์ง€์›Œ๋ณด๊ณ ๋„ ์•ˆ๋˜๋ฉด, ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ๋ฒ„์ „ํ™•์ธ๋„ ํ•ด๋ณผํ•„์š”๊ฐ€ ์žˆ์„๊ฒƒ์ด๋‹ค.


๋‚˜์˜๊ฒฝ์šฐ๋Š”, aspectj ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์— ๋Œ€ํ•œ ์—๋Ÿฌ์˜€๋Š”๋ฐ,

์ž๋ฐ”๋ฒ„์ „์ด๋ž‘ aspectj๋ฒ„์ „์ด๋ž‘ ์•ˆ๋งž์•„์„œ ๊ทธ๋žฌ๋‹ค.


-- pom.xml

<properties>

<java-version>1.8</java-version>

<org.springframework-version>4.0.4.RELEASE</org.springframework-version>

<org.aspectj-version>1.8.1</org.aspectj-version> <!-- 1.6.0์—์„œ 1.8.1๋กœ ์˜ฌ๋ ค์คŒ-->

<org.slf4j-version>1.6.6</org.slf4j-version>

</properties>


๊ทธ๋žฌ๋”๋‹ˆ ์—๋Ÿฌ๊ฐ€ ์—†์–ด์กŒ๋‹ค.


์ฐธ๊ณ  : https://www.slipp.net/wiki/pages/viewpage.action?pageId=1343532

๋ฐ˜์‘ํ˜•
๋ฐ˜์‘ํ˜•

jdbc ์—ฐ๋™ํ•˜๋ ค๊ณ  ํ•˜๋Š”๋ฐ 


Cannot create PoolableConnectionFactory (Could not create connection to database server.)

์—๋Ÿฌ๊ฐ€๋‚˜์„œ ์ฐพ์•„๋ณด์•˜๋‹ค.



๋‚˜์˜๊ฒฝ์šฐ๋Š” ๋กœ์ปฌ์ด ์•„๋‹Œ ์™ธ๋ถ€์„œ๋ฒ„(aws ์‚ฌ์šฉ)์— ์žˆ๋Š” DB(mysql)์— ์ ‘๊ทผํ•˜๋Š” ๋ฐฉ์‹์œผ๋กœ ์‹œ๋„ํ•˜๋ ค๊ณ  ํ–ˆ๋Š”๋ฐ

์™ธ๋ถ€์—์„œ ๋””๋น„์ ‘๊ทผ์ด ์•ˆ๋˜์„œ ์ €๋Ÿฐ ์—๋Ÿฌ๊ฐ€ ๋‚ฌ๋˜ ๊ฒƒ์ด๋‹ค.



๋”ฐ๋ผ์„œ ๋””๋น„ ๋‚ด์— ์ ‘์† ๊ฐ€๋Šฅํ•œ IP๋ฅผ ์—ด์–ด์ค˜์•ผํ•จ. (ํŠน์ • ์•„์ดํ”ผ ํ˜น์€ ์ „์ฒด)

mysql.user ํ…Œ์ด๋ธ”์— host๋ช…์„ %๋กœ ๋“ฑ๋ก ํ•ด๋†“์œผ๋ฉด ๋ชจ๋“  IP ์ ‘์† ๊ฐ€๋Šฅ




1) ํ•ด๋‹น์„œ๋ฒ„ ๋””๋น„์ ‘์†

root@ip-@@@@:~# mysql -u root -p

Enter password: ๋น„๋ฐ€๋ฒˆํ˜ธ ์ž…๋ ฅ


2) ์ˆœ์„œ๋Œ€๋กœ ์‹คํ–‰

mysql> use mysql

mysql>INSERT INTO mysql.user (host,user,authentication_string, ssl_cipher, x509_issuer, x509_subject) VALUES ('%','root',password('๋น„๋ฐ€๋ฒˆํ˜ธ'), '', '', '');

mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'; -- ๋ชจ๋“  ํ˜ธ์ŠคํŠธ์— ์ ‘์† ํ—ˆ์šฉ...

mysql>FLUSH PRIVILEGES; -- ๊ถŒํ•œ๋ณ€๊ฒฝ ์ ์šฉํ•˜๊ณ , ์•Œ๋ฆฌ๋Š” ๋ช…๋ น์–ด



~ ๋ 



- ์ฐธ์กฐ : https://medium.com/mo-mu/%EA%B0%9C%EB%B0%9C%EC%9D%BC%EC%A7%80-%EC%9B%90%EA%B2%A9%EC%84%9C%EB%B2%84-mysql%EC%97%B0%EA%B2%B0-sql%ED%8C%8C%EC%9D%BC-import-9abfb0a711da


http://zetawiki.com/wiki/MySQL_%EC%9B%90%EA%B2%A9_%EC%A0%91%EC%86%8D_%ED%97%88%EC%9A%A9



๋ฐ˜์‘ํ˜•
๋ฐ˜์‘ํ˜•

[1] ํŽธ์ง‘

vi /etc/ssh/sshd_config

PermitRootLogin yes ๋กœ๋ณ€๊ฒฝ



[2] ์žฌ์‹œ์ž‘

service sshd restart

๋ฐ˜์‘ํ˜•
๋ฐ˜์‘ํ˜•

์ฐธ๊ณ ๋กœ ํ‚ค ์—†์ด ๋กœ๊ทธ์ธ์„ ํ•œ๋‹ค๋Š”๊ฑด ๊ทธ๋งŒํผ ๋ณด์•ˆ์— ์ทจ์•ฝํ•˜๋‹ค๋Š”๊ฑธ ์•Œ์•„๋‘๊ณ ..


[1] sshd_config๋ฅผ ์ˆ˜์ •

 sudo vi /etc/ssh/sshd_config


 ...๋‚ด์šฉ์ค‘ 

 PermitRootLogin yes ๋กœ ๋ณ€๊ฒฝ

 PasswordAuthentication yes ๋ณ€๊ฒฝ ํ›„ ์ €์žฅ(:wq!)


[2] ssh ์žฌ์‹œ์ž‘
 sudo service ssh restart


[3] root ๋น„๋ฐ€๋ฒˆํ˜ธ ์„ค์ •

 sudo passwd root 


 Enter new UNIX password: ์‚ฌ์šฉํ•  ๋น„๋ฐ€๋ฒˆํ˜ธ ์ž…๋ ฅ

 Retype new UNIX password: ์‚ฌ์šฉํ•  ๋น„๋ฐ€๋ฒˆํ˜ธ ์ž…๋ ฅ

 passwd: password updated successfully


[4] ํ‚ค(*.ppk) ์—†์ด putty ์ ‘์† (๋กœ๊ทธ์ธ์„ root๋กœ..)



์ฐธ๊ณ  : http://ora-sysdba.tistory.com/entry/Cloud-Computing-Amazon-EC2-%EC%9D%B8%EC%8A%A4%ED%84%B4%EC%8A%A4%EC%9D%98-ROOT-%EA%B3%84%EC%A0%95%ED%99%9C%EC%84%B1%ED%99%94

๋ฐ˜์‘ํ˜•
๋ฐ˜์‘ํ˜•

๊ธฐ๋ณธ์ ์œผ๋กœ๋Š” 22ํฌํŠธ๋Š” ์—ด๋ ค์žˆ๋”๋ผ 

--> ์ธ์Šคํ„ด์Šค ์ƒ์„ฑํ• ๋•Œ ๊ธฐ๋ณธ์ ์œผ๋กœ ์„ค์ •๋œ์ฑ„๋กœ ์ƒ์„ฑํ•จ 



[๋ณด์•ˆ ๊ทธ๋ฃน] ํด๋ฆญ -> [ํŽธ์ง‘] ํด๋ฆญ



[๊ทœ์น™ ์ถ”๊ฐ€] ํด๋ฆญ -> ํ•ด๋‹น ํฌํŠธ๋“ค ์„ค์ • ํ›„ [์ €์žฅ] ํด๋ฆญ



๋ฐ˜์‘ํ˜•
๋ฐ˜์‘ํ˜•

์ฐธ๊ณ  : https://forum.level1techs.com/t/can-i-go-ahead-and-downgrade-apt-to-upgrade-apt-utils-ubuntu-server-16-04/118116



์šฐ๋ถ„ํˆฌ์—์„œ ๋ญ˜ ์„ค์น˜ํ•˜๋ ค๊ณ  ํ–ˆ๋Š”๋ฐ..

root@ip-~~~:~# apt-get upgrade

Reading package lists... Done

Building dependency tree

Reading state information... Done

You might want to run 'apt-get -f install' to correct these.

The following packages have unmet dependencies:

 apt-utils : Depends: apt (= 1.2.20) but 1.2.24 is installed

E: Unmet dependencies. Try using -f.



์ด๋Ÿฐ ์—๋Ÿฌ๊ฐ€ ๋‚˜์™€์„œ... ์ฐพ์•„๋ณด์•˜๋‹ค.

apt --fix-broken install 


์„ ์น˜๋‹ˆ๊นŒ apt-get์ด ๋‹ค์‹œ ์‹คํ–‰๋จ.


๋ฐ˜์‘ํ˜•

+ Recent posts