编程知识 cdmana.com

Exception resolution -- FileNotFoundException: COM / ulisesbocchio / jasyptspringboot / configuration / enableencryptableproper

Consider safety , The database configuration information in the configuration file should be encrypted . Just the project is SpringBoot, So consider jasypt .

The specific configuration scheme is as follows :

jasypt-spring-boot: encryption SpringBoot Sensitive configuration information for

But I follow this configuration , An exception was reported during startup :

Caused by: java.io.FileNotFoundException: class path resource [com/ulisesbocchio/jasyptspringboot/configuration/EnableEncryptablePropertiesConfiguration.class] cannot be opened because it does not exist

There is no similar answer to the question on the Internet . Let's look at the quotation later jasypt-spring-boot-starter Of jar Inside , There is no such class ,

see gitHub Open source project ,https://github.com/ulisesbocchio/jasypt-spring-boot/blob/master/jasypt-spring-boot/src/main/java/com/ulisesbocchio/jasyptspringboot/configuration/EnableEncryptablePropertiesConfiguration.java

Only to find out that we need to introduce jasypt-spring-boot Of jar

Concrete all pom.xml The configuration is as follows :

        <dependency>
			<groupId>com.github.ulisesbocchio</groupId>
			<artifactId>jasypt-spring-boot-starter</artifactId>
			<version>2.1.0</version>
		</dependency>
		<dependency>
			<groupId>com.github.ulisesbocchio</groupId>
			<artifactId>jasypt-spring-boot</artifactId>
			<version>2.1.0</version>
		</dependency>
		<dependency>
			<groupId>org.jasypt</groupId>
			<artifactId>jasypt</artifactId>
			<version>1.9.2</version>
		</dependency>

After this configuration , Restart , Perfect solution .

Problem analysis : Because it's the intranet , We use our own maven Private clothes , Light configuration jasypt-spring-boot-starter Can't cascade in , It needs to be introduced alone jasypt-spring-boot Of jar

Participation of this paper Tencent cloud media sharing plan , You are welcome to join us , share .

版权声明
本文为[The blank of writing memory]所创,转载请带上原文链接,感谢
https://cdmana.com/2020/12/20201224104024005D.html

Scroll to Top