View Javadoc
1   package com.github.mikkoi.maven.plugins.enforcer.rule.propertyusage;
2   
3   import java.io.FileInputStream;
4   import java.io.IOException;
5   import java.io.InputStream;
6   import java.util.Properties;
7   
8   @SuppressWarnings({"all"})
9   public class App1 {
10  
11      private App1() {
12          Properties properties = new Properties();
13          try (InputStream inputStream = new FileInputStream("app1.properties") ) {
14              properties.load(inputStream);
15              final String myPropertyValue = properties.getProperty("my.property.value");
16              final Integer otherPropVal = Integer.valueOf(properties.getProperty("other.prop.val"));
17  
18          } catch (IOException e) {
19              System.out.print(e.getMessage());
20          }
21  
22      }
23  }