Merge pull request #463 from vpavic/fix-h2-console-urls
Make H2 console URL consistent across sample projects
This commit is contained in:
@@ -154,6 +154,6 @@ Instead of using Tomcat's `HttpSession`, we are actually persisting the values i
|
||||
Spring Session creates a cookie named SESSION in your browser that contains the id of your session.
|
||||
Go ahead and view the cookies (click for help with https://developer.chrome.com/devtools/docs/resources#cookies[Chrome] or https://getfirebug.com/wiki/index.php/Cookies_Panel#Cookies_List[Firefox]).
|
||||
|
||||
If you like, you can easily remove the session using H2 web console available at: http://localhost:8080/console (use `jdbc:h2:mem:testdb` for JDBC URL)
|
||||
If you like, you can easily remove the session using H2 web console available at: http://localhost:8080/h2-console/ (use `jdbc:h2:mem:testdb` for JDBC URL)
|
||||
|
||||
Now visit the application at http://localhost:8080/ and observe that the attribute we added is no longer displayed.
|
||||
|
||||
@@ -144,6 +144,6 @@ Instead of using Tomcat's `HttpSession`, we are actually persisting the values i
|
||||
Spring Session creates a cookie named SESSION in your browser that contains the id of your session.
|
||||
Go ahead and view the cookies (click for help with https://developer.chrome.com/devtools/docs/resources#cookies[Chrome] or https://getfirebug.com/wiki/index.php/Cookies_Panel#Cookies_List[Firefox]).
|
||||
|
||||
If you like, you can easily remove the session using H2 web console available at: http://localhost:8080/console (use `jdbc:h2:mem:testdb` for JDBC URL)
|
||||
If you like, you can easily remove the session using H2 web console available at: http://localhost:8080/h2-console/ (use `jdbc:h2:mem:testdb` for JDBC URL)
|
||||
|
||||
Now visit the application at http://localhost:8080/ and observe that the attribute we added is no longer displayed.
|
||||
|
||||
@@ -53,13 +53,13 @@
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>h2console</servlet-name>
|
||||
<servlet-name>h2Console</servlet-name>
|
||||
<servlet-class>org.h2.server.web.WebServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>h2console</servlet-name>
|
||||
<url-pattern>/console/*</url-pattern>
|
||||
<servlet-name>h2Console</servlet-name>
|
||||
<url-pattern>/h2-console/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<welcome-file-list>
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.springframework.web.WebApplicationInitializer;
|
||||
public class H2ConsoleInitializer implements WebApplicationInitializer {
|
||||
|
||||
public void onStartup(ServletContext servletContext) throws ServletException {
|
||||
servletContext.addServlet("h2console", new WebServlet()).addMapping("/console/*");
|
||||
servletContext.addServlet("h2Console", new WebServlet()).addMapping("/h2-console/*");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user