-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
87 additions
and
68 deletions.
There are no files selected for viewing
5 changes: 3 additions & 2 deletions
5
src/main/java/stirling/software/SPDF/config/interfaces/DatabaseInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
package stirling.software.SPDF.config.interfaces; | ||
|
||
import java.io.IOException; | ||
import java.sql.SQLException; | ||
import java.util.List; | ||
|
||
import stirling.software.SPDF.model.provider.UnsupportedProviderException; | ||
import stirling.software.SPDF.utils.FileInfo; | ||
|
||
public interface DatabaseInterface { | ||
void exportDatabase() throws IOException; | ||
void exportDatabase() throws SQLException, UnsupportedProviderException; | ||
|
||
List<FileInfo> getBackupList(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
src/main/java/stirling/software/SPDF/config/security/database/ScheduledTasks.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
package stirling.software.SPDF.config.security.database; | ||
|
||
import java.io.IOException; | ||
import java.sql.SQLException; | ||
|
||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.scheduling.annotation.Scheduled; | ||
import org.springframework.stereotype.Component; | ||
|
||
import stirling.software.SPDF.model.provider.UnsupportedProviderException; | ||
|
||
@Component | ||
public class ScheduledTasks { | ||
|
||
@Autowired private DatabaseService databaseService; | ||
|
||
@Scheduled(cron = "0 0 0 * * ?") | ||
public void performBackup() throws IOException { | ||
public void performBackup() throws SQLException, UnsupportedProviderException { | ||
databaseService.exportDatabase(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.