GithubHelp home page GithubHelp logo

blog's People

Contributors

czp3009 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

blog's Issues

Spring-Boot无法加载ClasspathResource问题 | czp's blog

https://www.hiczp.com/2018/10/18/java/Spring-Boot%E6%97%A0%E6%B3%95%E5%8A%A0%E8%BD%BDClasspathResource%E9%97%AE%E9%A2%98/

环境: Spring Boot 2.0.5.RELEASE一般来说, 程序运行所必须的资源文件我们会一起打包到 jar. 那么接下去我们就要读取这个资源文件.假定我们的资源文件在源码目录中为 src/main/resources/myFile.txt在 Spring Boot 中读取存放在 classpath 的资源文件通常是这么做的1val myFile = ClasspathResource(

Telegram-Bot收不到普通群聊消息的问题 | czp's blog

https://www.hiczp.com/2018/10/18/%E7%BD%91%E7%BB%9C/Telegram-Bot%E6%94%B6%E4%B8%8D%E5%88%B0%E6%99%AE%E9%80%9A%E7%BE%A4%E8%81%8A%E6%B6%88%E6%81%AF%E7%9A%84%E9%97%AE%E9%A2%98/

当我们写好一个 Telegram Bot 之后, 把它拉到一个群里, 然后在群里发一条命令, 机器人马上就收到了命令.但是我们在群里发送一个普通消息(不以 / 开头的消息), 我们发现机器人没有收到这条消息.我们私聊机器人, 机器人是能收到消息的. 换一个群, 依然收不到普通群聊消息, 但是能收到群里发的命令(命令一定是以 / 开头的).这个问题是由于 Telegram Bot 的 privacy

正确打包Spring-Boot到war | czp's blog

https://www.hiczp.com/2018/10/16/java/%E6%AD%A3%E7%A1%AE%E6%89%93%E5%8C%85Spring-Boot%E5%88%B0war/

环境: Spring-Boot 2.0.5.RELEASE | gradle 4.10.2众所周知, Spring Boot 在开发时之所以能直接启动, 是因为内置了 tomcat. 同时这也使得 Spring Boot 可以直接输出为可执行的 jar 文件.那么问题来了, 如果我们需要将应用打包为 war 文件并部署到外部的 tomcat 服务器怎么办.在 Google 搜索这个问题, 就会看到

Spring-Boot中配置单页应用 | czp's blog

https://www.hiczp.com/2018/11/22/java/Spring-Boot%E4%B8%AD%E9%85%8D%E7%BD%AE%E5%8D%95%E9%A1%B5%E5%BA%94%E7%94%A8/

环境: Spring Boot 2.1.0.RELEASE有的时候我们不得不把一个单页应用(例如 react-router)与 Spring-Boot 后端一起打包. 但是这样就会有一个问题, 一旦用户刷新页面, 就会看到一个 404 画面, 因为服务端并没有把请求转向 index.html.所以我们通过一些配置, 让 Spring 的找不到对应的资源文件的情况下, 将请求统统转向到 index.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.