Giter Club home page Giter Club logo

beego-demo's People

Contributors

gwduan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

beego-demo's Issues

注册报文是什么格式?

image

2019/06/08 17:06:16.860 [D] [users.go:76]  ParseLoginForm: &{ 123456}
2019/06/08 17:06:16.860 [D] [users.go:79]  ValidLoginForm: Phone.Required:Can not be empty;Phone.Mobile:Must be valid mobile number;
2019/06/08 17:06:16.862 [D] [server.go:2774]  |            ::1| 200 |     4.9747ms|   match| POST     /v1/users/login   r:/v1/users/login
2019/06/08 17:08:28.083 [D] [users.go:76]  ParseLoginForm: &{ } 
2019/06/08 17:08:28.084 [D] [users.go:79]  ValidLoginForm: Phone.Required:Can not be empty;Phone.Mobile:Must be valid mobile number;Password.Required:Can not be empty;       
2019/06/08 17:08:28.085 [D] [server.go:2774]  |            ::1| 200 |     3.0024ms|   match| POST     /v1/users/login   r:/v1/users/login
2019/06/08 17:08:52.523 [D] [users.go:76]  ParseLoginForm: &{ }
2019/06/08 17:08:52.524 [D] [users.go:79]  ValidLoginForm: Phone.Required:Can not be empty;Phone.Mobile:Must be valid mobile number;Password.Required:Can not be empty;       
2019/06/08 17:09:01.711 [D] [users.go:79]  ValidLoginForm: Phone.Required:Can not be empty;Phone.Mobile:Must be valid mobile number;Password.Required:Can not be empty;       
2019/06/08 17:09:01.712 [D] [server.go:2774]  |            ::1| 200 |     1.9957ms|   match| POST     /v1/users/login   r:/v1/users/login

Session使用redis的问题

你好,我根据beego提供的controller session机制,使用redis作为存储,我跟了下代码打印,的确进入了sess_redis.go这个里面的set方法,但是redis-server查询不到对应的key。但是在代码里里面通过getSession可以获取到,是不是beego在使用redis存储session的时候,用了其他的名字?

controllers\roles.go:47: invalid operation: token.Claims["id"] (type jwt.Claims does not support indexing)

this errors:
controllers\roles.go:47: invalid operation: token.Claims["id"](type jwt.Claims does not support indexing)
controllers\roles.go:48: invalid operation: token.Claims["name"](type jwt.Claim s does not support indexing)
controllers\roles.go:49: invalid operation: token.Claims["exp"](type jwt.Claims does not support indexing)
controllers\roles.go:69: invalid operation: token.Claims["id"](type jwt.Claims does not support indexing)
controllers\roles.go:203: invalid operation: token.Claims["id"](type jwt.Claims does not support indexing)
controllers\roles.go:257: invalid operation: token.Claims["id"](type jwt.Claims does not support indexing)

can't find ico file

2016/05/18 15:12:16 [router.go:829][D] | GET | / | 7.134515ms | match | / |
2016/05/18 15:12:16 [staticfile.go:51][W] Can't find/open the file: /favicon.ico file not find

router源码类中的疑问

在router源码类中有这么一段代码:
744 :if r.Method == http.MethodPost && context.Input.Query("_method") == http.MethodPost {
745 : method = http.MethodPut
746 : }
747 : if r.Method == http.MethodPost && context.Input.Query("_method") == http.MethodDelete {
748 : method = http.MethodDelete
749 :}
通过这两者的比较,744行中context.Input.Query("_method") == http.MethodPost 是不是应该改为context.Input.Query("_method") == http.MethodPut ?

bee run

.\main.go:28: undefined: syscall.Setregid
.\main.go:31: undefined: syscall.Setreuid
2016/09/08 14:27:58 [ERRO] ============== Build failed ===================

panic: Error 1045: Access denied for user 'root'@'localhost' (using password: YES)

when I run 'bee run':


