- 정의 - 웹 프로그래밍에서 클라이언트의 요청을 처리하고 그 결과를 다시 클라이언트에게 전송하는 ServLet클래스의 구현 규칙을 지킨 자바 프로그래밍 기술
- 자바를 사용하여 웹을 만들기 위해 필요한 기술, 클라이언트가 어떤 요청을 하면 그에 대한 결과를 다시 전송 해주어야 하는데, 이러한 역할을 하는 자바 프로그램
- 특징
- 클라이언트의 요청에 대해 동적으로 작동하는 웹 어플리케이션 컴포넌트
- HTML을 사용하여 요청에 응답한다.
- Java Thread를 이용하여 동작한다.
- MVC패턴에서 Controller로 이용된다.
- HTTP 프로토콜 서비스를 지원하는 javax.servlet.http.HttpServlet클래스를 상속받는다. UDP보다 속도가 느리다.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import lombok.extern.slf4j.Slf4j; | |
import org.springframework.web.client.RestTemplate; | |
import java.util.Map; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
@Slf4j | |
public class RestCallToThread { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE xml> | |
<configuration scan="true" scanPeriod="30 seconds"> | |
<appender name="console" class="ch.qos.logback.core.ConsoleAppender"> | |
<encoder> | |
<charset>UTF-8</charset> | |
<pattern>%d{yyyyMMdd HH:mm:ss.SSS} [%thread] %-3level %logger{5} - %msg %n</pattern> | |
</encoder> | |
</appender> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.check | |
1) Linux java -XX:+PrintFlagsFinal -version 2>&1 | grep -i -E 'heapsize|metaspacesize|permsize|version' | |
2) Window java -XX:+PrintFlagsFinal -version 2>&1 | findstr /I "heapsize metaspacesize permsize version" | |
3) sudo jmap -heap PID | |
* PerGem Space - permsize, metaspacesize | |
2.add start option |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
해결방법 | |
1. 과거 시점의 DB를 local에 엎어서 맞는 데이터를 찾아보자(공짜) | |
1) aliyun 접속 → RDS → Backup and Recovery → 원하는 날짜의 DOWNLOAD 클릭 → tar파일 받아서 풀면 해당 시간의 데이터들이 존재한다. | |
2) .ibd, .frm파일만 존재한다. 해당 파일을 로컬에 엎어보자 | |
3) local에 mysql 설치 | |
4) workbench를 통해서 local Db접속 | |
a. alter table zeliter.campaign_apply discard tablespace; 실행하게되면 mysql위치/data/db명.ibd 파일이 없어진다 | |
b. .idb파일 위치로 가서 cp mysql위치/data/db명.ibd | |
c. chown mysql:mysql mysql위치/data/db명.ibd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. cd TOMCAT_HOME/bin | |
2. cat catalina.sh | |
3. check this comment | |
# but allow them to be specified in setenv.sh, in rare case when it is needed. | |
CLASSPATH= | |
if [ -r "$CATALINA_BASE/bin/setenv.sh" ]; then | |
. "$CATALINA_BASE/bin/setenv.sh" | |
elif [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then | |
. "$CATALINA_HOME/bin/setenv.sh" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java -version | |
=========================================================================== | |
java version "1.8.0_201" | |
Java(TM) SE Runtime Environment (build 1.8.0_201-b09) | |
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode) | |
=========================================================================== | |
vi ~/.bash_profile | |
and add this | |
=========================================================================== |
자바 이전의 언어는 cpu에 맞는 컴파일러가 필요했고 각각의 환경의 컴파일러를 위한 비용은 비싸고 개발하는데 시간이 너무 소요되었다. 더 나은 방식을 위해 제임스코슬링과 동료들은 다양한 환경의 cpu에서 실행되는 코드를 생성 할수 있는, 이식성이 뛰어난 cross platform언어의 개발에 착수했다. 이러한 배경으로 write once, run anywhere과 같은 철학을 가지고 있는 자바의 탄생으로 이어진다.
자바의 세부적인 부분이 개발되고 있을 무렵 2차적이긴 하지만 자바의 미래를 결정지을 중요한 요인이 나타났다. 바로 월드 와이드 웹(WWW), 1993년경 자바팀은 임베디드 제어기에서 사용할 코드를 개발할 때 자주 나타나던 이식성의 문제가 인터넷을 위한 코드를 개발할 때도 나타난다는 사실을 알게 되었다. 이리하여 자바의 초점이 가전제품에서 인터넷으로 옮겨지게 된다.
자바가 인터넷에 큰 영향을 미친이유는 자바가 가상공간을 자유롭게 돌아 다닐 수 있는 객체의 세계를 확장했기 때문이다. 네트워크에는 서버와 PC사이에 전송되는 두가지 객체 영역이 존재 하는데, 수동적 정보와 동적이고 능동적인 프로그램이 그것이다.
OlderNewer