
java
hnlcwx2917
这个作者很懒,什么都没留下…
展开
-
使用nginx搭建web静态资源服务
一、nginx作为静态资源服务有三种配置方式: location ~* (.+)\.(ico|gif|jpg|jpeg|png|html|htm|css|js|txt|json|xml|swf|wav|eot|svg|ttf|woff|exe)$ { root D:/develop/nginx-1.13.12/static; access_log off; } location ^~/wtxprint/原创 2020-12-29 20:34:41 · 686 阅读 · 0 评论 -
java读取项目配置文件的几种方法
一、Class.getResourceAsStream()会指定要加载的资源路径与当前类所在包的路径一致。 例如你写了一个MyTest类在包com.test.mycode 下,那么MyTest.class.getResourceAsStream("name") 会在com.test.mycode包下查找相应的资源。 如果这个name是以 '/' 开头的,那么就会从classpath的根路径下...原创 2018-10-17 14:33:35 · 1175 阅读 · 0 评论