转载请注明出处:https://oldnoop.tech/c/192.html
源代码地址
https://github.com/oldnoop/cos
单独使用spring
引入依赖
![](/attachment/20190120/ea492ed87304469da3fe44380671ba71.jpg)
编写资源配置文件
coskey.properties 参考cos-spring的jar包中的/META-INF/cos/coskey.properties
配置servlet
例如web.xml中的配置
![](/attachment/20190120/c7e1227461334c2d900b66b3a491ef70.jpg)
使用springboot
引入依赖
![](/attachment/20190120/07318ca172b24a7ab510b1fe7780119e.jpg)
编写资源配置文件
参考cos-spring-boot-example中的src/main/resources/application.properties