Open Kilda Java Documentation
MessageCodeUtil.java
Go to the documentation of this file.
1 package org.usermanagement.util;
2 
3 import org.springframework.beans.factory.annotation.Value;
4 import org.springframework.context.annotation.PropertySource;
5 import org.springframework.stereotype.Component;
6 
7 @Component
8 @PropertySource("classpath:message.properties")
9 public class MessageCodeUtil {
10 
11  @Value("${error.code.prefix}")
12  private String errorCodePrefix;
13 
14  @Value("${attribute.not.found.code}")
15  private String attributeNotFoundCode;
16 
17  public int getAttributeNotFoundCode() {
18  return Integer.parseInt(errorCodePrefix + attributeNotFoundCode);
19  }
20 }