Project

General

Profile

bug #8189

Allow configuration of 'user.home' via the spring environment

Added by Andreas Kohlbecker about 1 month ago. Updated 12 days ago.

Status:
In Progress
Priority:
New
Category:
cdmlib
Target version:
Start date:
03/21/2019
Due date:
% Done:

50%

Severity:
normal
Found in Version:
Tags:

Description

By now it is only possible to configure the ${user.home} via the system properties. That means the only option to set the user.home variable is via the jvm command argument:

-Duser.home=/home/user/

The ${user.home} is crucial since it determines the location of the .cdmLibrary folder.

In end to end integration test (#8187) this is a big caveat since it requires the tests to be run with the correct -Duser.home argument to. Which would be the source of a lot of errors an confusion.

Therefore I suggest to let CdmUtils use the spring environment to determine the ${user.home} variable, this would be fully compatible with the current implementation but would also allow for more flexibility as it is needed in test contexts.


Related issues

Related to Edit - feature request #8187: Use Spring Environment instead of custom code in AbstractWebApplicationConfigurer New 03/20/2019

Associated revisions

Revision 9b55e525 (diff)
Added by Andreas Kohlbecker about 1 month ago

ref #8189 CdmUtils uses the spring environment to find user.home

Revision 44b37b30 (diff)
Added by Andreas Kohlbecker about 1 month ago

ref #8189 moving folder funstins from CdmUtils to ConfigFileUtil

Revision a23c2a31 (diff)
Added by Andreas Kohlbecker about 1 month ago

ref #8189 moving ConfigFileUtil and AccountStore to cdmlib-persistence:eu.etaxonomy.cdm.config

Revision 110c97a6 (diff)
Added by Andreas Kohlbecker about 1 month ago

ref #8189 moving method getFolderSeperator() back to CdmUtils

Revision 0df7271b (diff)
Added by Andreas Kohlbecker about 1 month ago

ref #8189 ConfigFileUtil as spring bean in deafult context and tests implemented

Revision 17f913df (diff)
Added by Andreas Kohlbecker about 1 month ago

ref #8189 removing unnecessary dependency from cdmlib-commons

Revision cf9ba327 (diff)
Added by Andreas Kohlbecker about 1 month ago

ref #8189 cdmlib-remote.properties as not required property source fixes bug introduced in 9b55e525

Revision 55c390a0 (diff)
Added by Andreas Kohlbecker about 1 month ago

ref #8189 adapting taxeditor to changes in CdmUtils and ConfigFileUtil

Revision ab611430 (diff)
Added by Andreas Kohlbecker about 1 month ago

ref #8189 organizing imports for ConfigFileUtil

Revision 460fe6fd (diff)
Added by Andreas Kohlbecker about 1 month ago

ref #8189 DataSourceConfigurer using ConfigFileUtil correctly

Revision eacea571 (diff)
Added by Andreas Kohlbecker about 1 month ago

ref #8189 DataSourceConfigurer @Autowiring ConfigFileUtil to init this bean before

Revision 6dd0caa2 (diff)
Added by Andreas Kohlbecker 29 days ago

ref #8189 better reporting of error conditions in AbstractWebApplicationConfigurer

Revision a4b97169 (diff)
Added by Andreas Kohlbecker 29 days ago

ref #8189 cdm-server stores parameters as initParameter instead as Attribute, this allows to access these via Spring Environment

Revision 9b7d57ff (diff)
Added by Andreas Kohlbecker 25 days ago

ref #8189 providing fallback method to retrieve the ~/.cdmLibrary folder without application context

Revision c1460d6c (diff)
Added by Andreas Kohlbecker 21 days ago

ref #8189 removing useless trailing slashes

Revision 4adf618f (diff)
Added by Andreas Kohlbecker 21 days ago

ref #8189 fixing invalid NULL check

Revision 945508b5 (diff)
Added by Andreas Kohlbecker 21 days ago

ref #8189 fallback method for getCdmHomeSubDir() and fixing bug in getCdmHomeDirFallback()

Revision bdc08221 (diff)
Added by Andreas Kohlbecker 21 days ago

ref #8189 using getCdmHomeDirFallback() when the appcontext is not yet available

Revision ee512dbf (diff)
Added by Andreas Kohlbecker 21 days ago

ref #8189 using getCdmHomeDirFallback() when the appcontext is not yet available - 2

Revision c2e4881e (diff)
Added by Katja Luther 20 days ago

changes in CdmServerInfo

Revision 508c257d (diff)
Added by Andreas Kohlbecker 8 days ago

ref #8189 CdmUtils uses the spring environment to find user.home

Revision 03d51e97 (diff)
Added by Andreas Kohlbecker 8 days ago

ref #8189 moving folder funstins from CdmUtils to ConfigFileUtil

Revision 98bb24f8 (diff)
Added by Andreas Kohlbecker 8 days ago

ref #8189 moving ConfigFileUtil and AccountStore to cdmlib-persistence:eu.etaxonomy.cdm.config

Revision 657ed46c (diff)
Added by Andreas Kohlbecker 8 days ago

ref #8189 moving method getFolderSeperator() back to CdmUtils

Revision 69056744 (diff)
Added by Andreas Kohlbecker 8 days ago

ref #8189 ConfigFileUtil as spring bean in deafult context and tests implemented

Revision 6d27d83c (diff)
Added by Andreas Kohlbecker 8 days ago

ref #8189 removing unnecessary dependency from cdmlib-commons

Revision 78e019b6 (diff)
Added by Andreas Kohlbecker 8 days ago

ref #8189 cdmlib-remote.properties as not required property source fixes bug introduced in 9b55e525

Revision e9879222 (diff)
Added by Andreas Kohlbecker 8 days ago

ref #8189 DataSourceConfigurer using ConfigFileUtil correctly

Revision 94aa8075 (diff)
Added by Andreas Kohlbecker 8 days ago

ref #8189 DataSourceConfigurer @Autowiring ConfigFileUtil to init this bean before

Revision e25f9c08 (diff)
Added by Andreas Kohlbecker 8 days ago

ref #8189 better reporting of error conditions in AbstractWebApplicationConfigurer

Revision ebd1ecaf (diff)
Added by Andreas Kohlbecker 8 days ago

ref #8189 providing fallback method to retrieve the ~/.cdmLibrary folder without application context

Revision 06374015 (diff)
Added by Andreas Kohlbecker 8 days ago

ref #8189 removing useless trailing slashes

Revision 9d2efe36 (diff)
Added by Andreas Kohlbecker 8 days ago

ref #8189 fixing invalid NULL check

Revision c98bdf84 (diff)
Added by Andreas Kohlbecker 8 days ago

ref #8189 fallback method for getCdmHomeSubDir() and fixing bug in getCdmHomeDirFallback()

History

#1 Updated by Andreas Kohlbecker about 1 month ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 50

close issue if the changes are not causing any problems.

#2 Updated by Andreas Kohlbecker about 1 month ago

  • Related to feature request #8187: Use Spring Environment instead of custom code in AbstractWebApplicationConfigurer added

#3 Updated by Andreas Kohlbecker 12 days ago

  • Status changed from Resolved to In Progress
  • Target version changed from Release 5.6 to Release 5.7

now that the changes made for this ticket are no longer causing any problems I will do the next step: turning all sping bean methods into not statically methods.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)