Hey Andrey,

You'll need to run the service in an environment in which that
variable is set.  This is the reason we have a helper class for
starting microservices in demo-server which sets variables like that.
Look in demo-server for an example of how to use this, and if you have
questions, feel free to ask.  I strongly suggest using the feign
client that's already available, rather than writing something new
using mockmvc.

Best Regards,
Myrle

On Fri, Mar 23, 2018 at 12:29 PM, Andrey Mochalov
<[email protected]> wrote:
>  Hello everyone,
>
> My name is Andrey Mochalov. I'm from Russia. I want to participate GSOC
> 2018.
>
> I have several questions about the project Fineract CN.
>
> I try to run project fineract-cn-customer and get error:
>
> *org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'io.mifos.anubis.config.AnubisSecurityConfigurerAdapter':
> Injection of autowired dependencies failed; nested exception is
> java.lang.IllegalArgumentException: Could not resolve placeholder
> 'system.publicKey.timestamp' in string value
> "${system.publicKey.timestamp}"*
>
> How can I fix this?
>
> Also I want to write tests using the Spring Rest Docs for generating
> documentation. For this, I write a test:
>
> ```
> @Test
> public void should_CreateCustomer() throws Exception {
> ObjectMapper objectMapper = new ObjectMapper();
> mockMvc.perform(post("/customer")
>         .header("X-Tenant-Identifier", "12345")
>         .contentType(APPLICATION_JSON_VALUE)
>
> .content(objectMapper.writeValueAsString(CustomerGenerator.createRandomCustomer())))
>         .andDo(print())
>         .andExpect(status().isAccepted());
> }
> ```
>
> And I get error:
> *java.lang.AssertionError: Status Expected :202 Actual :404*
>
> What error did I make in creating the query?
>
> --
> Andrey Mochalov

Reply via email to