ulisesbocchio / jasypt-spring-boot

Jasypt integration for Spring boot
MIT License
2.87k stars 514 forks source link

jasypt-spring-boot-starter:3.0.5 breaks Springs 'random'-function #358

Closed pfuerholz closed 11 months ago

pfuerholz commented 1 year ago

Following test fails with 3.05:

@SpringBootTest
class TestJasypt305ApplicationTests {
    @Value("${port}")
    private int port1;

    @Value("${port}")
    private int port2;

    @Test
    void testPort() {
        Assertions.assertEquals(port1, port2);
    }
}

port is defined in application.properties: port = ${random.int[8800,8900]} While 'random' was executed by 3.04 only once it seems now executed every time (which seems wrong to me).

pfuerholz commented 11 months ago

As I have now seen here the behavior of the random-function is not specific to Jasypt: https://github.com/spring-projects/spring-boot/issues/7009 I don't really know why this was not an issue in the past, maybe another dependency coming from the newer Jasypt-library.