class HswebAutoConfiguration {

    private List<DynamicScriptEngine> engines;

    @Autowired
    private ApplicationContext applicationContext;


    @PostConstruct
    public void init() {
        engines = Stream.of("js", "groovy")
                        .map(DynamicScriptEngineFactory::getEngine)
                        .filter(Objects::nonNull)
                        .collect(Collectors.toList());

        addGlobalVariable("logger", LoggerFactory.getLogger("org.hswebframework.script"));

        addGlobalVariable("spring", applicationContext);
    }

    private void addGlobalVariable(String var, Object val) {
        engines.forEach(engine -> {
                            try {
                                engine.addGlobalVariable(Collections.singletonMap(var, val));
                            } catch (NullPointerException ignore) {
                            }
                        }
        );
    }

    @Bean
    public CommandLineRunner systemInit(DatabaseOperator database,
                                        AppProperties properties) {<FILL_FUNCTION_BODY>}

}


        addGlobalVariable("database", database);
        addGlobalVariable("sqlExecutor", database
                .getMetadata()
                .getFeature(SyncSqlExecutor.ID)
                .orElseGet(() -> database
                        .getMetadata()
                        .getFeature(ReactiveSqlExecutor.ID)
                        .map(ReactiveSyncSqlExecutor::of)
                        .orElse(null)));
        SystemVersion version = properties.build();
        return args -> {
            if (properties.isAutoInit()) {
                SystemInitialize initialize = new SystemInitialize(database, version);
                initialize.setExcludeTables(properties.getInitTableExcludes());
                initialize.install();
            }
        };
    
<no_super_class>