package com.github.yuri0x7c1.ofbiz.explorer;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.boot.autoconfigure.security.SecurityAutoConfiguration;

import com.github.yuri0x7c1.ofbiz.explorer.entity.xml.Entity;
import com.github.yuri0x7c1.ofbiz.explorer.generator.util.JpaEntityGenerator;
import com.github.yuri0x7c1.ofbiz.explorer.util.OfbizInstance;

import lombok.extern.slf4j.Slf4j;

@Slf4j
@SpringBootApplication(exclude = {SecurityAutoConfiguration.class, DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class})
public class Application implements CommandLineRunner {

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

	@Autowired
	OfbizInstance ofbizInstance;


	@Override
	public void run(String... args) throws Exception {
			JpaEntityGenerator g = new JpaEntityGenerator(ofbizInstance, "BudgetAttribute");
			log.debug(g.generate());
	}
}

@@ -525,148 +525,8 @@
 n;%0A%0A
-import com.github.yuri0x7c1.ofbiz.explorer.entity.xml.Entity;%0Aimport com.github.yuri0x7c1.ofbiz.explorer.generator.util.JpaEntityGenerator;%0A
 impo
@@ -1033,117 +1033,24 @@
 %7B%0A%09%09
-%09JpaEntityGenerator g = new JpaEntityGenerator(ofbizInstance, %22BudgetAttribute%22);%0A%09%09%09log.debug(g.generate());
+// startup tasks
 %0A%09%7D%0A

Clean up startup tasks