{"id":3094,"date":"2019-02-25T12:15:53","date_gmt":"2019-02-25T12:15:53","guid":{"rendered":"http:\/\/codethataint.com\/blog\/?p=3094"},"modified":"2024-10-07T14:41:21","modified_gmt":"2024-10-07T14:41:21","slug":"spring-annotations-interview-questions","status":"publish","type":"post","link":"https:\/\/codethataint.com\/blog\/spring-annotations-interview-questions\/","title":{"rendered":"Spring annotations interview questions"},"content":{"rendered":"<p><strong class=\"ctaHeader3\">What are different ways to create Bean in Spring Boot?<\/strong><\/p>\n<ol>\n<li>Using<strong> @Component<\/strong> over class  &#8211; To create app specific bean<\/li>\n<li>Using <strong>@Configuration<\/strong> over class and <strong>@Bean<\/strong> over method &#8211; To create bean from third party class added as JAR dependency. You cannot add component in added JAR class files.<\/li>\n<\/ol>\n<p><strong class=\"ctaHeader3\">What is Dependency Injection?<\/strong><br \/>\nDependency injection is basically providing the objects that an object needs (its dependencies) instead of having it construct them itself. <\/p>\n<p><strong class=\"ctaHeader3\">What are Types of Dependency Injection?<\/strong><\/p>\n<ol>\n<li><strong>Constructor Injection<\/strong> &#8211; Dependency provided as parameter to constructor. This ensures Object is fully initialized upon creation and promoting immutability<\/li>\n<li><strong>Setter Injection<\/strong> &#8211; Setter injection is having independent setter for each class attributes and calling setter method while initializing. Setter Injection allow more flexibility by allowing dependencies to be set or changed after object creation.<\/li>\n<li><strong>Field Injection<\/strong> &#8211; Field injection is old method of injecting dependencies by specifying the @Autowired over field name. It works based on Java reflection and it is not recommended  as it makes code more difficult to test<\/li>\n<\/ol>\n<p><strong class=\"ctaHeader3\">What are Stereotype Annotations?<\/strong><\/p>\n<blockquote><p><em>Stereotype <\/em>&#8211; idea of a particular type of person or thing. <\/p><\/blockquote>\n<p>Spring comes with 4 Stereotype annotations as below.<\/p>\n<p><strong>@Component<\/strong> is a generic stereotype for any Spring-managed component. <strong>@Repository, @Service, @Controller<\/strong> are specializations of @Component for more specific use cases (in the persistence, service, and presentation layers, respectively).<br \/>\n<img decoding=\"async\" src=\"https:\/\/codethataint.com\/blog\/wp-content\/uploads\/2024\/09\/StereotypeAnnotation.png\" alt=\"\" \/><\/p>\n<ol>\n<li><strong>@Component<\/strong> general-purpose stereotype annotation indicating that the class is a spring component.<\/li>\n<li><strong>@Controller<\/strong> @Controller annotation indicates that a particular class serves the role of a controller. The dispatcher scans the classes annotated with @Controller and detects methods annotated with @RequestMapping annotations within them. We can use @RequestMapping on\/in only those methods whose classes are annotated with @Controller<\/li>\n<li><strong>@Repository<\/strong><\/li>\n<p> stereotype for persistence layer. @Repository\u2019s job is to catch platform specific exceptions and re-throw them as one of Spring\u2019s unified unchecked exception. By masking the platform specific exception to spring unified exception it helps 1.Providing higher level of Abstraction for User 2.By throwing unchecked exception it prevents user from adding unnecessary boiler plate for exception handling by means of try catch blocks<\/p>\n<li><strong>@Service<\/strong> &#8211; @Service beans hold the business logic and call methods in the repository layer.<\/li>\n<\/ol>\n<p><strong>Note :<\/strong> <em>Spring may add special functionalities for @Service, @Controller and @Repository based on their layering conventions.<\/em><\/p>\n<p>How it is internally is all 3 are marked with @Component.@CompnentScan only scans @Component and does not look for @Controller, @Service and @Repository in general. They are scanned because they themselves are annotated with @Component. <\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n@Component\r\npublic @interface Service {\r\n    \u2026.\r\n}\r\n\r\n@Component\r\npublic @interface Repository {\r\n    \u2026.\r\n}\r\n\r\n@Component\r\npublic @interface Controller {\r\n    \u2026\r\n}\r\n<\/pre>\n<p><strong class=\"ctaHeader3\">What happens when more than one bean of same type is found? What would be workaround?<\/strong><br \/>\nApplication would fail to start with error message <em>Require Single bean but N beans found<\/em>. <\/p>\n<p>This could be addressed in two ways<\/p>\n<ol>\n<li>Using<strong> @Qualifier<\/strong> annotation<\/li>\n<li>Using <strong>@Primary<\/strong> annotation<\/li>\n<\/ol>\n<p><strong>@Qualifier<\/strong> annotation takes bean Id as value to uniquely identify a bean.<\/p>\n<p><strong>StudentController.java<\/strong><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">public class StudentController{\r\n .\r\n @Autowired\r\n public StudentController(@Qualifier(&quot;student&quot;) Person person){\r\n .\r\n }\r\n}\r\n<\/pre>\n<p><strong>Student.java<\/strong><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">@Component\r\npublic class Student implements Person{\r\n.\r\n}\r\n<\/pre>\n<p><strong>@Primary<\/strong> annotation works by giving first preference to bean which is marked with @Primary annotation. If two beans are marked with @Primary annotation then Spring boot throws an error. If both @Primary and @Qualifier annotation is used, then @Qualifier annotation takes preference.<\/p>\n<p><strong class=\"ctaHeader3\">@Primary vs @Qualifier Which one takes precedence?<\/strong><br \/>\n@Qualifier takes precedence over @Primary annotation. <\/p>\n<p><strong  class=\"ctaHeader3\">What does @Lazy annotation do?<\/strong><br \/>\nUnlike the bean which are marked with @Component are loaded at startup when the app start, @Lazy annotation does the bean loading only when it is needed.<\/p>\n<p>This can be Configured globally as well by specifying in application.properties as below. If your application has lot of components and because of this the app takes long time to start then its better to use this.<\/p>\n<p><strong>application.properties<\/strong><\/p>\n<pre>\r\nspring.main.lazy-initialization=true\r\n<\/pre>\n<p><strong>Note:<\/strong> <em>If you use @Lazy annotation along with @Restcontroller it may lead to timeout issues.<\/em><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/codethataint.com\/blog\/wp-content\/uploads\/2024\/09\/GenerateReport.png\" alt=\"\" \/><\/p>\n<p><strong>Report.java<\/strong><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\npublic interface Report {\r\n    String generateReport();\r\n}\r\n<\/pre>\n<p><strong>PDFReport.java<\/strong><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n@Primary\r\n@Component\r\npublic class PDFReport implements Report{\r\n    public PDFReport() {\r\n        System.out.println(&quot;Loaded PDFReport&quot;);\r\n    }\r\n\r\n    @Override\r\n    public String generateReport() {\r\n        return &quot;PDF Report&quot;;\r\n    }\r\n}\r\n<\/pre>\n<p><strong>excelReport.java<\/strong><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n@Component\r\npublic class excelReport implements Report{\r\n    public excelReport() {\r\n        System.out.println(&quot;Loading Excel Report&quot;);\r\n    }\r\n\r\n    @Override\r\n    public String generateReport() {\r\n        return &quot;Excel Report&quot;;\r\n    }\r\n}\r\n<\/pre>\n<p><strong>textReport.java<\/strong><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n@Component\r\n@Lazy\r\npublic class textReport implements Report{\r\n    public textReport() {\r\n        System.out.println(&quot;Loading textReport Report&quot;);\r\n    }\r\n    @Override\r\n    public String generateReport() {\r\n        return &quot;Text Report&quot;;\r\n    }\r\n}\r\n<\/pre>\n<p><strong>GenerateReport.java<\/strong><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n@RestController\r\npublic class GenerateReport {\r\n    private Report report;\r\n\r\n    public GenerateReport(@Qualifier(&quot;excelReport&quot;) Report report){\r\n        this.report = report;\r\n    }\r\n\r\n    @GetMapping(&quot;\/generateReport&quot;)\r\n    public String generateReport(){\r\n        return &quot;Printing report in &quot;+ report.generateReport() + &quot; format&quot;;\r\n    }\r\n}\r\n<\/pre>\n<p>Excel Report format would be printed as @Qualifier would take precedence<br \/>\n<strong>Output in Browser(http:\/\/localhost:8080\/generateReport)<\/strong><\/p>\n<pre>\r\nLoading Excel Report\r\nLoaded PDFReport\r\n\r\nPrinting report in Excel Report format\r\n<\/pre>\n<p><strong class=\"ctaHeader3\">What are different Bean Scopes?<\/strong><br \/>\n<strong>Singleton<\/strong> &#8211; Only one bean for Container, served same bean for every access<br \/>\n<strong>Prototype<\/strong> &#8211; New bean for every access<br \/>\n<strong>Request<\/strong> &#8211; New bean for every request<br \/>\n<strong>Session<\/strong> &#8211; Only one bean for Session<br \/>\n<strong>Application<\/strong> &#8211; Only one bean for Application<br \/>\n<strong>Websocket<\/strong> &#8211; <\/p>\n<blockquote><p>@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)<\/p><\/blockquote>\n<p><strong  class=\"ctaHeader3\">Checking Object based on Bean Scope &#8211; Singleton<\/strong><br \/>\n<em>excelReport bean with Singleton scope returning same bean every access<\/em><br \/>\n<strong>excelReport.java<\/strong><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n@Component\r\npublic class excelReport implements Report{\r\n.\r\n.\r\n}\r\n<\/pre>\n<p><strong>GenerateReport.java<\/strong><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n@RestController\r\npublic class GenerateReport {\r\n    private Report report1;\r\n    private Report report2;\r\n\r\n    public GenerateReport(@Qualifier(&quot;excelReport&quot;) Report report1, @Qualifier(&quot;excelReport&quot;) Report report2){\r\n        this.report1 = report1;\r\n        this.report2 = report2;\r\n    }\r\n\r\n    @GetMapping(&quot;\/checkBean&quot;)\r\n    public String checkBean(){\r\n        if(report1 == report2){\r\n            return &quot;Bean are Same&quot;;\r\n        }else{\r\n            return  &quot;Bean are Different&quot;;\r\n        }\r\n    }\r\n}\r\n<\/pre>\n<p><strong>Output(http:\/\/localhost:8080\/checkBean)<\/strong><\/p>\n<pre>\r\nBean are Same\r\n<\/pre>\n<p><strong  class=\"ctaHeader3\">Checking Object based on Bean Scope &#8211; Prototype<\/strong><br \/>\n<em>pdfReport bean with Prototype scope returning different bean on every access<\/em><br \/>\n<strong>PDFReport.java<\/strong><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n@Primary\r\n@Component\r\n@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)\r\npublic class PDFReport implements Report{\r\n  .\r\n  .\r\n}\r\n<\/pre>\n<p><strong>GenerateReport.java<\/strong><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n@RestController\r\npublic class GenerateReport {\r\n    private Report report1;\r\n    private Report report2;\r\n\r\n    public GenerateReport(Report report1, Report report2){\r\n        this.report1 = report1;\r\n        this.report2 = report2;\r\n    }\r\n\r\n    @GetMapping(&quot;\/checkBean&quot;)\r\n    public String checkBean(){\r\n        if(report1 == report2){\r\n            return &quot;Bean are Same&quot;;\r\n        }else{\r\n            return  &quot;Bean are Different&quot;;\r\n        }\r\n    }\r\n}\r\n<\/pre>\n<p><strong>Output(http:\/\/localhost:8080\/checkBean)<\/strong><\/p>\n<pre>\r\nBean are Different\r\n<\/pre>\n<p><strong  class=\"ctaHeader3\">How to inject bean created using new Operator or Injecting Spring beans into non-managed objects<\/strong><br \/>\nObjects for 3rd party JAR are created using @Configuration at class level and using @Bean at method level. This is one other way to create bean other than @Component as<br \/>\nwe wont be able to change the source of 3rd party class files.<\/p>\n<ol>\n<li>Using @Configuration and @Bean annotation<\/li>\n<li>Using @Configurable refer <a href=\"http:\/\/codethataint.com\/blog\/configuration\/\">here<\/a><\/li>\n<li>using AutowireCapableBeanFactory<\/li>\n<\/ol>\n<p>Let take the below code<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\npublic class MyBean \r\n{\r\n    @Autowired \r\n    private AnotherBean anotherBean;\r\n}\r\n\r\nMyBean obj = new MyBean();\r\n<\/pre>\n<p>I have a class doStuff in which the obj of MyBean created using new operator needs to be injected. To do this use AutowireCapableBeanFactory and call autowireBean method with beanFactory reference.<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\nprivate @Autowired AutowireCapableBeanFactory beanFactory;\r\n\r\npublic void doStuff() {\r\n   MyBean obj = new MyBean();\r\n   beanFactory.autowireBean(obj);\r\n   \/\/obj will now have its dependencies autowired.\r\n}\r\n<\/pre>\n<p><strong  class=\"ctaHeader3\">What is the Difference between @Inject and @Autowired in Spring Framework? <\/strong><br \/>\n@Inject specified in javax.inject.Inject annotations is part of the Java CDI (Contexts and Dependency Injection) standard introduced in Java EE 6 (JSR-299). Spring has chosen to support using @Inject synonymously with their own @Autowired annotation.@Autowired is Spring&#8217;s own (legacy) annotation. @Inject is part of a new Java technology called CDI that defines a standard for dependency injection similar to Spring. In a Spring application, the two annotations work the same way as Spring has decided to support some JSR-299 annotations in addition to their own.<\/p>\n<p><strong class=\"ctaHeader3\">Use of the Following in Spring Framework? <\/strong><br \/>\n<strong>@RequestMapping<\/strong> &#8211; All incoming requests are handled by the Dispatcher Servlet and it routes them through the Spring framework. When the Dispatcher Servlet receives a web request, it determines which controllers should handle the incoming request. Dispatcher Servlet initially scans all the classes that are annotated with the @Controller annotation. The dispatching process depends on the various @RequestMapping annotations declared in a controller class and its handler methods.The @RequestMapping annotation is used to map the web request onto a handler class (i.e. Controller) or a handler method and it can be used at the Method Level or the Class Level.<\/p>\n<p><em>Example<\/em> &#8211; for the URL http:\/\/localhost:8080\/ProjectName\/countryController\/countries<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n@Controller\r\n@RequestMapping(value = &quot;\/countryController&quot;)\r\npublic class CountryController {\r\n \r\n @RequestMapping(value = &quot;\/countries&quot;, method = RequestMethod.GET, headers = &quot;Accept=application\/json&quot;)\r\n public List getCountries() {\r\n    \/\/ Some Business Logic\r\n } \r\n<\/pre>\n<table>\n<tr>\n<th>Annotations<\/th>\n<th>Equivalent<\/th>\n<\/tr>\n<tr>\n<td>@GetMapping   <\/td>\n<td>@RequestMapping(method = RequestMethod.GET)<\/td>\n<\/tr>\n<tr>\n<td>@PostMapping  <\/td>\n<td>@RequestMapping(method = RequestMethod.POST)<\/td>\n<\/tr>\n<tr>\n<td>@PutMapping   <\/td>\n<td>@RequestMapping(method = RequestMethod.PUT)<\/td>\n<\/tr>\n<tr>\n<td>@DeleteMapping<\/td>\n<td>@RequestMapping(method = RequestMethod.DELETE)<\/td>\n<\/tr>\n<tr>\n<td>@PatchMapping <\/td>\n<td>@RequestMapping(method = RequestMethod.PATCH) <\/td>\n<\/tr>\n<\/table>\n<p><strong>@RequestParam<\/strong> &#8211; By using RequestParam we can get parameters to the method<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n@RequestMapping(value = &quot;\/display&quot;, method = RequestMethod.GET)\r\npublic String showEmployeeForm(@RequestParam(&quot;empId&quot;) String empId) {\r\n        \/\/ Some Business Logic\r\n}\r\n<\/pre>\n<p><strong>@Pathvariable<\/strong> &#8211; @PathVariable is to obtain some placeholder from the URI<br \/>\nIf empId and empName as parameters to the method showEmployeeForm() by using the @PathVariable annotation. For e.g.: \/employee\/display\/101\/Mux<br \/>\nempId = 101<br \/>\nempName = Mux<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n@Controller\r\n@RequestMapping(value = &quot;\/employee&quot;)\r\npublic class EmployeeController {\r\n    @RequestMapping(value = &quot;\/display\/{empId}\/{empName}&quot;)\r\n    public ModelAndView showEmployeeForm(@PathVariable String empId, @PathVariable String empName) {\r\n                \/\/ Some Business Logic\r\n    } \r\n}\r\n<\/pre>\n<p><strong  class=\"ctaHeader3\">What is the Difference between @RequestParam vs @PathVariable? <\/strong><br \/>\n@RequestParam annotation has following attributes<\/p>\n<pre>\r\nhttp:\/\/localhost:8080\/springmvc\/hello\/101?param1=10&param2=20\r\n<\/pre>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\npublic String getDetails(\r\n    @RequestParam(value=&quot;param1&quot;, required=true) String strParam1,\r\n        @RequestParam(value=&quot;param2&quot;, required=false,  defaultValue = &quot;John&quot;) String strParam2){\r\n...\r\n}\r\n\r\n<\/pre>\n<p><strong>@PathVariable is always considered required and cannot be null whereas @RequestParam could be null<\/strong> <\/p>\n<p>@RequestParam annotation can specify default values if a query parameter is not present or empty by using a default Value attribute, provided the required attribute is false. . If a corresponding path segment is missing, Spring will result in a 404 Not Found error. <\/p>\n<table>\n<tr>\n<td>defaultValue<\/td>\n<td>This is the default value as a fallback mechanism if request is not having the value or it is empty. <em>i.e param1<\/em> <\/td>\n<\/tr>\n<tr>\n<td>name <\/td>\n<td>Name of the parameter to bind <em>i.e param1<\/em> <\/td>\n<\/tr>\n<tr>\n<td>required    <\/td>\n<td>Whether the parameter is mandatory or not. If it is true, failing to send that parameter will fail. <em>i.e false<\/em> <\/td>\n<\/tr>\n<tr>\n<td>value       <\/td>\n<td>This is an alias for the name attribute  <em>i.e param1<\/em>                                                              <\/td>\n<\/tr>\n<\/table>\n<p>@PathVariable is to obtain some placeholder from the URI (Spring call it an URI Template)  and @RequestParam is to obtain an parameter from the URI as well.@PathVariable annotation has only one attribute value for binding the request URI template. It is allowed to use the multiple @PathVariable annotation in the single method. But, ensure that no more than one method has the same pattern.Annotation which indicates that a method parameter should be bound to a name-value pair within a path segment. Supported for RequestMapping annotated handler methods.<\/p>\n<pre>\r\nlocalhost:8080\/person\/Tom;age=25;height=175 and Controller:\r\n<\/pre>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n@GetMapping(&quot;\/person\/{name}&quot;)\r\n@ResponseBody\r\npublic String person(\r\n    @PathVariable(&quot;name&quot;) String name, \r\n    @MatrixVariable(&quot;age&quot;) int age,\r\n    @MatrixVariable(&quot;height&quot;) int height) {\r\n\r\n    \/\/ ...\r\n}\r\n<\/pre>\n<p><strong  class=\"ctaHeader3\">How Spring will decide bean if there are multiple implementation of Same Instance?<\/strong><\/p>\n<blockquote><p>In such case it would fail at start telling expected 1 bean but found n bean <\/p><\/blockquote>\n<p>We can use <strong>@Qualifier<\/strong> annotation where we can decide the bean to be loaded based on the beanId. beanId is always the component name with camel casing<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\npublic class GenerateReport {\r\n    private Report report1;\r\n    private Report report2;\r\n\r\n    public GenerateReport(@Qualifier(&quot;excelReport&quot;) Report report1, Report report2){\r\n        this.report1 = report1;\r\n        this.report2 = report2;\r\n    }\r\n}\r\n<\/pre>\n<p><strong  class=\"ctaHeader3\">What BeanLife cycle methods are available?<\/strong><\/p>\n<p>@PostConstruct and @PreDestroy<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n@Component\r\npublic class excelReport implements Report{\r\n    public excelReport() {\r\n        System.out.println(&quot;Loading Excel Report&quot;);\r\n    }\r\n\r\n    @Override\r\n    public String generateReport() {\r\n        return &quot;Excel Report&quot;;\r\n    }\r\n\r\n    @PreDestroy\r\n    public void doCleanUpStuff(){\r\n        System.out.println(&quot;Disposing ExcelReport....: Prints when Server Stops&quot;);\r\n    }\r\n\r\n    @PostConstruct\r\n    public void doStartUpStuff(){\r\n        System.out.println(&quot;Completed Initialization ExcelReport...: Prints when Server Starts&quot;);\r\n    }\r\n}\r\n<\/pre>\n<p><strong>Output &#8211; When Server Starts<\/strong><\/p>\n<pre>\r\nCompleted Initialization ExcelReport...: Prints when Server Starts\r\n<\/pre>\n<p><strong>Output &#8211; When Server Stops<\/strong><\/p>\n<pre>\r\nDisposing ExcelReport....: Prints when Server Stops\r\n<\/pre>\n<p><strong  class=\"ctaHeader3\">What is use of @RequestBody and @ResponseBody?<\/strong><\/p>\n<ol>\n<li>@RequestBody and @ResponseBody used in controller to implement smart object serialization and deserialization. They help you avoid boilerplate code by extracting the logic of message conversion and making it an aspect. Other than that they help you support multiple formats for a single REST resource without duplication of code.\n<\/li>\n<li>If you annotate a method with @ResponseBody, spring will try to convert its return value and write it to the http response automatically. <\/li>\n<li>If you annotate a methods parameter with @RequestBody, spring will try to convert the content of the incoming request body to your parameter object on the fly.<\/li>\n<\/ol>\n<p><strong  class=\"ctaHeader3\">What is @Transactional used for?<\/strong><br \/>\nWhen Spring loads your bean definitions, and has been configured to look for @Transactional annotations, it will create these proxy objects around your actual bean. These proxy objects are instances of classes that are auto-generated at runtime. The default behaviour of these proxy objects when a method is invoked is just to invoke the same method on the &#8220;target&#8221; bean (i.e. your bean).<br \/>\nRefere <a href=\"http:\/\/codethataint.com\/blog\/spring-and-jpa-integration\/\">here<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>What are different ways to create Bean in Spring Boot? Using @Component over class &#8211; To create app specific bean Using @Configuration over class and @Bean over method &#8211; To create bean from third party class added as JAR dependency. You cannot add component in added JAR class files. What is Dependency Injection? Dependency injection&hellip; <a href=\"https:\/\/codethataint.com\/blog\/spring-annotations-interview-questions\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[368,192],"tags":[],"class_list":["post-3094","post","type-post","status-publish","format-standard","hentry","category-last-minute","category-interview"],"_links":{"self":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/3094","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/comments?post=3094"}],"version-history":[{"count":5,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/3094\/revisions"}],"predecessor-version":[{"id":5194,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/3094\/revisions\/5194"}],"wp:attachment":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/media?parent=3094"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/categories?post=3094"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/tags?post=3094"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}