{"id":83807,"date":"2020-09-28T07:07:12","date_gmt":"2020-09-28T07:07:12","guid":{"rendered":"https:\/\/www.baeldung.com\/?p=87765"},"modified":"2020-09-28T07:07:12","modified_gmt":"2020-09-28T07:07:12","slug":"get-the-running-port-in-spring-boot","status":"publish","type":"post","link":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/2020\/09\/28\/get-the-running-port-in-spring-boot\/","title":{"rendered":"Get the Running Port in Spring Boot"},"content":{"rendered":"<p class=\"syndicated-attribution\"><meta name= \\\"keywords \\\" content= \\\"\u96fb\u5b50\u8a08\u7b97\u6a5f, \u6559\u80b2, IT \u96fb\u8166\u73ed,\u96fb\u8166\u88dc\u7fd2\uff0c \u96fb\u8166\u73ed\uff0c \u5bb6\u6559\uff0c \u79c1\u4eba\u8001\u5e2b\uff0c \u8cc7\u8a0a\u6280\u8853\uff0c \u7a0b\u5e8f\u8a2d\u8a08\uff0c \u96fb\u5b50\u8a08\u7b97\u6a5f\uff0c \u904a\u6232\uff0c \u860b\u679c\uff0c \u96fb\u5f71\uff0c \u8a08\u7b97\u6a5f\uff0c\u7de8\u78bc\uff0c Java\uff0c C\/C++\uff0c JavaScript\uff0c PHP\uff0c HTML\uff0c CSS\uff0c MySQL\uff0c mobile\uff0c Android\uff0c \u52d5\u6f2b\uff0c Python\uff0c teacher\uff0c \u88dc\u7fd2\uff0c \u96fb\u8166\u88dc\u7fd2 \u8cc7\u8a0a, \u7535\u5b50\u8ba1\u7b97\u673a, IT ,Game, apple, movie, Computer,student,Java,\u6559\u80b2, ,\u5b66\u751f, \u5b66\u4e60, learn, \u6559\u5b66,  Android, apple,anime, animation, \u4fe1\u606f\u6280\u672f, \u7a0b\u5e8f\u8bbe\u8ba1, \u79fb\u52a8\u7535\u8bdd, \u8cc7\u8a0a\u79d1\u6280,Game, Jeu, Juego,Call Of Duty ,\u4f7f\u547d\u53ec\u559a , \u6e38\u620f, \u7535\u5b50\u6e38\u620f,, \u591a\u4eba\u7535\u5b50\u6e38\u620f, \u7f51\u7edc\u6e38\u620f\uff0conline\uff0conline game, \u624b\u673a\u6e38\u620f, mobile \\\"><\/p>\n<h2 data-id=\"overview-2\">1. Overview<\/h2>\n<div class=\"bd-anchor\" id=\"overview-2\"><\/div>\n<p>A Spring Boot application embeds a web server, and sometimes, we may want to discover the HTTP port at runtime.<\/p>\n<p>In this tutorial, we&#8217;ll address how to get the HTTP port programmatically in a Spring Boot application.<\/p>\n<h2 data-id=\"introduction\">2. Introduction<\/h2>\n<div class=\"bd-anchor\" id=\"introduction\"><\/div>\n<h3 data-id=\"1-our-spring-boot-application\">2.1. Our Spring Boot Application<\/h3>\n<div class=\"bd-anchor\" id=\"1-our-spring-boot-application\"><\/div>\n<p>We&#8217;ll create a simple Spring Boot application example to quickly show the methods to discover the HTTP port at runtime:<\/p>\n<pre><code class=\"language-java\">@SpringBootApplication\r\npublic class GetServerPortApplication {\r\n    public static void main(String[] args) {\r\n        SpringApplication.run(GetServerPortApplication.class, args);\r\n    }\r\n}\r\n<\/code><\/pre>\n<h3 data-id=\"2-two-scenarios-of-setting-the-port\">2.2. Two Scenarios of Setting the Port<\/h3>\n<div class=\"bd-anchor\" id=\"2-two-scenarios-of-setting-the-port\"><\/div>\n<p>Usually, the most straightforward way to <a href=\"https:\/\/feeds.feedblitz.com\/~\/t\/0\/0\/baeldung\/~https:\/\/www.baeldung.com\/spring-boot-change-port#properties\">configure the HTTP port<\/a> of a Spring Boot application is by defining the port in the configuration file <em>application.properties<\/em> or <em>application.yml<\/em>.<\/p>\n<p>For example, in the <em>application.properties<\/em> file, we can set <em>7777<\/em> as the port our application is running on:<\/p>\n<pre><code class=\"language-bash\">server.port=7777\r\n<\/code><\/pre>\n<p>Alternatively, instead of defining a fixed port, <strong>we can let the Spring Boot application run on a random port by setting &#8220;<em>0<\/em>&#8221; as the value of the &#8220;<em>server.port<\/em>&#8221; property<\/strong>:<\/p>\n<pre><code class=\"language-bash\">server.port=0\r\n<\/code><\/pre>\n<p>Next, let&#8217;s go through the two scenarios and discuss different ways to get the port programmatically at runtime.<\/p>\n<p>In this tutorial, we&#8217;ll discover the server port in unit tests.<\/p>\n<h2 data-id=\"getting-a-fixed-port-at-runtime\">3. Getting a Fixed Port at Runtime<\/h2>\n<div class=\"bd-anchor\" id=\"getting-a-fixed-port-at-runtime\"><\/div>\n<p>Let&#8217;s create a properties file <em>application-fixedport.properties<\/em> and define a fixed port <em>7777 <\/em>in it:<\/p>\n<pre><code class=\"language-bash\">server.port=7777<\/code><\/pre>\n<p>Next, we&#8217;ll try to get the port in a unit test class:<\/p>\n<pre><code class=\"language-java\">@RunWith(SpringRunner.class)\r\n@SpringBootTest(classes = GetServerPortApplication.class,\r\n  webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)\r\n@ActiveProfiles(\"fixedport\")\r\npublic class GetServerFixedPortUnitTest {\r\n    private final static int EXPECTED_PORT = 7777;\r\n    ....\r\n}\r\n<\/code><\/pre>\n<p>Before we see the test methods, let&#8217;s take a quick look at the annotations of the test class:<\/p>\n<ul>\n<li><em>@RunWith(SpringRunner.class)<\/em> &#8211; This will join the JUnit test with the Spring <em>TestContext<\/em><\/li>\n<li><em>@SpringBootTest( &#8230; SpringBootTest.WebEnvironment.DEFINED_PORT)<\/em> &#8211; In the <em>SpringBootTest<\/em>, we&#8217;ll use the <em>DEFINED_PORT<\/em> for the embedded web server<\/li>\n<li><em>@ActiveProfiles(&#8220;fixedport&#8221;)<\/em> &#8211; With this annotation, we enabled the <a href=\"https:\/\/feeds.feedblitz.com\/~\/t\/0\/0\/baeldung\/~https:\/\/www.baeldung.com\/spring-profiles\">Spring profile<\/a> &#8220;<em>fixedport<\/em>&#8221; so that our <em>application-fixedport.properties<\/em> will be loaded<\/li>\n<\/ul>\n<h3 data-id=\"1-using-the-valueserverport-annotation\">3.1. Using the <em>@Value(&#8220;${server.port}&#8221;)<\/em> Annotation<\/h3>\n<div class=\"bd-anchor\" id=\"1-using-the-valueserverport-annotation\"><\/div>\n<p>Since the <em>application-fixedport.properties<\/em> file will be loaded, we can get the &#8220;<em>server.port<\/em>&#8221; property using the <a href=\"https:\/\/feeds.feedblitz.com\/~\/t\/0\/0\/baeldung\/~https:\/\/www.baeldung.com\/spring-value-annotation\"><em>@Value<\/em> annotation<\/a>:<\/p>\n<pre><code class=\"language-java\">@Value(\"${server.port}\")\r\nprivate int serverPort;\r\n@Test\r\npublic void givenFixedPortAsServerPort_whenReadServerPort_thenGetThePort() {\r\n    assertEquals(EXPECTED_PORT, serverPort);\r\n}\r\n<\/code><\/pre>\n<h3 data-id=\"2-using-the-serverproperties-class\">3.2. Using the <em>ServerProperties<\/em> Class<\/h3>\n<div class=\"bd-anchor\" id=\"2-using-the-serverproperties-class\"><\/div>\n<p><em><a href=\"https:\/\/feeds.feedblitz.com\/~\/t\/0\/0\/baeldung\/~https:\/\/docs.spring.io\/spring-boot\/docs\/current\/api\/org\/springframework\/boot\/autoconfigure\/web\/ServerProperties.html\">ServerProperties<\/a><\/em> holds the properties of the embedded web server, such as the port, the address, and the server header.<\/p>\n<p>We can inject a <em>ServerProperties<\/em> component and get the port from it:<\/p>\n<pre><code class=\"language-java\">@Autowired\r\nprivate ServerProperties serverProperties;\r\n@Test\r\npublic void givenFixedPortAsServerPort_whenReadServerProps_thenGetThePort() {\r\n    int port = serverProperties.getPort();\r\n \r\n    assertEquals(EXPECTED_PORT, port);\r\n}<\/code><\/pre>\n<p>So far, we&#8217;ve learned two ways to get a fixed port at runtime. Next, let&#8217;s see how to discover the port in the random port scenario.<\/p>\n<h2 data-id=\"getting-random-port-at-runtime\">4. Getting Random Port at Runtime<\/h2>\n<div class=\"bd-anchor\" id=\"getting-random-port-at-runtime\"><\/div>\n<p>This time, let&#8217;s create another properties file <em>application-randomport.properties<\/em>:<\/p>\n<pre><code class=\"language-bash\">server.port=0<\/code><\/pre>\n<p>As the code above shows, we allow Spring Boot to choose a free port randomly when the web server starts.<\/p>\n<p>In the same vein, let&#8217;s create another unit test class:<\/p>\n<pre><code class=\"language-java\">....\r\n@ActiveProfiles(\"randomport\")\r\npublic class GetServerRandomPortUnitTest {\r\n...\r\n}\r\n<\/code><\/pre>\n<p>Here, we need to activate the &#8220;<em>randomport<\/em>&#8221; Spring profile to load the corresponding properties file.<\/p>\n<p>We&#8217;ve learned two ways to discover a fixed port at runtime. However, they can&#8217;t help us to get the random port:<\/p>\n<pre><code class=\"language-java\">@Value(\"${server.port}\")\r\nprivate int randomServerPort;\r\n@Test\r\npublic void given0AsServerPort_whenReadServerPort_thenGet0() {\r\n    assertEquals(0, randomServerPort);\r\n}\r\n@Autowired\r\nprivate ServerProperties serverProperties;\r\n@Test\r\npublic void given0AsServerPort_whenReadServerProps_thenGet0() {\r\n    int port = serverProperties.getPort();\r\n \r\n    assertEquals(0, port);\r\n}\r\n<\/code><\/pre>\n<p>As the two test methods show, <strong>both <em>@Value(&#8220;${server.port}&#8221;)<\/em> and <em>serverProperties.getPort()<\/em> report &#8220;0&#8221; as the port.<\/strong> Clearly, it is not the correct port we are expecting.<\/p>\n<h3 data-id=\"1-using-servletwebserverapplicationcontext\">4.1. Using <em>ServletWebServerApplicationContext<\/em><\/h3>\n<div class=\"bd-anchor\" id=\"1-using-servletwebserverapplicationcontext\"><\/div>\n<p>Spring Boot starts a <a href=\"https:\/\/feeds.feedblitz.com\/~\/t\/0\/0\/baeldung\/~https:\/\/docs.spring.io\/spring-boot\/docs\/current\/api\/org\/springframework\/boot\/web\/servlet\/context\/ServletWebServerApplicationContext.html\"><em>ServletWebServerApplicationContext<\/em><\/a> if the embedded web server starts.<\/p>\n<p>Therefore, we can get the <em><a href=\"https:\/\/feeds.feedblitz.com\/~\/t\/0\/0\/baeldung\/~https:\/\/docs.spring.io\/spring-boot\/docs\/current\/api\/org\/springframework\/boot\/web\/server\/WebServer.html\">WebServer<\/a> <\/em> from the context object to obtain the server information or manipulate the server:<\/p>\n<pre><code class=\"language-java\">@Autowired\r\nprivate ServletWebServerApplicationContext webServerAppCtxt;\r\n@Test\r\npublic void given0AsServerPort_whenReadWebAppCtxt_thenGetThePort() {\r\n    int port = webServerAppCtxt.getWebServer().getPort();\r\n \r\n    assertTrue(port &gt; 1023);\r\n}\r\n<\/code><\/pre>\n<p>In the test above, we check if the port is greater than 1023. This is because 0-1023 are system ports.<\/p>\n<h3 data-id=\"2-handling-servletwebserverinitializedevent\">4.2. Handling <em>ServletWebServerInitializedEvent<\/em><\/h3>\n<div class=\"bd-anchor\" id=\"2-handling-servletwebserverinitializedevent\"><\/div>\n<p>A Spring application can publish various <a href=\"https:\/\/feeds.feedblitz.com\/~\/t\/0\/0\/baeldung\/~https:\/\/www.baeldung.com\/spring-events\">events<\/a>\u00a0and <em><a href=\"https:\/\/feeds.feedblitz.com\/~\/t\/0\/0\/baeldung\/~https:\/\/www.baeldung.com\/spring-events#annotation-driven\">EventListeners<\/a><\/em> handle the events.<\/p>\n<p>When the embedded web server has started, a <em><a href=\"https:\/\/feeds.feedblitz.com\/~\/t\/0\/0\/baeldung\/~https:\/\/docs.spring.io\/spring-boot\/docs\/current\/api\/org\/springframework\/boot\/web\/servlet\/context\/ServletWebServerInitializedEvent.html\">ServletWebServerInitializedEvent<\/a>\u00a0<\/em>will be published. This event contains information about the webserver.<\/p>\n<p>Therefore, we can create an <em>EventListener\u00a0<\/em>to get the port from this event:<\/p>\n<pre><code class=\"language-java\">@Service\r\npublic class ServerPortService {\r\n    private int port;\r\n    public int getPort() {\r\n        return port;\r\n    }\r\n    @EventListener\r\n    public void onApplicationEvent(final ServletWebServerInitializedEvent event) {\r\n        port = event.getWebServer().getPort();\r\n    }\r\n}<\/code><\/pre>\n<p>We can inject the service component to our test class to get the random port quickly:<\/p>\n<pre><code class=\"language-java\">@Autowired\r\nprivate ServerPortService serverPortService;\r\n@Test\r\npublic void given0AsServerPort_whenReadFromListener_thenGetThePort() {\r\n    int port = serverPortService.getPort();\r\n \r\n    assertTrue(port &gt; 1023);\r\n}\r\n<\/code><\/pre>\n<h2 data-id=\"conclusion-2\">5. Conclusion<\/h2>\n<div class=\"bd-anchor\" id=\"conclusion-2\"><\/div>\n<p>Usually, we configure the server port of a Spring Boot application in a properties file or YAML file, where we can set either a fixed or random port.<\/p>\n<p>In this article, we&#8217;ve discussed different approaches to obtain the fixed and random port at runtime.<\/p>\n<p>As always, the full source code of the article is available <a href=\"https:\/\/feeds.feedblitz.com\/~\/t\/0\/0\/baeldung\/~https:\/\/github.com\/eugenp\/tutorials\/tree\/master\/spring-boot-modules\/spring-boot-environment\">over on GitHub<\/a>.<\/p>\n<p>The post <a href=\"https:\/\/feeds.feedblitz.com\/~\/t\/0\/0\/baeldung\/~https:\/\/www.baeldung.com\/spring-boot-running-port\/\" >Get the Running Port in Spring Boot<\/a> first appeared on <a href=\"https:\/\/feeds.feedblitz.com\/~\/t\/0\/0\/baeldung\/~https:\/\/www.baeldung.com\/\" >Baeldung<\/a>.<\/p>\n<p><Img align=\"left\" border=\"0\" height=\"1\" width=\"1\" alt=\"\" style=\"border:0;float:left;margin:0;padding:0;width:1px!important;height:1px!important;\" hspace=\"0\" src=\"https:\/\/feeds.feedblitz.com\/~\/i\/636049846\/0\/baeldung\"><\/p>\n<div style=\"clear:both;padding-top:0.2em;\"><a title=\"Like on Facebook\" href=\"https:\/\/feeds.feedblitz.com\/_\/28\/636049846\/baeldung\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/fblike20.png\" style=\"border:0;margin:0;padding:0;\"><\/a>&#160;<a title=\"Share on Google+\" href=\"https:\/\/feeds.feedblitz.com\/_\/30\/636049846\/baeldung\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/googleplus20.png\" style=\"border:0;margin:0;padding:0;\"><\/a>&#160;<a title=\"Pin it!\" href=\"https:\/\/feeds.feedblitz.com\/_\/29\/636049846\/baeldung,\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/pinterest20.png\" style=\"border:0;margin:0;padding:0;\"><\/a>&#160;<a title=\"Tweet This\" href=\"https:\/\/feeds.feedblitz.com\/_\/24\/636049846\/baeldung\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/twitter20.png\" style=\"border:0;margin:0;padding:0;\"><\/a>&#160;<a title=\"Subscribe by email\" href=\"https:\/\/feeds.feedblitz.com\/_\/19\/636049846\/baeldung\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/email20.png\" style=\"border:0;margin:0;padding:0;\"><\/a>&#160;<a title=\"Subscribe by RSS\" href=\"https:\/\/feeds.feedblitz.com\/_\/20\/636049846\/baeldung\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/rss20.png\" style=\"border:0;margin:0;padding:0;\"><\/a>&#160;<a rel=\"NOFOLLOW\" title=\"View Comments\" href=\"https:\/\/www.baeldung.com\/spring-boot-running-port#respond\"><img decoding=\"async\" height=\"20\" style=\"border:0;margin:0;padding:0;\" src=\"https:\/\/assets.feedblitz.com\/i\/comments20.png\"><\/a>&#160;<a title=\"Follow Comments via RSS\" href=\"https:\/\/www.baeldung.com\/spring-boot-running-port\/feed\/\"><img decoding=\"async\" height=\"20\" style=\"border:0;margin:0;padding:0;\" src=\"https:\/\/assets.feedblitz.com\/i\/commentsrss20.png\"><\/a>&#160;<\/div>\n\n<p class=\"syndicated-attribution\"><figure class= \\\"wp-block-image alignnone \\\"><img src= \\\"http:\/\/itteacheritfreelance.hk\/test\/wordpress\/wp-content\/uploads\/2016\/05\/logo2-2.png\\\" alt=\\\"IT\u96fb\u8166\u88dc\u7fd2 java\u88dc\u7fd2 \u70ba\u5927\u5bb6\u914d\u5c0d\u96fb\u8166\u88dc\u7fd2,IT freelance, \u79c1\u4eba\u8001\u5e2b, PHP\u88dc\u7fd2,CSS\u88dc\u7fd2,XML,Java\u88dc\u7fd2,MySQL\u88dc\u7fd2,graphic design\u88dc\u7fd2,\u4e2d\u5c0f\u5b78ICT\u88dc\u7fd2,\u4e00\u5c0d\u4e00\u79c1\u4eba\u88dc\u7fd2\u548cFreelance\u81ea\u7531\u5de5\u4f5c\u914d\u5c0d\u3002\\\"\/><figcaption>\u7acb\u523b\u8a3b\u518a\u53ca\u5831\u540d\u96fb\u8166\u88dc\u7fd2\u8ab2\u7a0b\u5427!<\/figcaption><\/figure>\r\n<\/br>Find A Teacher Form:\r\n<\/br>https:\/\/docs.google.com\/forms\/d\/1vREBnX5n262umf4wU5U2pyTwvk9O-JrAgblA-wH9GFQ\/viewform?edit_requested=true#responses\r\n<\/br><\/br>Email:\r\n<\/br>public1989two@gmail.com<br><br><br><br><br><br><br>\r\n<a href=www.itsec.hk style=color:#FFFFFF;>www.itsec.hk<\/a><br>\r\n<a href=\\\"www.itsec.vip\\\" style=color:#FFFFFF;>www.itsec.vip<\/a><br>\r\n<a href=\\\"www.itseceu.uk\\\" style=color:#FFFFFF;>www.itseceu.uk<\/a><br><\/p>","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>Learn how to get the HTTP port programmatically in a Spring Boot application<\/p>\n<p>The post <a rel=\"NOFOLLOW noopener noreferrer\" href=\"https:\/\/feeds.feedblitz.com\/~\/636049846\/0\/baeldung~Get-the-Running-Port-in-Spring-Boot\/\" target=\"_blank\">Get the Running Port in Spring Boot<\/a> first appeared on <a rel=\"NOFOLLOW noopener noreferrer\" href=\"https:\/\/www.baeldung.com\/\" target=\"_blank\">Baeldung<\/a>.<\/p>\n<div><a title=\"Like on Facebook\" href=\"https:\/\/feeds.feedblitz.com\/_\/28\/636049846\/baeldung\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/fblike20.png\"><\/a>&nbsp;<a title=\"Share on Google+\" href=\"https:\/\/feeds.feedblitz.com\/_\/30\/636049846\/baeldung\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/googleplus20.png\"><\/a>&nbsp;<a title=\"Pin it!\" href=\"https:\/\/feeds.feedblitz.com\/_\/29\/636049846\/baeldung,\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/pinterest20.png\"><\/a>&nbsp;<a title=\"Tweet This\" href=\"https:\/\/feeds.feedblitz.com\/_\/24\/636049846\/baeldung\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/twitter20.png\"><\/a>&nbsp;<a title=\"Subscribe by email\" href=\"https:\/\/feeds.feedblitz.com\/_\/19\/636049846\/baeldung\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/email20.png\"><\/a>&nbsp;<a title=\"Subscribe by RSS\" href=\"https:\/\/feeds.feedblitz.com\/_\/20\/636049846\/baeldung\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/rss20.png\"><\/a>&nbsp;<a rel=\"NOFOLLOW\" title=\"View Comments\" href=\"https:\/\/www.baeldung.com\/spring-boot-running-port#respond\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/comments20.png\"><\/a>&nbsp;<a title=\"Follow Comments via RSS\" href=\"https:\/\/www.baeldung.com\/spring-boot-running-port\/feed\/\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/commentsrss20.png\"><\/a>&nbsp;<\/div>\n<\/div>","protected":false},"author":915,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"Get the Running Port in Spring Boot - ITTeacherITFreelance.hk","description":"Learn how to get the HTTP port programmatically in a Spring Boot application The post Get the Running Port in Spring Boot first appeared on Baeldung . &nbsp; &n"},"footnotes":""},"categories":[6],"tags":[],"_links":{"self":[{"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/83807"}],"collection":[{"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/915"}],"replies":[{"embeddable":true,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=83807"}],"version-history":[{"count":4,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/83807\/revisions"}],"predecessor-version":[{"id":85412,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/83807\/revisions\/85412"}],"wp:attachment":[{"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=83807"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=83807"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=83807"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}