-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
0e5ebf5
commit dcea4ea
Showing
6 changed files
with
25 additions
and
30 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
src/main/java/com/astral/dao_blog/config/FrontendConfig.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.astral.dao_blog.config; | ||
|
||
import org.springframework.boot.web.server.ConfigurableWebServerFactory; | ||
import org.springframework.boot.web.server.WebServerFactoryCustomizer; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.http.HttpStatus; | ||
import org.springframework.boot.web.server.ErrorPage; | ||
|
||
@Configuration | ||
public class FrontendConfig { | ||
@Bean | ||
public WebServerFactoryCustomizer<ConfigurableWebServerFactory> webServerFactoryWebServerFactoryCustomizer(){ | ||
return factory -> { | ||
ErrorPage error404Page = new ErrorPage(HttpStatus.NOT_FOUND, "/index.html"); | ||
factory.addErrorPages(error404Page); | ||
}; | ||
} | ||
} |
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
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
src/test/java/com/astral/dao_blog/DaoBlogApplicationTests.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,21 +1,8 @@ | ||
package com.astral.dao_blog; | ||
|
||
import com.astral.dao_blog.dao.ArticleDao; | ||
import com.astral.dao_blog.service.AssortService; | ||
import org.junit.jupiter.api.Test; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
|
||
import java.io.FileNotFoundException; | ||
|
||
@SpringBootTest | ||
class DaoBlogApplicationTests { | ||
@Autowired | ||
AssortService assortService; | ||
@Autowired | ||
ArticleDao articleDao; | ||
|
||
@Test | ||
void contextLoads() throws FileNotFoundException { | ||
} | ||
} |