{"id":11240,"date":"2013-04-15T16:00:36","date_gmt":"2013-04-15T13:00:36","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=11240"},"modified":"2022-11-21T15:28:18","modified_gmt":"2022-11-21T13:28:18","slug":"spring-java-configuration","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2013\/04\/spring-java-configuration.html","title":{"rendered":"Spring Java Configuration"},"content":{"rendered":"<p>I have found that a lot of Spring developers I know still do not know about or use Spring Java Configuration (aka JavaConfig). Spring 3.0 introduced this feature which allows Spring to be configured entirely in Java \u2013 no more XML!! I really enjoy using JavaConfig because, well\u2026 it\u2019s Java! This means it has all the benefits of Java type-safety and IDE support:<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<\/p>\n<ul>\n<li>Typos generate compile-error \u2013 no more waiting till load time to find XML typos<\/li>\n<li>IDE refactoring tools will automatically update JavaConfig because it is regular Java<\/li>\n<li>IDE automatic import feature can be used instead of typing fully-qualified class names in XML<\/li>\n<li>IDE drill-down feature<\/li>\n<li>IDE auto-complete feature<\/li>\n<li>I think you get it, anything that works with Java..<\/li>\n<\/ul>\n<p>Some of the features above do come built into more advanced IDEs that have Spring support, but it is just nice to not rely on custom IDE Spring support to get these features. The compile-time checking is a big one for me. I refactor my code frequently, and changing field names or moving or renaming a Java file frequently breaks my XML Spring configuration. Of course, I usually don\u2019t realize it until I deploy the application and get a Spring initialization error. Now, my IDE automatically updates the JavaConfig references when I refactor my code, because it\u2019s just regular java. Also, if I forget to use my IDE\u2019s refactor tools, I still get a compile error in the JavaConfig which alerts me before deployment that I have a problem.<\/p>\n<p>Let me show a basic example of how XML configuration translates into JavaConfig. First, XML configuration:<\/p>\n<pre class=\" brush:xml\">&lt;beans&gt;\n  &lt;bean id=\"PersonService\" class=\"com.codetutr.PersonService\"&gt;\n    &lt;constructor-arg ref=\"personDao\" \/&gt;\n  &lt;\/bean&gt;\n\n  &lt;bean id=\"personDao\" class=\"com.codetutr.dao.PersonDao\"&gt;\n    &lt;property name=\"endpoint\" value=\"localhost\" \/&gt;\n  &lt;\/bean&gt;\n&lt;\/beans&gt;<\/pre>\n<p>Translated to JavaConfig:<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<pre class=\" brush:java\">package com.codetutr.config;\n\nimport org.springframework.context.annotation.Bean;\nimport org.springframework.context.annotation.Configuration;\nimport com.codetutr.dao.PersonDao;\nimport com.codetutr.service.PersonService;\n\n@Configuration\npublic class AppConfig {\n\n    @Bean\n    public PersonService personService() {\n        return new PersonService(personDao());\n    }\n\n    @Bean\n    public PersonDao personDao() {\n        PersonDao personDao = new PersonDao();\n        personDao.setEndpoint(\"localhost\");\n        return personDao;\n    }\n\n}<\/pre>\n<p>It is a pretty-simple one-to-one conversion. Each <code>&lt;beans&gt;<\/code> document is translated into a Java class annotated with <code>@Configuration<\/code>. Each <code>&lt;bean&gt;<\/code> element is translated into a single method annotated with <code>@Bean<\/code>. The name of the method corresponds to the bean ID. To reference another bean in JavaConfig, you just call the method for the desired bean (see <code>personService<\/code> above).<\/p>\n<p>One other observation I have had about Spring JavaConfig is that it is more natural to use constructor injection over setter injection \u2013 because it results in a one-line method. This is a plus to me, as I usually prefer constructor injection. If a class requires certain dependencies to function properly, I prefer to require them in the constructor. That way, I can ensure that the class is initialized into a valid state. I have noticed that, for whatever reason, constructor injection seems to be rarely used in XML configuration. Maybe <code>constructor-arg<\/code> is too hard to remember? I don\u2019t know, but I like that JavaConfig seems to be bringing that back some.<\/p>\n<p>Now, to bootstrap the JavaConfig Application Context, Spring has provided a new ApplicationContext implementation: <code>AnnotationConfigApplicationContext<\/code>. It is used the same as we are used to using <code>ClassPathXmlApplicationContext<\/code>:<\/p>\n<pre class=\" brush:java\">ApplicationContext ctx = new AnnotationConfigApplicationContext(AppConfig.class);\nPersonService personService = ctx.getBean(PersonService.class);<\/pre>\n<p>Or if you\u2019re in a web application:<\/p>\n<pre class=\" brush:xml\">&lt;servlet&gt;\n    &lt;servlet-name&gt;myServlet&lt;\/servlet-name&gt;\n    &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;\/servlet-class&gt;\n    &lt;init-param&gt;\n        &lt;param-name&gt;contextClass&lt;\/param-name&gt;\n        &lt;param-value&gt;org.springframework.web.context.support.AnnotationConfigWebApplicationContext&lt;\/param-value&gt;\n    &lt;\/init-param&gt;\n    &lt;init-param&gt;\n        &lt;param-name&gt;contextConfigLocation&lt;\/param-name&gt;\n        &lt;param-value&gt;com.codetutr.config.AppConfig&lt;\/param-value&gt;\n    &lt;\/init-param&gt;\n    &lt;load-on-startup&gt;1&lt;\/load-on-startup&gt;\n&lt;\/servlet&gt;<\/pre>\n<p>Note, that a package name or class-name can be passed in for the <code>contextConfigLocation<\/code> param above.<\/p>\n<p>Or finally, if you\u2019re using Servlet 3\u2032s Java configuration:<\/p>\n<pre class=\" brush:java\">public class SpringWebAppInitializer implements WebApplicationInitializer {\n    @Override\n    public void onStartup(final ServletContext servletContext) throws ServletException {\n        final AnnotationConfigWebApplicationContext springContext = new AnnotationConfigWebApplicationContext();\n        springContext.register(AppConfig.class);\n\n        final ServletRegistration.Dynamic springServlet = servletContext.addServlet(\"myServlet\", new DispatcherServlet(springContext));\n        springServlet.setLoadOnStartup(1);\n        springServlet.addMapping(\"\/*\");\n    }\n}<\/pre>\n<p>This post just scratched the surface of JavaConfig. I will follow-up with posts on how to import beans from other <code>@Configuration<\/code> classes or XML files as well as how to use custom namespaces. Also check out my post on how to set up a <a href=\"http:\/\/codetutr.com\/2013\/03\/24\/simple-spring-mvc-web-application-using-gradle\/\">Spring-MVC application using JavaConfig<\/a>.<br \/>\n&nbsp;<\/p>\n<div style=\"border: 1px solid #D8D8D8; background: #FAFAFA; width: 100%; padding-left: 5px;\"><b><i>Reference: <\/i><\/b><a href=\"http:\/\/codetutr.com\/2013\/02\/19\/spring-java-configuration\/\">Spring Java Configuration<\/a> from our <a href=\"https:\/\/www.javacodegeeks.com\/jcg\">JCG partner<\/a> Steve Hanson at the <a href=\"http:\/\/codetutr.com\/\">CodeTutr<\/a> blog.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>I have found that a lot of Spring developers I know still do not know about or use Spring Java Configuration (aka JavaConfig). Spring 3.0 introduced this feature which allows Spring to be configured entirely in Java \u2013 no more XML!! I really enjoy using JavaConfig because, well\u2026 it\u2019s Java! This means it has all &hellip;<\/p>\n","protected":false},"author":409,"featured_media":240,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[30],"class_list":["post-11240","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-spring"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Spring Java Configuration<\/title>\n<meta name=\"description\" content=\"I have found that a lot of Spring developers I know still do not know about or use Spring Java Configuration (aka JavaConfig). Spring 3.0 introduced this\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2013\/04\/spring-java-configuration.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spring Java Configuration\" \/>\n<meta property=\"og:description\" content=\"I have found that a lot of Spring developers I know still do not know about or use Spring Java Configuration (aka JavaConfig). Spring 3.0 introduced this\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2013\/04\/spring-java-configuration.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2013-04-15T13:00:36+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-11-21T13:28:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Steve Hanson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Steve Hanson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/04\\\/spring-java-configuration.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/04\\\/spring-java-configuration.html\"},\"author\":{\"name\":\"Steve Hanson\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/006867093496e3253c65f37b3fbec162\"},\"headline\":\"Spring Java Configuration\",\"datePublished\":\"2013-04-15T13:00:36+00:00\",\"dateModified\":\"2022-11-21T13:28:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/04\\\/spring-java-configuration.html\"},\"wordCount\":562,\"commentCount\":5,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/04\\\/spring-java-configuration.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"keywords\":[\"Spring\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/04\\\/spring-java-configuration.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/04\\\/spring-java-configuration.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/04\\\/spring-java-configuration.html\",\"name\":\"Spring Java Configuration\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/04\\\/spring-java-configuration.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/04\\\/spring-java-configuration.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"datePublished\":\"2013-04-15T13:00:36+00:00\",\"dateModified\":\"2022-11-21T13:28:18+00:00\",\"description\":\"I have found that a lot of Spring developers I know still do not know about or use Spring Java Configuration (aka JavaConfig). Spring 3.0 introduced this\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/04\\\/spring-java-configuration.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/04\\\/spring-java-configuration.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/04\\\/spring-java-configuration.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"spring-interview-questions-answers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/04\\\/spring-java-configuration.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Spring Java Configuration\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/006867093496e3253c65f37b3fbec162\",\"name\":\"Steve Hanson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5f329aad08233a668ee56ee53f005a94376612b242454cfefaf060b5d6474de0?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5f329aad08233a668ee56ee53f005a94376612b242454cfefaf060b5d6474de0?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5f329aad08233a668ee56ee53f005a94376612b242454cfefaf060b5d6474de0?s=96&d=mm&r=g\",\"caption\":\"Steve Hanson\"},\"description\":\"Steve is a software developer interested in web development and new technologies. He currently works as a Java consultant at Credera in Dallas, TX.\",\"sameAs\":[\"http:\\\/\\\/codetutr.com\\\/\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/steve-hanson\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Spring Java Configuration","description":"I have found that a lot of Spring developers I know still do not know about or use Spring Java Configuration (aka JavaConfig). Spring 3.0 introduced this","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2013\/04\/spring-java-configuration.html","og_locale":"en_US","og_type":"article","og_title":"Spring Java Configuration","og_description":"I have found that a lot of Spring developers I know still do not know about or use Spring Java Configuration (aka JavaConfig). Spring 3.0 introduced this","og_url":"https:\/\/www.javacodegeeks.com\/2013\/04\/spring-java-configuration.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2013-04-15T13:00:36+00:00","article_modified_time":"2022-11-21T13:28:18+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","type":"image\/jpeg"}],"author":"Steve Hanson","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Steve Hanson","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2013\/04\/spring-java-configuration.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/04\/spring-java-configuration.html"},"author":{"name":"Steve Hanson","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/006867093496e3253c65f37b3fbec162"},"headline":"Spring Java Configuration","datePublished":"2013-04-15T13:00:36+00:00","dateModified":"2022-11-21T13:28:18+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/04\/spring-java-configuration.html"},"wordCount":562,"commentCount":5,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/04\/spring-java-configuration.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","keywords":["Spring"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2013\/04\/spring-java-configuration.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2013\/04\/spring-java-configuration.html","url":"https:\/\/www.javacodegeeks.com\/2013\/04\/spring-java-configuration.html","name":"Spring Java Configuration","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/04\/spring-java-configuration.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/04\/spring-java-configuration.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","datePublished":"2013-04-15T13:00:36+00:00","dateModified":"2022-11-21T13:28:18+00:00","description":"I have found that a lot of Spring developers I know still do not know about or use Spring Java Configuration (aka JavaConfig). Spring 3.0 introduced this","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/04\/spring-java-configuration.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2013\/04\/spring-java-configuration.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2013\/04\/spring-java-configuration.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","width":150,"height":150,"caption":"spring-interview-questions-answers"},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2013\/04\/spring-java-configuration.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Spring Java Configuration"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/006867093496e3253c65f37b3fbec162","name":"Steve Hanson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/5f329aad08233a668ee56ee53f005a94376612b242454cfefaf060b5d6474de0?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5f329aad08233a668ee56ee53f005a94376612b242454cfefaf060b5d6474de0?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5f329aad08233a668ee56ee53f005a94376612b242454cfefaf060b5d6474de0?s=96&d=mm&r=g","caption":"Steve Hanson"},"description":"Steve is a software developer interested in web development and new technologies. He currently works as a Java consultant at Credera in Dallas, TX.","sameAs":["http:\/\/codetutr.com\/"],"url":"https:\/\/www.javacodegeeks.com\/author\/steve-hanson"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/11240","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/409"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=11240"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/11240\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/240"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=11240"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=11240"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=11240"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}