#SpringBootTest causes no application.properties to not be loaded

1 messages · Page 1 of 1 (latest)

pliant ravine
#

I've got these simple integration tests:

@SpringBootTest
@AutoConfigureMockMvc
@Testcontainers
class AuthenticationIntegrationTests {
  // ...
}

which are in the test source, and i have a default application.properties inside of the main source set. I have discovered that this main application.properties is not being loaded and i dont get why, any ideas?

lusty vectorBOT
#

<@&987246964494204979> please have a look, thanks.

pliant ravine
#

the contents of the application.properties are following:

spring.application.name=dormio
spring.mvc.servlet.path=/api/v1
server.servlet.session.cookie.name=DORMIO_SESSION
spring.session.data.redis.namespace=dormio:sessions
lusty vectorBOT
pliant ravine
#

I have tried using @TestPropertySource as well as @ActiveProfiles

#

as a matter of fact, no properties seem to be loaded, well they are, but only for the test and not the actual application

pliant ravine
#

okay i have discovered one more thing! it seems like the properties get applied to my configuration, but not to spring internals