-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Francesco,

On 7/23/18 4:58 PM, Francesco Viscomi wrote:
> Because I need to add a folder (properties) under the tomcat 
> installation in order to read the properties in a file with the 
> following annotation (using spring) 
> @PropertySource("classpath:properties/application.properties");

Why not put that file under your application's
WEB-INF/classes/properties/application.properties?

Or, even better, add a <PostResources> element to your application's
META-INF/context.xml

Changing the classpath by using those properties is probably the worst
way you could accomplish what you are trying to do.

Why is it bad? Because it's not portable, even across two separate
Tomcat installations. If you forget to modify catalina.properties in
the target of a move, stuff stops working. But if you bundle that file
with your application, it will work no matter where you deploy it.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAltWSbkACgkQHPApP6U8
pFgNaQ//Yy8qmKzuzSigPRREWDxbs8yA35SSy8z68wvtxltEj9dWOteq83khisI1
np0rJIErx+5kt+h7LzvpHh17AnqFgOBzo8R5/2+tTR3hS4xo42jQ9DnW+jgAZ7KX
9Klx0E9e+Jgu1FMWdCMLb3PR3RXWh0LpFW+QyJZ9S7FvEYZXZrtVcF42cLVH0Hi7
cBOd3MxxSsn/9Bmd3R58sszNzCN2fvPSpZN7YIgD0bSju2DsgG+hibDb1OVW6idl
cUS7J1jurCmoot25h0m1Y0bIOgr383lIAhvtJYF32g9qsVi/ocQx7O4BOh6xiViC
hzQycE4Nv9w7KUMOXkdh6Tbg6Ycz7kgpG9NaCe00ARDMAG0jm4S1xAbEN59FEK+o
CVUP+Ry2dAczy3e0nAfHpZ415ohR2x1/tqtNMfQrvaXPFmQ5Hv2U11ZbEXfFBDbM
nTHm4wVdKpq/Stea3cC3YvvO/fMhuKhQW53iovgvP8Dwr7NKGXxsz43CLJE14Svd
ir8cJpSqUddFjAPYDiwbXwO4H+WER57m6+2vFD7vhXXTnCJ/F45bm6Zyeoo1OweH
bAt4+OncGXr7GRyo78oWTRK7ee2oqFPenCSM4o5yTPuA4COXhb5rKnaNquuXcXMr
J96NiVecTiF79ugUcZhtTl/iyLpX4j/OZW5RFe4pOyyBc8H/klQ=
=OdyE
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to