简体   繁体   中英

Unable to login through gateway jhipster 4.9.0 microservice architechture

I've generated microservice application through jHipster 4.9.0. My UAA server is running on port 9999 and gateway on 8080 these microservices are connected through jHipster registry. When I try to log in through the gateway it's giving me 404 for /auth/login although gateway has this endpoint in AuthResource.java file. I have just generated these microservices and trying to log in but unfortunately, I'm unable to log in. Please guide me if there is something wrong I do not want to use the latest version of jHipster. JHipster registry version is 3.3. war download from github. It would be great if you can help me in any way. Thanks in advance.

在此处输入图片说明

referring to your comment on my question you are getting "Cannot GET /auth/login", which is an answer from webpack-dev-server and not the spring application. That means that the dev server doesn't proxy your request to the backend at all.

You can fix this error by changing the file "webpack.dev.js", where you should see something like this

    proxy: [{
        context: [
            '/uaa',
            /* jhipster-needle-add-entity-to-webpack - JHipster will add entity api paths here */
            '/api',
            '/management',
            '/swagger-resources',
            '/v2/api-docs',
            '/h2-console',
            '/auth' // that one is probaly missing!!
        ],
        target: 'http://127.0.0.1:8080',
        secure: false,
        headers: { host: 'localhost:9000' }
    }],

it looks like there is no '/auth' in your proxy list. Add it and restart yarn start to make it work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM