Comments (5)
运行就报404?不可能吧,只能是你访问了某个错误的地址才导致的吧,请正确描述下你的操作过程吧
from weixin-java-mp-demo.
pom.xml内容:
`
....
4.0.0
<groupId>com.tbms2weixin</groupId>
<artifactId>tbms2weixin</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>tbms2weixin</name>
<description>tbms2weixin</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.3.8.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<weixin-java-mp.version>2.5.0</weixin-java-mp.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/com.github.binarywang/weixin-java-common -->
<dependency>
<groupId>com.github.binarywang</groupId>
<artifactId>weixin-java-common</artifactId>
<version>${weixin-java-mp.version}</version>
</dependency>
<!-- 公众号(订阅号、服务号) -->
<dependency>
<groupId>com.github.binarywang</groupId>
<artifactId>weixin-java-mp</artifactId>
<version>${weixin-java-mp.version}</version>
</dependency>
<!-- 企业号 -->
<dependency>
<groupId>com.github.binarywang</groupId>
<artifactId>weixin-java-cp</artifactId>
<version>${weixin-java-mp.version}</version>
</dependency>
<!-- 基于内存的微信配置 -->
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>2.9.0</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.16.14</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-tx -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-jdbc -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/com.zaxxer/HikariCP -->
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/org.mybatis/mybatis -->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.4.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.mybatis/mybatis-spring -->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>1.3.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.mybatis.generator/mybatis-generator-core -->
<dependency>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-core</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<groups>com.testwithspring.starter.springboot.UnitTest</groups>
</configuration>
</plugin>
</plugins>
</build>
...
`
URL
http://127.0.0.1:9090/wechat/portal
页面显示:
·
Url:null
Error:Not Found
Message:No message available
Exception:null
Path:/wechat/portal
Status:404
Timestamp:Fri Mar 03 14:05:52 CST 2017
·
from weixin-java-mp-demo.
网上也有类似404问题:
http://www.imooc.com/qadetail/150764
from weixin-java-mp-demo.
从你发出来的内容看不出来什么。首先你没理解404的含义,是指没找到对应的请求路径,你先跑下本demo后,试图理解后,再看看你自己的程序到底哪儿出了问题。
from weixin-java-mp-demo.
问题找到了,自己添加的Controller和启动自动加载的一些组件目录都要在“com.github.binarywang.demo.wechat”这个包下面,不然可以正常启动,调用时会出现404问题。
from weixin-java-mp-demo.
Related Issues (20)
- 多公众号模版消息推送
- 怎么在关注事件中连续推送两条消息 HOT 1
- 怎么获取accesstoken的缓存有效时间呢
- 多公众号配置已失效
- 请求URL超时 HOT 1
- 不可以使用微信小程序的用户的openId来进行推送是吗 HOT 1
- 大佬,个人公众号能用吗 HOT 1
- 大佬,怎么发送图文消息呢 HOT 1
- 大佬,模板消息跳转小程序不能打开指定页面,只能到首页是啥问题呢 HOT 2
- 大佬,你发布的几个包是开源的吗?源码是在哪里啊? HOT 2
- dal
- 大佬,微信客服接口异步回复,会不会有并发问题啊,为什么人多使用的时候就会出现系统故障 HOT 1
- (org/testng/annotations/BeforeTest.class) [ERROR] 类文件具有错误的版本 55.0, 应为 52.0 HOT 1
- 使用js_code去换取openId和sessionKey的时候报错说code is used。
- 大佬!!!调用getUserInfo之后出现了个bug HOT 4
- Consider defining a bean of type 'me.chanjar.weixin.mp.api.WxMpService' in your configuration. HOT 2
- 无法找到对应【default】的公众号配置信息,请核实! HOT 2
- 订阅通知功能
- 获取token时,如果ip不在白名单里,会一直请求token接口,最后堆栈溢出 HOT 1
- 运行demo修改成线上配置成功了,但是关注订阅事件怎么没有触发? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from weixin-java-mp-demo.