package it.smartcommunitylab.aac;

import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class AACMain {

    public static void main(String[] args) {
        SpringApplication.run(AACMain.class, args);
    }

    @Bean
    public CommandLineRunner commandLineRunner(ApplicationContext ctx) {
        return args -> {
            printBanner();
        };
    }

    public void printBanner() {
        System.out.println("======================================");
        System.out.println(" ____                _                ");
        System.out.println("|  _ \\ ___  __ _  __| |_   _          ");
        System.out.println("| |_) / _ \\/ _` |/ _` | | | |         ");
        System.out.println("|  _ <  __/ (_| | (_| | |_| |_        ");
        System.out.println("|_| \\_\\___|\\__,_|\\__,_|\\__, (_)       ");
        System.out.println(" :AAC AuthN_AuthZ      |___/          ");
        System.out.println("======================================");
    }
}

@@ -28,16 +28,79 @@
 b.aac;%0A%0A
+import org.springframework.beans.factory.annotation.Autowired;%0A
 import o
@@ -142,16 +142,16 @@
 Runner;%0A
-
 import o
@@ -254,32 +254,86 @@
 ootApplication;%0A
+import org.springframework.boot.info.BuildProperties;%0A
 import org.sprin
@@ -470,17 +470,78 @@
 CMain %7B%0A
+    %0A    @Autowired%0A    BuildProperties buildProperties;%0A    
 %0A
-
     publ
@@ -817,24 +817,79 @@
 tBanner() %7B%0A
+        String version = buildProperties.getVersion();%0A
         Syst
@@ -979,12 +979,11 @@
 n(%22 
-____
+   
     
@@ -991,28 +991,28 @@
            _
-    
+____
             
@@ -1047,37 +1047,36 @@
 ln(%22
-%7C
   
-_ %5C%5C ___  __ _  __%7C %7C_
+   /%5C%5C       /%5C%5C 
   
+/
  _
+___%7C
     
@@ -1117,38 +1117,36 @@
 ln(%22
-%7C %7C_)
+   
  / 
-_
  %5C%5C
-/ _%60 %7C/ _%60 %7C
+     /  %5C%5C
  %7C %7C 
-%7C
+    
     
@@ -1186,38 +1186,37 @@
 ln(%22
-%7C
   
-_ %3C  __/ (_%7C %7C (_%7C %7C %7C_%7C %7C_
+ / /%5C%5C %5C%5C   / /%5C%5C %5C%5C%7C %7C    
     
@@ -1255,44 +1255,107 @@
 ln(%22
-%7C_%7C %5C%5C_%5C%5C___%7C%5C%5C__,_%7C%5C%5C__,_%7C%5C%5C__, (_)
+  / ____ %5C%5C / ____ %5C%5C %7C____          %22); %0A        System.out.println(%22 /_/    %5C%5C_/_/    %5C%5C_%5C%5C_____%7C
     
@@ -1395,34 +1395,21 @@
 (%22 :
-AAC AuthN_AuthZ
+ready  
       
-%7C___/
     
@@ -1406,32 +1406,47 @@
                 
+(v.%22+version+%22)
 %22);%0A        Syst

print banner with version to stdout