@@ -12,12 +12,7 @@ import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class JambotronApplication implements CommandLineRunner {
|
||||
@Resource
|
||||
FilesStorageService storageService;
|
||||
|
||||
// @Autowired
|
||||
// UserExportService userExportService;
|
||||
public class JambotronApplication{
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(JambotronApplication.class);
|
||||
public static void main(String[] args) {
|
||||
@@ -30,18 +25,4 @@ public class JambotronApplication implements CommandLineRunner {
|
||||
logger.info("Application Run. This is an info message.");
|
||||
logger.info("Application Run. This is an info message.!!!!!!");
|
||||
}
|
||||
@Override
|
||||
public void run(String... arg) throws Exception {
|
||||
// storageService.deleteAll();
|
||||
storageService.init();
|
||||
|
||||
// try {
|
||||
// userExportService.exportAllRolesToJson();
|
||||
// userExportService.exportAllUsersToJson();
|
||||
//
|
||||
// } catch (Exception e) {
|
||||
// logger.error("Error exporting users or roles to JSON", e);
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.jambotronGroup.jambotron.fileUpload;
|
||||
|
||||
import jakarta.annotation.PostConstruct;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class FileStorageConfiguration {
|
||||
|
||||
@Autowired
|
||||
private FilesStorageService filesStorageService;
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
|
||||
filesStorageService.init();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user