반응형 Spring27 [Spring Boot/IntelliJ] SpringBoot 시작 https://start.spring.io/ 여기서 생성한다 Gradle Project와 Java SNAPSHOT인 2.6.7버전으로 선택한다 Java11버전은 오라클에서 받았다 처음 다운로드 해서 사용할 Dependencies는 위에 두개를 ADD 해준다 포트 변경은 맨 위 Run -> Edit Configurations에서 위에 -Dserver.port = 번호를 바꾸면 된다. 그리고 Setting에서 gradle Build and run using과 Run test using을 Gradle(Default) -> InteliJ IDEA로 바꿔서 실행할때 Gradle로 실행하지않게 하면 더 빨라진다고 한다. 2022. 4. 13. Spring - mysql 연동 환경설정 ●Web.xml contextConfigLocation /WEB-INF/spring/root-context.xml org.springframework.web.context.ContextLoaderListener appServlet org.springframework.web.servlet.DispatcherServlet contextConfigLocation /WEB-INF/spring/appServlet/servlet-context.xml 1 appServlet *.do encodingFilter org.springframework.web.filter.CharacterEncodingFilter encoding UTF-8 forceEncoding true encodingFilter /* Spring MVC.. 2021. 5. 24. Android에서 연동 dependencies devices.js // MQTT Server 연결 const { response } = require("express"); var express=require("express"); var router=express.Router(); const mqtt=require("mqtt"); const DHT11=require("../modules/dht11") //DHT11모듈 가져오기 const client=mqtt.connect("mqtt://210.223.239.164"); router.post("/led", function(req, res, next){ res.set("Content-Type", "text/json"); if(req.body.flag=="on"){ client.pu.. 2021. 4. 30. LBS 활용하기 developers.kakao.com에서 오픈API 가져오기 로그인 -> 내 애플리케이션 -> 애플리케이션 추가하기 -> 플렛폼 설정 -> 플렛폼 등록 ( 내 ip주소로 작성 ) 앱 키 복사 -> 원하는 코드 가져와서 작성후 앱 키 붙여넣기 paho-mqtt 라이브러리 ●map02.html MQTT Web Subscribe Client please enter Server host and port. host : port : topic : connection status : disconnect Message : mosquitto.conf파일을 VSCode로 열어서 web소켓 ( 490번줄에 ) 다음과같이 코드 작성 ▼ #websockets_log_level 0 listener 9001 protocol web.. 2021. 4. 30. 카메라 사용 ●AndroidManifest.xml xml이라는 Android Resource Directory만들고 그 안에 file_paths.xml 파일 만들기 ●file_paths.xml ●MainActivity package com.kmg.ex0414; public class MainActivity extends AppCompatActivity { private ImageView img; private Button btn_picture, btn_gallery; private final int REQUEST_TAKE_PICTURE = 1; private final int GET_GALLERY_IMAGE = 2; private String currentPhotoPath; @Override protected voi.. 2021. 4. 14. MONGO + MQTT로 브라우저LED제어 ◆ VS Code에서 서버 만들기 const http=require("http"); const server=http.createServer((req,res)=>{ if(req.url==="/"){ res.write("Node.js Server"); }else{ res.write("Not URL"); } res.end(); }); server.listen(3000, ()=>{ // 구동하기 , 3000 - 포트번호 , listen - 대기 console.log("Server port 3000 is running"); }); ctrl + ` 누르면 터미널 나옴 node app.js 하면 3000번 포트가 실행된다 ctrl + c 누르면 종료 ◆ Express 모듈로 사용하기 - http 모듈처럼 사용할 수 .. 2021. 4. 7. 이전 1 2 3 4 5 다음 반응형