Как зашифровать информацию о подключении к БД в XML-файле?JAVA

Программисты JAVA общаются здесь
Ответить
Anonymous
 Как зашифровать информацию о подключении к БД в XML-файле?

Сообщение Anonymous »


When I try to encrypt DB connect information, I'm at a loss as to what to do if the information is in XML rather than properties.

I'm using Spring 4.x.x, eclipse, java 1.8, jasypt spring-31(1.9.2)

To explain the context.xml and the config.xml containing db information with the just bean settings,
  • The config.xml has the following structure.
  • I put in the contact ID, PW to encrypt by CMD (jasypt-1.9.3-dist)

DBMS Driver URL value access ID access PW
  • context.xml has the following structure.
If I set it as below and start the server, the config will get an error saying that DOCTYPE should be equal to null. (The above-mentioned config is identified as a property config of an empty id = configuration Encryptor.)

When using jasypt, it said that it is processed without having to set up a separate DOCTYPE.

I also tried to set it to the DOCTYPE system..., specify the dtd file, and add it to the metadata folder, but it was also not processed.

Therefore, in order to process DB information separately as properties, the placeholder created a location property and designated the path, but this also failed to put variable values in the dataSourceSpied bean normally.

// beans xmlns, xsi // mybatis bean config/config.xml How do I solve this problem?

please let me know anything your opinion.

I tried same encrypt in srping-boot. It clearly started. But I can not solve this same thing in xml.


Источник: https://stackoverflow.com/questions/781 ... n-xml-file
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «JAVA»