configure embedded tomcat context docBase and path in spring boot gradle

Viewed 1582

How do I configure<Context docBase="{C:/..}" path="{path}"/> in spring boot gradle? i usually configure it in server.xml of external tomcat, how do I configure it via @Configuration file or in application.properties? Thank you.

1 Answers

You may try use this:

tomcat.addWebapp("/path", "{C:/..}");

It is not exactly what addContent does, but might help you get your resources available under /path.

Related