Coder Social home page Coder Social logo

liyinglihuannan / springboot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zhaopei8948/springboot

0.0 1.0 0.0 1.03 MB

用springboot + springmvc + mybatis + maven搭建成框架,基于Jersey, Swagger,SwaggerUi的restful API

License: GNU General Public License v3.0

Java 1.46% HTML 0.17% JavaScript 98.37%

springboot's Introduction

用java 语言 + springboot + springmvc + mybatis + (maven/gradle) 搭成的框架

增加redis的发布订阅,及消息队列例子

1.用maven启动命令是 mvn spring-boot:run

添加restful风格API

文档地址:http://localhost:8081/apidocs/index.html

启动之后输入localhost:8081 返回home 就成功了

测试redis订阅发布:发出如下命令

curl -v http://localhost:8081/redis/publish\?message\=zhaopei-123

或者在浏览器中打开: 会显示日志如下: o.z.m.config.IntegrationConfiguration : subscribeMessage = zhaopei-123 发布订阅已成功

注意如出现以下错误:

org.springframework.amqp.AmqpAuthenticationException: com.rabbitmq.client.AuthenticationFailureException: ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN. For details see the broker logfile.

请修改src/main/resources/application.yml中的

rabbitmq:
  username: 自己队列的用户名
  password: 自己队列的密码

springboot's People

Contributors

zhaopei8948 avatar

Watchers

James Cloos avatar

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.