목록알쓸전컴 (343)
알쓸전컴(알아두면 쓸모있는 전자 컴퓨터)
Spring ActiveMq 예제 Spring 사용시 AciteveMq 을 사용할 일이 있어서 사용 예제를 분석 하고 남기려고 합니다. 먼저 dependency 는 org.apache.activemq activemq-spring 5.10.0 org.springframework spring-jms 4.1.5.RELEASE 이 2가지 입니다. 그리고 Bean 은 여기에 등록 합니다. 위에 해당 하는 부분 스키마를 등록해 줍니다. tcp://127.0.0.1:61616 먼저 위에 소스에서 보듯 커넥터를 만들어 줍니다. 그리고 기본으로 사용할 Queue Subject Bean 을 만들어 줍니다. 그리고 나서 MessageConverter 가 필요합니다. public class OEEActivemqMsgConve..
javascript async await 동기화 함수 동기화 예제 예제 소스 참조 : https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Operators/async_function function resolveAfter2Seconds(x) { return new Promise(resolve => { setTimeout(() => { resolve(x); }, 2000); }); }; var add = async function(x) { // async function 표현식을 변수에 할당 var a = await resolveAfter2Seconds(20); var b = await resolveAfter2Seconds(30); return ..
Spring Rest API Client MultiValueMap parameters = new LinkedMultiValueMap(); parameters.add("send_phone", "12341234");parameters.add("dest_phone", "01012345678");parameters.add("msg_body", "단문 문자 테스트");parameters.add("subject", "문자 제목"); HttpHeaders headers = new HttpHeaders();//headers.add("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8"); //전부다 String형일 때. RestTemplate 때문에 생략..
javascirpt Number to excel Column Name 바꾸기 한번 쓸때가 있어서 공유 하고자 올립니다. toColumnName(1) => A toColumnName(2) => B toColumnName(35) => AI 등으로 바뀝니다. function toColumnName(num) { for (var ret = '', a = 1, b = 26; (num -= a) >= 0; a = b, b *= 26) { ret = String.fromCharCode(parseInt((num % b) / a) + 65) + ret; } return ret;}
spring -> tomcat 원격 배포 deploy 기본 참조 사이트는 : https://www.baeldung.com/tomcat-deploy-war pom.xml org.springframework.boot spring-boot-maven-plugin org.codehaus.cargo cargo-maven2-plugin tomcat8x remote runtime admin admin http://localhost:8080/manager/text 에 추가 하고 톰켓 에서는 tomcat-users.xml 파일을 수정해 줍니다. 그리고 나서 배포 해준다. 위애 방법으로 안되어서 추가 적인 방법을 정리 합니다, org.apache.maven.pluginsmaven-war-plugin2.4src/main/w..
vue cli 3.0 webcomponent 만들기 다른 웹 프로그램에서 쉽게 자신의 vue 라이브러리를 사용하기 위해서 흔히 It works! If you want to use the code I’ve been referring to as a template, I’ve put it in a repo here.PublishingFinally, if you want to share your web component with the world, there’s no better place than webcomponents.org. This site features a browsable collection of web components free for download. The showcased componen..
vue js chart 라이브러리 소개 apexcharts vue js 로 레핑 된 라이브러리가 추가 되어 소개 하고자 합니다. https://apexcharts.com/javascript-chart-demos/ 데모 사이트 이며 문서와 예제가 잘 정리 되어 있습니다. Vue.js component for ApexCharts추후에 실제로 사용 하면 좋을것 같습니다.
Documents4j 문서 포맷 변환기(excel->html) 먼저 해당 문서 를 보기전에 아래 사이트를 실습을 해보거나 분석을 꼭 해보시기 바랍니다. 그래야 해당 문서가 이해가 수월 할것으로 예상 됩니다. http://idlecomputer.tistory.com/248 먼저 기본 로직은 아래와 같습니다. 아래 로직중 1.temp1 은 Documents4j 라이브러리가 만드는 Input 파라 메터 입니다. 2.temp2 은 Documents4j 라이브러리가 만드는 Output 파라 메터 입니다.3.압축은 7z을 사용하기 때문에 7z이 설치가 되어 있어야 합니다. (VBScript 를 사용할때 해당 경로 적어 줍니다 ) 먼저 HTML 을 위해서 오픈 소스 수정이 필요 합니다. 먼저 Maven 프로젝트 소스..
Spring boot ssl 적용법 기본 ssl 에 필요한 인증서는 certbot 으로 가져 오고 난 다음의 과정입니다. $ openssl pkcs12 -export -in fullchain.pem \ -inkey privkey.pem \ -out keystore.p12 -name tomcat \ -CAfile chain.pem \ -caname root 'application.properties' 열어 주고 아래와 같이 셋팅을 합니다. server.port: 8443security.require-ssl=trueserver.ssl.key-store:/etc/letsencrypt/live/seeld.eu/keystore.p12server.ssl.key-store-password: server.ssl.key..
documents4j 문서 포멧 변환기 documents4j 은 문서를 다양한 문서 포멧을 컨버팅 해주는 java 라이브러리 이다 해당 라이브러리의 강력한 기능은 1.excel 와 word 등을 VBA 스크립트를 통해서 변환 해준다는것이다. 해당 스크립트를 직접 수정도 소스를 통해 가능하다 물론 VBA 스크립드 실행을 위해서 서버는 window 에서 office 2010 버전 이상이 설치 되어 있어야 한다. 2.서버와 클라이언트로 나눌수 있다는것이다. 서버 쪽에서 변환을 하고 클라이언트에서 변환된 결과만 받아서 처리 할수가 있다. ※사용법 기본 사용 방법은 http://documents4j.com/#/ 을 참조 하고 중간 중간에 시행 착오가 있어서 기록을 남깁니다. https://github.com/do..