0

We can config ehcache in classpath:ehcache.xml

But I have different environment profile such as "test","prod"

How can I use profile to config ehcache in different environment for mybatis?

blackcatIan
  • 275
  • 1
  • 3
  • 9

1 Answers1

0

It depends on a lot on the technologies you are using. So we can't give a precise answer right now.

If you only have test and prod, you will in general have on ehcache.xml in your production classpath and the another one shadowing it in your test classpath.

Then, if you have a more complicated use case, you need to have a way to load the different files. For Spring, for instance, you will use profiles. And lot ehcache-prod.xml and ehcache-test.xml according to it.

Henri
  • 5,551
  • 1
  • 22
  • 29