【发布时间】:2019-04-05 19:56:51
【问题描述】:
不确定标题是否合适,但我目前拥有三个应用程序(静态内容):
publicappadmin
public 只是用于常规网络的内容,app 是为移动设备呈现的内容,admin 基本上是用于管理的工具。 它们都包含在同一个 Spring Boot 应用程序中,并通过example.com/api 与 REST API 通信。从技术上讲,我可以将它们放入resources/static 这样
resources/static/public
resources/static/admin
resources/static/app
这将允许我访问应用程序:
example.com/public/index.html
example.com/admin/index.html
example.com/app/index.html
但是,我的目标是具有以下结构:
example.com // For public
admin.example.com // For admin
app.example.com // For app
example.com/api // REST API
如何才能做到这一点,或者我可以做些什么来使这成为可能?
【问题讨论】:
-
自定义spring web context并使用多个dispatcher servlet baeldung.com/spring-web-contexts
标签: spring spring-boot