springboot直接访问rescueers
时间: 2023-11-11 10:00:58 浏览: 36
在Spring Boot中,可以通过使用静态资源处理器来直接访问rescueers。具体来说,可以在application.properties文件中添加以下配置:
```
spring.resources.static-locations=classpath:/rescueers/
```
然后,在浏览器中访问`http://localhost:8080/rescueers/`即可访问到rescueers目录下的静态资源。
相关问题
springboot直接访问html
可以使用Spring Boot内置的静态资源处理器来直接访问HTML文件。只需将HTML文件放置在Spring Boot应用程序的静态资源目录中,即可通过URL直接访问。默认情况下,Spring Boot将静态资源目录设置为“/static”、“/public”和“/resources”。例如,如果将HTML文件放置在“/src/main/resources/static”目录中,可以通过URL“http://localhost:808/index.html”直接访问该文件。
springboot数据访问
springboot数据访问可以通过配置数据源和连接池来实现。首先,导入JDBC场景的依赖项,然后配置数据源相关的属性。当容器中没有数据源时,Spring Boot会自动为你创建一个数据源,并使用HikariDataSource作为连接池。此外,你还可以引入druid-spring-boot-starter依赖项来使用Druid连接池。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)