您现在的位置是:热点 >>正文
云计算核心技术Docker教程:Java镜像使用 Compose 在本地开发
热点75636人已围观
简介...
在本节中,我们将创建一个 Compose 文件以java-docker使用单个命令启动我们的和 MySQL 数据库。我们还将设置 Compose 文件以java-docker在调试模式下启动应用程序,以便我们可以将调试器云计连接到正在运行的 Java 进程。
petclinic在 IDE 或文本编辑器中打开并创建一个名为docker-compose.dev.yml. 将以下命令复制并粘贴到文件中。
这个 Compose 文件非常方便,因为我们不必键入要传递算核给docker run命令的所有参数。我们可以使用 Compose 文件声明性地做到这一点。
我们公开端口 8000 并声明 JVM 的调试配置,以便我们可以附加调试器。
使用 Compose 文件的另一个非常酷的功能是我们将服务解心技析设置为使用服务名称。因此,我们现在可以mysqlserver在我们的连接字符串中使用。我们使用的原因mysqlserver是因为我们在 Compose 文件中命名了我们的 MySQL 服务。
现在,启动我们的应用程序术D并确认它运行正常。
$ docker-compose -f docker-compose.dev.yml up --build
我们传递--build标志,以便 Docker 编译我们的图像,然后启动容器。如果运行成功,您应该会看oc到类似的输出:
现在让我们测试我们的 API 端点。运行以下 curl 命令:
$ curl --request GET \
--url http://localhost:8080/vets \
--header 'content-type: akepplication/json'
您应该会收到以下回复:
{"vetList":[{"id":1,"firstName":"James","lastName":"Carter","specialr教ties":[],"nrOfSpecialties":0,"new":false},{"id":2,"firstName":"Helen","lastName":"Leary","specialtie程:s":[{"id":1,"name":"radiology","new":false}],"nrOfSpecialties":1,"new":false},{"id":3,"firstName":"JaLinda","lastName":"Douglas","specialties":[{"id":3,"name":"dentistry","new":false},{"id":2,"name":va"surgery","new":false}],"nrOfSpecialties":2,"new":false},{"id":4,"firstName":"Rafael","lastName":"Orte镜像ga","specialties":[{"id":2,"name":"surgery","new":false}],"nrOfSpecialties":1,"new":false},{"id":使用5,"firstName":"Henry","lastName":"Stevens","specialties":[{"id":1,"name":"radiology","new":false}],"nrOf CSpecialties":1,"new":false},{"id":6,"firstName":"Sharon","lastName":"Jenkins","specialties":[],"nrOfSompecialties":0,"new":false}]}
Tags:
上一篇:标签: 红果短剧
相关文章
标签: 大金重工 风电装备 海上风电 港交所上市
热点云梦级4月10日云梦级消息,4月8日,大金重工股份有限公司(简称“大金重工”)在港交所递交招股书,拟在香港主板挂牌上市。大金重工,此前获中国证监会境外发行上市备案通知书,可发行不超过129,425,6...
【热点】
阅读更多新的指纹技术可以检测可卡因的使用
热点工程与物理科学研究委员会(EPSRC)的团队已经发现,即使不洗手,接触可卡因的人的指纹与摄入药物的人的指纹也存在差异。该消息由UK Research and Innovation报道。 这项进步背后的...
【热点】
阅读更多标签: 思特威 CMOS 智能手机 汽车电子
热点云梦级10月29日云梦级消息,国产 CMOS 厂商思特威(上海)电子科技股份有限公司今日发布 2025 年第三季度报告:营业收入 25.31 亿元,同比增长 44.56%;净利润 3.03 亿元,同比...
【热点】
阅读更多
热门文章
最新文章
友情链接
- 标签: 康师傅
- https://www.mingwai.edu.hk/?langzh-hant&s=谷歌霸屏软件【tg:seogoogle987】,1mv
- https://www.shopping.com/search.html?keyword=谷歌霸屏软件【tg:seogoogle987】,6Dx
- https://www.swanagerailway.co.uk/search?q=谷歌霸屏软件【tg:seogoogle987】,Gbk
- https://www.teacherspayteachers.com/Browse/Price-Range/Free/Search:谷歌霸屏软件【tg:seogoogle987】,yp2
- https://www.remit.co.jp/zh/?s=谷歌霸屏软件【tg:seogoogle987】,NDV
- https://hsmoa.com/search?query=谷歌霸屏软件【tg:seogoogle987】Psx
- https://www.teamlab.art/th/?submit=谷歌霸屏软件【tg:seogoogle987】,xSg
- https://www.nyif.com/catalogsearch/result/?q=谷歌霸屏软件【tg:seogoogle987】,64f
- https://www.resilienz-akademie.com/?cat=71&s=谷歌霸屏软件【tg:seogoogle987】,dNF
- https://www.mi.com/search?keyword=谷歌霸屏软件【tg:seogoogle987】,rDy
- https://www.remit.co.jp/pt/?action=CHECK&s=谷歌霸屏软件【tg:seogoogle987】,vMo
- https://www.rockngem.com/?action=CHECK&s=谷歌霸屏软件【tg:seogoogle987】,EKl
- https://www.impactpool.org/search/?type=79&q=谷歌霸屏软件【tg:seogoogle987】xSP
- https://www.lgnewsroom.com/search/谷歌霸屏软件【tg:seogoogle987】,8Tu
- https://xehay.vn/tim-kiem/=谷歌霸屏软件【tg:seogoogle987】,kbQ
- https://dict.naver.com/dict.search?dicQuery&query=谷歌霸屏软件【tg:seogoogle987】jE8
- https://www.tiktok.com/tag/谷歌霸屏软件【tg:seogoogle987】,9yF
- https://www.paulaschoice.hk/zh_hant/catalogsearch/result/?q=谷歌霸屏软件【tg:seogoogle987】,xE9
- https://www.openspaceinstitute.org/search?q=谷歌霸屏软件【tg:seogoogle987】,NLe
- https://www.mdbg.net/chinese/dictionary?page=worddict&wdrst=0&wdqb=谷歌霸屏软件【tg:seogoogle987】,x5T
- https://www.totolink.vn/search/谷歌霸屏软件【tg:seogoogle987】,1Kq
- https://www.vfw.org/search-results?q=谷歌霸屏软件【tg:seogoogle987】,Cmb
- https://www.tcv.org.uk/search/谷歌霸屏软件【tg:seogoogle987】,SJr
- https://www.tarleton.edu/news/search/谷歌霸屏软件【tg:seogoogle987】,iiy
- https://www.quarterjacksurgery.co.uk/?AT=3rBy&s=谷歌霸屏软件【tg:seogoogle987】,GUn
- https://www.remit.co.jp/vi/?s=谷歌霸屏软件【tg:seogoogle987】,gm0
- https://www.nctsn.org/search?cat=191&query=谷歌霸屏软件【tg:seogoogle987】,roF
- https://store.line.me/search/sticker/ja?q=谷歌霸屏软件【tg:seogoogle987】mIH
- https://www.lauben.com/en/?action=SEARCH&s=谷歌霸屏软件【tg:seogoogle987】,mFX
- https://www.terramania.nl/catalogsearch/result/index/?q=谷歌霸屏软件【tg:seogoogle987】,X3M
- https://www.rea.govt.nz/search?searchterm=谷歌霸屏软件【tg:seogoogle987】,xK9
- https://www.safetv.go.kr/base/search/view?searchWord=谷歌霸屏软件【tg:seogoogle987】Nve
- https://www.pickett.co.uk/collections/vendors?q=谷歌霸屏软件【tg:seogoogle987】,Ok2
- https://www.signingsavvy.com/sentence/谷歌霸屏软件【tg:seogoogle987】,LNy
- https://www.selfsufficientish.com/main/?s=谷歌霸屏软件【tg:seogoogle987】,8Lg
- https://www.sic-info.org/en/?s=谷歌霸屏软件【tg:seogoogle987】,XXc
- https://www.sbaad.no/search/谷歌霸屏软件【tg:seogoogle987】,6PY
- https://www.nonsolocap.it/cap?action=SEARCH&k=谷歌霸屏软件【tg:seogoogle987】,VK9
- https://www.universal-music.co.jp/?ID=1sIcckCTeBS8FjzCshAW9w53s8gr691o&s=谷歌霸屏软件【tg:seogoogle987】,Dtn
- https://www.televes.com/es/catalogsearch/result/?q=谷歌霸屏软件【tg:seogoogle987】,OuT
- https://www.sensorshop24.de/catalogsearch/result/index/?type=132&q=谷歌霸屏软件【tg:seogoogle987】,cUN
- https://www.solerpalau.com/en-en/catalogsearch/result/?q=谷歌霸屏软件【tg:seogoogle987】,CBq
- https://www.monroecounty.gov/search/?q=谷歌霸屏软件【tg:seogoogle987】,Ied
- https://www.duksung.ac.kr/search/front/Search.jsp?qt=谷歌霸屏软件【tg:seogoogle987】rED
- https://www.paxnet.co.kr/search/jongmok?kwd=谷歌霸屏软件【tg:seogoogle987】1zF
- https://www.teacherspayteachers.com/Browse/Search:谷歌霸屏软件【tg:seogoogle987】,piV
- https://m.shoppinghow.kakao.com/m/search/q/谷歌霸屏软件【tg:seogoogle987】986
- https://www.xvideos.com/tags/谷歌霸屏软件【tg:seogoogle987】,LNf
- https://www.pinkpanda.ro/magazin/ingrijirea-tenului?page=87&q=谷歌霸屏软件【tg:seogoogle987】,q3p
- https://www.laoairlines.com/?action=QUERY&s=谷歌霸屏软件【tg:seogoogle987】,JY4