| ___
| |/ / ___ ___
| ___ \ / _ \ / _
| |
/ /| /| /
_
/ _
| __| v1.8.0
2018/03/13 18:51:11 INFO ▶ 0001 Using 'beego-demo' as 'appname'
2018/03/13 18:51:11 INFO ▶ 0002 Initializing watcher...
2018/03/13 18:51:13 SUCCESS ▶ 0003 Built Successfully!
2018/03/13 18:51:13 INFO ▶ 0004 Restarting 'beego-demo'...
2018/03/13 18:51:13 SUCCESS ▶ 0005 './beego-demo' is running...
panic: Error 1045: Access denied for user 'root'@'localhost' (using password: YES)

goroutine 1 [running]:
panic(0x52b6c0, 0xc420188580)
/usr/local/go1.7.3/src/runtime/panic.go:500 +0x1a1
beego-demo/models/mymysql.init.1()
/Users/annie/code/golang/src/beego-demo/models/mymysql/mymysql.go:26 +0x106
beego-demo/models/mymysql.init()
/Users/annie/code/golang/src/beego-demo/models/mymysql/mymysql.go:31 +0x3d
beego-demo/models.init()
/Users/annie/code/golang/src/beego-demo/models/users_io.go:38 +0x3d
beego-demo/controllers.init()
/Users/annie/code/golang/src/beego-demo/controllers/users.go:271 +0x71
main.init()
/Users/annie/code/golang/src/beego-demo/main.go:46 +0x42

Then I change the password to my root password and re-run:


| ___
| |/ / ___ ___
| ___ \ / _ \ / _
| |
/ /| /| /
_
/ _
| __| v1.8.0
2018/03/13 18:52:54 INFO ▶ 0001 Using 'beego-demo' as 'appname'
2018/03/13 18:52:54 INFO ▶ 0002 Initializing watcher...
2018/03/13 18:52:55 SUCCESS ▶ 0003 Built Successfully!
2018/03/13 18:52:55 INFO ▶ 0004 Restarting 'beego-demo'...
2018/03/13 18:52:55 SUCCESS ▶ 0005 './beego-demo' is running...
panic: Error 1044: Access denied for user 'root'@'localhost' to database 'beego_demo'

goroutine 1 [running]:
panic(0x52b6c0, 0xc420188580)
/usr/local/go1.7.3/src/runtime/panic.go:500 +0x1a1
beego-demo/models/mymysql.init.1()
/Users/annie/code/golang/src/beego-demo/models/mymysql/mymysql.go:26 +0x106
beego-demo/models/mymysql.init()
/Users/annie/code/golang/src/beego-demo/models/mymysql/mymysql.go:31 +0x3d
beego-demo/models.init()
/Users/annie/code/golang/src/beego-demo/models/users_io.go:38 +0x3d
beego-demo/controllers.init()
/Users/annie/code/golang/src/beego-demo/controllers/users.go:271 +0x71
main.init()
/Users/annie/code/golang/src/beego-demo/main.go:46 +0x42

Do I need to create database'beego_demo' myself? or it already exised? how can I get access to it?

panic: dial tcp 192.168.1.xxx:6379: connectex: No connection could be made because the target machine actively refused it.

I`m stuck on this error with Redis config....

Beego-demo runs on Win7 with Redis app "Docked" on a Synology NAS (reached at 192.168.1.xxx)
In conf/conf.app file, I've updated sessionproviderconfig and [cache] server sections with proper Redis ip/port.

But I still have this err msg :
panic: dial tcp 192.168.1.xxx:6379: connectex: No connection could be made because the target machine actively refused it.

Any idea ? Thx in advance.

Eric

我项目启动了。怎么访问呢

我用postman访问/v1/roles/auth
报503 | 11.0006ms| nomatch
路径没有匹配
前面还有,NOAUTH Authentication required.
这个是程序的无权访问吗,但是这个路由路径是获取token的,这也有权限限制那怎么搞

jwt-go的问题

请问你的jwt-go具体是怎么使用的?
我看代码是在/roles/auth这个路由里面生成了一个token然后封装成json传给客户端,但是客户端也没有任何操作,这个是怎么写到http header里的?GetOne GetAll都有解析token,但是我没看见怎么写入的,能讲解一下吗

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.