{"id":18312,"date":"2021-09-24T05:30:59","date_gmt":"2021-09-23T22:30:59","guid":{"rendered":"https:\/\/huongdanjava.com\/?p=18312"},"modified":"2022-01-19T13:38:30","modified_gmt":"2022-01-19T06:38:30","slug":"introduction-about-spring-session","status":"publish","type":"post","link":"https:\/\/huongdanjava.com\/introduction-about-spring-session.html","title":{"rendered":"Introduction about Spring Session"},"content":{"rendered":"<p><a href=\"https:\/\/spring.io\/projects\/spring-session\" target=\"_blank\" rel=\"noopener\">Spring Session<\/a> is a module of the Spring framework that helps us to manage user sessions when using our web application with another storage system instead of session management using server runtime. This other storage system could be a database system or MongoDB or Redis or Hazelcast. Using Spring Session makes it possible to solve session-related problems in deploying applications using load balancers, or the limitations of the server&#8217;s HTTP session. In this tutorial, I will show you how to use Spring Session to save session information to a certain database!<\/p>\n<p>As an example for this tutorial, I will create a new Spring Boot application with Spring Security, Spring Web, and PostgreSQL JDBC Driver to store session information as follows:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-18314 aligncenter\" src=\"https:\/\/huongdanjava.com\/wp-content\/uploads\/2021\/09\/introduction-about-spring-session-1.png\" alt=\"\" width=\"700\" height=\"856\" \/><\/p>\n<p>Result:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-18315 aligncenter\" src=\"https:\/\/huongdanjava.com\/wp-content\/uploads\/2021\/09\/introduction-about-spring-session-2.png\" alt=\"\" width=\"700\" height=\"519\" \/><\/p>\n<p>You need to add Spring Session JDBC manually to pom.xml file:<\/p>\n<pre class=\"lang:xhtml decode:true \">&lt;dependency&gt;\r\n  &lt;groupId&gt;org.springframework.session&lt;\/groupId&gt;\r\n  &lt;artifactId&gt;spring-session-jdbc&lt;\/artifactId&gt;\r\n&lt;\/dependency&gt;<\/pre>\n<p>You don&#8217;t need to declare the version of Spring Session JDBC, it is already managed by Spring Boot Parent.<\/p>\n<p><strong>To run this application<\/strong>, you need to configure Datasource information in the application.properties file because we have declared to use Spring Data JPA:<\/p>\n<pre class=\"lang:java decode:true \">spring.datasource.url=jdbc:postgresql:\/\/localhost:5432\/spring_session_example\r\nspring.datasource.username=khanh\r\nspring.datasource.password=1<\/pre>\n<p>If you run the application now, you can log in to the application with Spring Security&#8217;s default user information &#8220;user&#8221; and the password printed in the IDE&#8217;s console log.<\/p>\n<p>Information about the user&#8217;s session will be saved in the server&#8217;s HTTP session!<\/p>\n<p><strong>Now, we will configure Spring Session JDBC to transfer this session information to the database!<\/strong><\/p>\n<p>As I said, <strong>Spring Session supports many different storage systems, in this tutorial, we are using the database system<\/strong>. To declare this, please open the application.properties file and declare the following:<\/p>\n<pre class=\"lang:java decode:true \">spring.session.store-type=jdbc<\/pre>\n<p>There will be some tables created by Spring Session by default to store session information. The names of these tables are SPRING_SESSION to contain user session information and SPRING_SESSION_ATTRIBUTES to contain details of each session. You can open the spring-session-jdbc jar file to see the definitions of these tables:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-18316\" src=\"https:\/\/huongdanjava.com\/wp-content\/uploads\/2021\/09\/introduction-about-spring-session-3.png\" alt=\"\" width=\"700\" height=\"882\" \/><\/p>\n<p><strong>To initialize these tables automatically<\/strong>, you can add a property to do this as follows:<\/p>\n<pre class=\"lang:java decode:true\">spring.session.jdbc.initialize-schema=always<\/pre>\n<p>Run the application and check the database, you will see the following results:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-18317 aligncenter\" src=\"https:\/\/huongdanjava.com\/wp-content\/uploads\/2021\/09\/introduction-about-spring-session-4.png\" alt=\"\" width=\"624\" height=\"836\" \/><br \/>\nNow just go to the application using <a href=\"http:\/\/localhost:8080\" target=\"_blank\" rel=\"noopener\">http:\/\/localhost:8080<\/a>, you will see these 2 tables generate the following records:<\/p>\n<p>spring_session<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-18318 aligncenter\" src=\"https:\/\/huongdanjava.com\/wp-content\/uploads\/2021\/09\/introduction-about-spring-session-5.png\" alt=\"\" width=\"700\" height=\"99\" \/><\/p>\n<p>spring_session_attributes:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-18319 aligncenter\" src=\"https:\/\/huongdanjava.com\/wp-content\/uploads\/2021\/09\/introduction-about-spring-session-6.png\" alt=\"\" width=\"700\" height=\"204\" \/><\/p>\n<p>This is the information about the session that we have just requested to that application. If now, you log in to the application with the default information of Spring Security, you will see the data in the spring_session table as follows:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-18322 aligncenter\" src=\"https:\/\/huongdanjava.com\/wp-content\/uploads\/2021\/09\/introduction-about-spring-session-9.png\" alt=\"\" width=\"700\" height=\"158\" \/><\/p>\n<p>and:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-18323 aligncenter\" src=\"https:\/\/huongdanjava.com\/wp-content\/uploads\/2021\/09\/introduction-about-spring-session-10.png\" alt=\"\" width=\"700\" height=\"182\" \/><\/p>\n<p>The Principal name has now been updated to be the username we used to log in to the application.<\/p>\n<p><strong>You can change the name of this default table using the property:<\/strong><\/p>\n<pre class=\"lang:java decode:true \">spring.session.jdbc.table-name=user_session<\/pre>\n<p>where user_session is the name of the main table containing user session information, equivalent to the default spring_session table.<\/p>\n<p><strong>A session will have a timeout if the user is no longer active on that session.<\/strong> By default, Spring Session configures this timeout to be 30 minutes. You can change this configuration using the property:<\/p>\n<pre class=\"lang:java decode:true \">spring.session.timeout=180<\/pre>\n<p>After this period, the session in the table above will be deleted.<\/p>\n<h3>How Spring Session works<\/h3>\n<p>If you want to know how Spring Session works, open the SessionRepositoryFilter class. This filter class is responsible for intercepting all requests to the application and replacing the default HttpServletRequest and HttpServletResponse of the HTTP servlet with custom classes SessionRepositoryRequestWrapper and SessionRepositoryResponseWrapper in the doFilterInternal() method.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-18320 aligncenter\" src=\"https:\/\/huongdanjava.com\/wp-content\/uploads\/2021\/09\/introduction-about-spring-session-7.png\" alt=\"\" width=\"700\" height=\"224\" \/><\/p>\n<p>SessionRepositoryRequestWrapper will perform commitSession() for the purpose of inserting session information into the database.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-18321 aligncenter\" src=\"https:\/\/huongdanjava.com\/wp-content\/uploads\/2021\/09\/introduction-about-spring-session-8.png\" alt=\"\" width=\"700\" height=\"279\" \/><\/p>\n<p>You can read more code to understand them!<\/p>\n\n\n<div class=\"kk-star-ratings kksr-auto kksr-align-right kksr-valign-bottom\"\n    data-payload='{&quot;align&quot;:&quot;right&quot;,&quot;id&quot;:&quot;18312&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;0&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;0&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;4&quot;,&quot;greet&quot;:&quot;&quot;,&quot;legend&quot;:&quot;0\\\/5 - (0 votes)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;title&quot;:&quot;Introduction about Spring Session&quot;,&quot;width&quot;:&quot;0&quot;,&quot;_legend&quot;:&quot;{score}\\\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}'>\n            \n<div class=\"kksr-stars\">\n    \n<div class=\"kksr-stars-inactive\">\n            <div class=\"kksr-star\" data-star=\"1\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"2\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"3\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"4\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"5\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n    \n<div class=\"kksr-stars-active\" style=\"width: 0px;\">\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n<\/div>\n                \n\n<div class=\"kksr-legend\" style=\"font-size: 19.2px;\">\n            <span class=\"kksr-muted\"><\/span>\n    <\/div>\n    <\/div>\n","protected":false},"excerpt":{"rendered":"<p>Spring Session is a module of the Spring framework that helps us to manage user sessions when using our web application with another storage system instead of session management using server runtime. This other storage system could be a database system or MongoDB or Redis&hellip; <a href=\"https:\/\/huongdanjava.com\/introduction-about-spring-session.html\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":1680,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2113],"tags":[],"class_list":["post-18312","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-spring-session-en","clearfix"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Introduction about Spring Session - Huong Dan Java<\/title>\n<meta name=\"description\" content=\"In this tutorial, I introduce you all to Spring Session with Spring Session JDBC.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/huongdanjava.com\/introduction-about-spring-session.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Introduction about Spring Session - Huong Dan Java\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, I introduce you all to Spring Session with Spring Session JDBC.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/huongdanjava.com\/introduction-about-spring-session.html\" \/>\n<meta property=\"og:site_name\" content=\"Huong Dan Java\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/nhkhanh2406\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/nhkhanh2406\" \/>\n<meta property=\"article:published_time\" content=\"2021-09-23T22:30:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-01-19T06:38:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/huongdanjava.com\/wp-content\/uploads\/2016\/10\/spring-boot.png\" \/>\n\t<meta property=\"og:image:width\" content=\"300\" \/>\n\t<meta property=\"og:image:height\" content=\"300\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Khanh Nguyen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/KhanhNguyenJ\" \/>\n<meta name=\"twitter:site\" content=\"@KhanhNguyenJ\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Khanh Nguyen\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/huongdanjava.com\\\/introduction-about-spring-session.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/huongdanjava.com\\\/introduction-about-spring-session.html\"},\"author\":{\"name\":\"Khanh Nguyen\",\"@id\":\"https:\\\/\\\/huongdanjava.com\\\/#\\\/schema\\\/person\\\/dc859d7f8cbea3b593e6738de9cbb82d\"},\"headline\":\"Introduction about Spring Session\",\"datePublished\":\"2021-09-23T22:30:59+00:00\",\"dateModified\":\"2022-01-19T06:38:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/huongdanjava.com\\\/introduction-about-spring-session.html\"},\"wordCount\":585,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/huongdanjava.com\\\/#\\\/schema\\\/person\\\/dc859d7f8cbea3b593e6738de9cbb82d\"},\"image\":{\"@id\":\"https:\\\/\\\/huongdanjava.com\\\/introduction-about-spring-session.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/huongdanjava.com\\\/wp-content\\\/uploads\\\/2016\\\/10\\\/spring-boot.png\",\"articleSection\":[\"Spring Session\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/huongdanjava.com\\\/introduction-about-spring-session.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/huongdanjava.com\\\/introduction-about-spring-session.html\",\"url\":\"https:\\\/\\\/huongdanjava.com\\\/introduction-about-spring-session.html\",\"name\":\"Introduction about Spring Session - Huong Dan Java\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/huongdanjava.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/huongdanjava.com\\\/introduction-about-spring-session.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/huongdanjava.com\\\/introduction-about-spring-session.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/huongdanjava.com\\\/wp-content\\\/uploads\\\/2016\\\/10\\\/spring-boot.png\",\"datePublished\":\"2021-09-23T22:30:59+00:00\",\"dateModified\":\"2022-01-19T06:38:30+00:00\",\"description\":\"In this tutorial, I introduce you all to Spring Session with Spring Session JDBC.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/huongdanjava.com\\\/introduction-about-spring-session.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/huongdanjava.com\\\/introduction-about-spring-session.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/huongdanjava.com\\\/introduction-about-spring-session.html#primaryimage\",\"url\":\"https:\\\/\\\/huongdanjava.com\\\/wp-content\\\/uploads\\\/2016\\\/10\\\/spring-boot.png\",\"contentUrl\":\"https:\\\/\\\/huongdanjava.com\\\/wp-content\\\/uploads\\\/2016\\\/10\\\/spring-boot.png\",\"width\":300,\"height\":300},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/huongdanjava.com\\\/introduction-about-spring-session.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/huongdanjava.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Introduction about Spring Session\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/huongdanjava.com\\\/#website\",\"url\":\"https:\\\/\\\/huongdanjava.com\\\/\",\"name\":\"Huong Dan Java\",\"description\":\"Java development tutorials\",\"publisher\":{\"@id\":\"https:\\\/\\\/huongdanjava.com\\\/#\\\/schema\\\/person\\\/dc859d7f8cbea3b593e6738de9cbb82d\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/huongdanjava.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/huongdanjava.com\\\/#\\\/schema\\\/person\\\/dc859d7f8cbea3b593e6738de9cbb82d\",\"name\":\"Khanh Nguyen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/huongdanjava.com\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/CC6FAC58-D227-4DD8-93D1-6D6A795577E3_1_201_a.jpeg\",\"url\":\"https:\\\/\\\/huongdanjava.com\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/CC6FAC58-D227-4DD8-93D1-6D6A795577E3_1_201_a.jpeg\",\"contentUrl\":\"https:\\\/\\\/huongdanjava.com\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/CC6FAC58-D227-4DD8-93D1-6D6A795577E3_1_201_a.jpeg\",\"width\":1267,\"height\":1517,\"caption\":\"Khanh Nguyen\"},\"logo\":{\"@id\":\"https:\\\/\\\/huongdanjava.com\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/CC6FAC58-D227-4DD8-93D1-6D6A795577E3_1_201_a.jpeg\"},\"description\":\"I love Java and everything related to Java.\",\"sameAs\":[\"https:\\\/\\\/huongdanjava.com\",\"https:\\\/\\\/www.facebook.com\\\/nhkhanh2406\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/KhanhNguyenJ\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Introduction about Spring Session - Huong Dan Java","description":"In this tutorial, I introduce you all to Spring Session with Spring Session JDBC.","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:\/\/huongdanjava.com\/introduction-about-spring-session.html","og_locale":"en_US","og_type":"article","og_title":"Introduction about Spring Session - Huong Dan Java","og_description":"In this tutorial, I introduce you all to Spring Session with Spring Session JDBC.","og_url":"https:\/\/huongdanjava.com\/introduction-about-spring-session.html","og_site_name":"Huong Dan Java","article_publisher":"https:\/\/www.facebook.com\/nhkhanh2406","article_author":"https:\/\/www.facebook.com\/nhkhanh2406","article_published_time":"2021-09-23T22:30:59+00:00","article_modified_time":"2022-01-19T06:38:30+00:00","og_image":[{"width":300,"height":300,"url":"https:\/\/huongdanjava.com\/wp-content\/uploads\/2016\/10\/spring-boot.png","type":"image\/png"}],"author":"Khanh Nguyen","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/KhanhNguyenJ","twitter_site":"@KhanhNguyenJ","twitter_misc":{"Written by":"Khanh Nguyen","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/huongdanjava.com\/introduction-about-spring-session.html#article","isPartOf":{"@id":"https:\/\/huongdanjava.com\/introduction-about-spring-session.html"},"author":{"name":"Khanh Nguyen","@id":"https:\/\/huongdanjava.com\/#\/schema\/person\/dc859d7f8cbea3b593e6738de9cbb82d"},"headline":"Introduction about Spring Session","datePublished":"2021-09-23T22:30:59+00:00","dateModified":"2022-01-19T06:38:30+00:00","mainEntityOfPage":{"@id":"https:\/\/huongdanjava.com\/introduction-about-spring-session.html"},"wordCount":585,"commentCount":0,"publisher":{"@id":"https:\/\/huongdanjava.com\/#\/schema\/person\/dc859d7f8cbea3b593e6738de9cbb82d"},"image":{"@id":"https:\/\/huongdanjava.com\/introduction-about-spring-session.html#primaryimage"},"thumbnailUrl":"https:\/\/huongdanjava.com\/wp-content\/uploads\/2016\/10\/spring-boot.png","articleSection":["Spring Session"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/huongdanjava.com\/introduction-about-spring-session.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/huongdanjava.com\/introduction-about-spring-session.html","url":"https:\/\/huongdanjava.com\/introduction-about-spring-session.html","name":"Introduction about Spring Session - Huong Dan Java","isPartOf":{"@id":"https:\/\/huongdanjava.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/huongdanjava.com\/introduction-about-spring-session.html#primaryimage"},"image":{"@id":"https:\/\/huongdanjava.com\/introduction-about-spring-session.html#primaryimage"},"thumbnailUrl":"https:\/\/huongdanjava.com\/wp-content\/uploads\/2016\/10\/spring-boot.png","datePublished":"2021-09-23T22:30:59+00:00","dateModified":"2022-01-19T06:38:30+00:00","description":"In this tutorial, I introduce you all to Spring Session with Spring Session JDBC.","breadcrumb":{"@id":"https:\/\/huongdanjava.com\/introduction-about-spring-session.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/huongdanjava.com\/introduction-about-spring-session.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/huongdanjava.com\/introduction-about-spring-session.html#primaryimage","url":"https:\/\/huongdanjava.com\/wp-content\/uploads\/2016\/10\/spring-boot.png","contentUrl":"https:\/\/huongdanjava.com\/wp-content\/uploads\/2016\/10\/spring-boot.png","width":300,"height":300},{"@type":"BreadcrumbList","@id":"https:\/\/huongdanjava.com\/introduction-about-spring-session.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/huongdanjava.com\/"},{"@type":"ListItem","position":2,"name":"Introduction about Spring Session"}]},{"@type":"WebSite","@id":"https:\/\/huongdanjava.com\/#website","url":"https:\/\/huongdanjava.com\/","name":"Huong Dan Java","description":"Java development tutorials","publisher":{"@id":"https:\/\/huongdanjava.com\/#\/schema\/person\/dc859d7f8cbea3b593e6738de9cbb82d"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/huongdanjava.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/huongdanjava.com\/#\/schema\/person\/dc859d7f8cbea3b593e6738de9cbb82d","name":"Khanh Nguyen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/huongdanjava.com\/wp-content\/uploads\/2021\/07\/CC6FAC58-D227-4DD8-93D1-6D6A795577E3_1_201_a.jpeg","url":"https:\/\/huongdanjava.com\/wp-content\/uploads\/2021\/07\/CC6FAC58-D227-4DD8-93D1-6D6A795577E3_1_201_a.jpeg","contentUrl":"https:\/\/huongdanjava.com\/wp-content\/uploads\/2021\/07\/CC6FAC58-D227-4DD8-93D1-6D6A795577E3_1_201_a.jpeg","width":1267,"height":1517,"caption":"Khanh Nguyen"},"logo":{"@id":"https:\/\/huongdanjava.com\/wp-content\/uploads\/2021\/07\/CC6FAC58-D227-4DD8-93D1-6D6A795577E3_1_201_a.jpeg"},"description":"I love Java and everything related to Java.","sameAs":["https:\/\/huongdanjava.com","https:\/\/www.facebook.com\/nhkhanh2406","https:\/\/x.com\/https:\/\/twitter.com\/KhanhNguyenJ"]}]}},"_links":{"self":[{"href":"https:\/\/huongdanjava.com\/wp-json\/wp\/v2\/posts\/18312","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/huongdanjava.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/huongdanjava.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/huongdanjava.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/huongdanjava.com\/wp-json\/wp\/v2\/comments?post=18312"}],"version-history":[{"count":5,"href":"https:\/\/huongdanjava.com\/wp-json\/wp\/v2\/posts\/18312\/revisions"}],"predecessor-version":[{"id":19356,"href":"https:\/\/huongdanjava.com\/wp-json\/wp\/v2\/posts\/18312\/revisions\/19356"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/huongdanjava.com\/wp-json\/wp\/v2\/media\/1680"}],"wp:attachment":[{"href":"https:\/\/huongdanjava.com\/wp-json\/wp\/v2\/media?parent=18312"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/huongdanjava.com\/wp-json\/wp\/v2\/categories?post=18312"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/huongdanjava.com\/wp-json\/wp\/v2\/tags?post=18312"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}