100일 챌린지/빅데이터기반 인공지능 융합 서비스 개발자 93

Day 75 - interface, lamda식, stream

Lamdajdk 1.8 ver 부터 등장한 새로운 문법javascript의 arrow function을 본따서 만들었다.  // javascript arrow function : var func=(a,b)=>{return ;} // java lamda 함수 (하나의 메소드를 갖고 있는 인터페이스만 가능) Runnable func=()->{ System.out.println("my thread:"+Thread.currentThread().getName()); }; Thread thr=new Thread(func); thr.start(); System.out.println("main:"+Thread.currentThread().getName());Functi..

Day 74 - JavaScript로 Web Server 만들기

내장객체를 사용한 web server 만들기const { createServer }=require('http');const url=require('url');const query=require('querystring');const hostname='127.0.0.1';const port=3000;const server = createServer((req, res) => { console.log(req.url,req.method); let result=url.parse(req.url); if(result.pathname=='/'){ res.statusCode=200; res.setHeader('Content-Type','text/html;charset=utf-8'); res.end('..

Day 74 - JavaScript 문법

function과 배열var a=1111;console.log(a);function f1(){ console.log(a);}console.log(a);f1();console.log(a);const b=[];b.push('item1');b.push('item2');console.log(b);let 사용하기 let a='key2';let arr1={'key1':'val1',a:'val2'};console.log(arr1.key1);console.log(arr1.a);console.log(arr1[a]);// undefinedlet arr2={key1:'val1',key2:'val2'};console.log(arr2['key1']);console.log(arr2.key1);// JSON 키는 문자열을 사..

Day 74 - Java로 구현하는 backend (NodeJS)

https://nodejs.org/en Node.js — Run JavaScript EverywhereNode.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.nodejs.orgV8 JavaScript engine - javascript를 compile 언어로 변환브라우저를 벗어난 javascript = nodejshttps://github.com/coreybutler/nvm-windows GitHub - coreybutler/nvm-windows: A node.js version management utility for Windows. Ironically written in Go.A node.js version management ..

Day 73 - 배포하기

데이터베이스를 Docker 데이터베이스로 변환Docker 실행하기https://hub.docker.com/_/mysql mysql - Official Image | Docker HubQuick reference Supported tags and respective Dockerfile links 9.1.0, 9.1, 9, innovation, latest, 9.1.0-oraclelinux9, 9.1-oraclelinux9, 9-oraclelinux9, innovation-oraclelinux9, oraclelinux9, 9.1.0-oracle, 9.1-oracle, 9-oracle, innovation-oracle, oracle⁠8hub.docker.comhttps://hub.docker.com/r/bit..

Day 73 - Spring Data JPA를 이용한 CRUD 프로그램 만들기

https://spring.io/projects/spring-data-jpa Spring Data JPASpring Data JPA, part of the larger Spring Data family, makes it easy to easily implement JPA-based (Java Persistence API) repositories. It makes it easier to build Spring-powered applications that use data access technologies. Implementing a data access lspring.ioapplication.propertiesspring.application.name=sts09#server.servlet.context-..

Day 72 - Annotation을 사용해서 CRUD 프로젝트 만들기

https://www.thymeleaf.org/doc/tutorials/3.1/usingthymeleaf.html#standard-expression-syntax Tutorial: Using Thymeleaf1 Introducing Thymeleaf 1.1 What is Thymeleaf? Thymeleaf is a modern server-side Java template engine for both web and standalone environments, capable of processing HTML, XML, JavaScript, CSS and even plain text. The main goal of Thymeleaf is to provide awww.thymeleaf.org + thymel..

Day 72 - thymeleaf template engine을를 이용한 view 페이지 만들기

https://www.thymeleaf.org/[ThymeleafIntegrations galore Eclipse, IntelliJ IDEA, Spring, Play, even the up-and-coming Model-View-Controller API for Java EE 8. Write Thymeleaf in your favourite tools, using your favourite web-development framework. Check out our Ecosystem to see more integratiwww.thymeleaf.org](https://www.thymeleaf.org/)pom.xml org.springframework.boot ..