Update JasyptConfig.java
This commit is contained in:
parent
bef13303ec
commit
43b76e5584
@ -74,6 +74,7 @@
|
||||
<javamelody.version>1.42.0</javamelody.version>
|
||||
|
||||
<project.lombok.version>1.18.28</project.lombok.version>
|
||||
<ulisesbocchio.jasypt.version>1.7</ulisesbocchio.jasypt.version>
|
||||
|
||||
<!-- konfigurasi application server for custom server -->
|
||||
<appserver.port.http>10000</appserver.port.http>
|
||||
@ -99,20 +100,34 @@
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>${org.slf4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>joda-time</groupId>
|
||||
<artifactId>joda-time</artifactId>
|
||||
<version>${joda-time.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi</artifactId>
|
||||
<version>${poi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.ulisesbocchio</groupId>
|
||||
<artifactId>jasypt-spring-boot-starter</artifactId>
|
||||
<version>${ulisesbocchio.jasypt.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>jcl-over-slf4j</artifactId>
|
||||
<version>${org.slf4j.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>log4j-over-slf4j</artifactId>
|
||||
<version>${org.slf4j.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
@ -120,25 +135,12 @@
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>joda-time</groupId>
|
||||
<artifactId>joda-time</artifactId>
|
||||
<version>${joda-time.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi</artifactId>
|
||||
<version>${poi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>${junit.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
<organization>
|
||||
<name>Jasa Medika</name>
|
||||
|
||||
@ -0,0 +1,38 @@
|
||||
package com.jasamedika.medifirst2000.util;
|
||||
|
||||
import com.ulisesbocchio.jasyptspringboot.annotation.EncryptablePropertySource;
|
||||
import com.ulisesbocchio.jasyptspringboot.annotation.EncryptablePropertySources;
|
||||
import org.jasypt.encryption.StringEncryptor;
|
||||
import org.jasypt.encryption.pbe.PooledPBEStringEncryptor;
|
||||
import org.jasypt.encryption.pbe.config.SimpleStringPBEConfig;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* @author salmanoe
|
||||
* @version 1.0.0
|
||||
* @since 23/01/2024
|
||||
*/
|
||||
@Configuration
|
||||
@EncryptablePropertySources({@EncryptablePropertySource("classpath:jdbc.bridging.properties"),
|
||||
@EncryptablePropertySource("classpath:jdbc.cssd.properties"),
|
||||
@EncryptablePropertySource("classpath:jdbc.development.properties"),
|
||||
@EncryptablePropertySource("classpath:jdbc.ip3rs.properties"),
|
||||
@EncryptablePropertySource("classpath:jdbc.it.properties"),
|
||||
@EncryptablePropertySource("classpath:jdbc.k3kl.properties"),
|
||||
@EncryptablePropertySource("classpath:jdbc.laundry.properties"),
|
||||
@EncryptablePropertySource("classpath:jdbc.localhost.properties"),
|
||||
@EncryptablePropertySource("classpath:jdbc.mirroring.properties"),
|
||||
@EncryptablePropertySource("classpath:jdbc.pelayanan.properties"),
|
||||
@EncryptablePropertySource("classpath:jdbc.sdm.properties"),
|
||||
@EncryptablePropertySource("classpath:jdbc.web.properties")})
|
||||
public class JasyptConfig {
|
||||
@Bean
|
||||
public StringEncryptor jasyptStringEncryptor() {
|
||||
String password = System.getProperty("jasypt.encryptor.password");
|
||||
PooledPBEStringEncryptor encryptor = new PooledPBEStringEncryptor();
|
||||
SimpleStringPBEConfig config = new SimpleStringPBEConfig();
|
||||
config.setPassword(password);
|
||||
return encryptor;
|
||||
}
|
||||
}
|
||||
@ -109,6 +109,11 @@
|
||||
<target>1.8</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.github.ulisesbocchio</groupId>
|
||||
<artifactId>jasypt-maven-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<description>Module Medifirst2000 untuk Configuration</description>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user