I have several tasks in my
For some tasks, I would like to use the original
However, for another task, I would like to use a different file such as
What I am really trying to achieve is to have a gradle task that builds a WAR file where the webapp uses s3 file storage, and another gradle task build a WAR file where the webapp uses regular file storage.
What is the best way to do this ?
Thanks you Alexander. I used Spring Profiles and got it to work.
I created another file spring-s3.xml (in core):
(NOTE: the s3 file storage bean is only loaded for spring profile “s3”)
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" profile="s3">
<bean name="cuba_FileStorage" class="com.haulmont.addon.cubaaws.s3.AmazonS3FileStorage"/>
and in app.properties, I adjusted the following line:
cuba.springContextConfig = +com/company/kairosmd/spring.xml com/company/kairosmd/spring-s3.xml
To add spring profile “s3” to my active spring profiles, I added the following parameter to my Java Options when running tomcat :