Coder Social home page Coder Social logo

spring-login's People

Contributors

gponce-ias avatar gustavoponce7 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  avatar  avatar  avatar

spring-login's Issues

Unit Test Is Broken

Hi Gustavo!

In UnitTest (UserServiceTest) you have:

// Run the test
User result = userServiceUnderTest.saveUser(User.builder().build());

but the correct to works is:

User result = userServiceUnderTest.saveUser(user); //Using the user created in setup

[ ]'s
Giuseppe Lopes

Login is not working

Can you please provide a solution for the login problem. I have tried many different solutions but login is still not working. The roles query seems like the cause of the problem.

UserServiceTest produces incompatible type

The UserServiceTest class produces an incompatible type error.

It says 'void cannot be converted to [my.package.app].model.User

The suggested solution is to "Make 'saveUser' return [my.package.app].model.User";

Not sure how to proceed...

Login Issue

can you provide me a login details please ....

Missing License

Could you submit a license for this code, so that users know if this code can be used for project, I am very interested in using this code, but wanted to get your permission first.

IllegalState Failed to load ApplicationCo...

[ERROR] contextLoads(com.gpch.login.LoginApplicationTests)  Time elapsed: 0.001 s  <<< ERROR!
java.lang.IllegalStateException: Failed to load ApplicationContext
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException

[INFO] Running com.gpch.login.service.UserServiceTest
[ERROR] Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.104 s <<< FAILURE! - in com.gpch.login.service.UserServiceTest
[ERROR] testSaveUser(com.gpch.login.service.UserServiceTest)  Time elapsed: 0.041 s  <<< ERROR!
org.mockito.exceptions.base.MockitoException:

Mockito cannot mock this class: interface com.gpch.login.repository.UserRepository.

Mockito can only mock non-private & non-final classes.
If you're not sure why you're getting this error, please report to the mailing list.


Java               : 11
JVM vendor name    : Oracle Corporation
JVM vendor version : 11.0.1+13-LTS
JVM name           : Java HotSpot(TM) 64-Bit Server VM
JVM version        : 11.0.1+13-LTS
JVM info           : mixed mode
OS name            : Mac OS X
OS version         : 10.14.1


Underlying exception : java.lang.UnsupportedOperationException: Cannot define class using reflection
	at com.gpch.login.service.UserServiceTest.setUp(UserServiceTest.java:31)
Caused by: java.lang.UnsupportedOperationException: Cannot define class using reflection
	at com.gpch.login.service.UserServiceTest.setUp(UserServiceTest.java:31)
Caused by: java.lang.IllegalStateException: Could not find sun.misc.Unsafe
	at com.gpch.login.service.UserServiceTest.setUp(UserServiceTest.java:31)
Caused by: java.lang.NoSuchMethodException: sun.misc.Unsafe.defineClass(java.lang.String, [B, int, int, java.lang.ClassLoader, java.security.ProtectionDomain)
	at com.gpch.login.service.UserServiceTest.setUp(UserServiceTest.java:31)

[ERROR] testFindUserByEmail(com.gpch.login.service.UserServiceTest)  Time elapsed: 0.062 s  <<< ERROR!
org.mockito.exceptions.base.MockitoException:

Mockito cannot mock this class: interface com.gpch.login.repository.UserRepository.

Mockito can only mock non-private & non-final classes.
If you're not sure why you're getting this error, please report to the mailing list.


Java               : 11
JVM vendor name    : Oracle Corporation
JVM vendor version : 11.0.1+13-LTS
JVM name           : Java HotSpot(TM) 64-Bit Server VM
JVM version        : 11.0.1+13-LTS
JVM info           : mixed mode
OS name            : Mac OS X
OS version         : 10.14.1


Underlying exception : java.lang.UnsupportedOperationException: Cannot define class using reflection
	at com.gpch.login.service.UserServiceTest.setUp(UserServiceTest.java:31)
Caused by: java.lang.UnsupportedOperationException: Cannot define class using reflection
	at com.gpch.login.service.UserServiceTest.setUp(UserServiceTest.java:31)
Caused by: java.lang.IllegalStateException: Could not find sun.misc.Unsafe
	at com.gpch.login.service.UserServiceTest.setUp(UserServiceTest.java:31)
Caused by: java.lang.NoSuchMethodException: sun.misc.Unsafe.defineClass(java.lang.String, [B, int, int, java.lang.ClassLoader, java.security.ProtectionDomain)
	at com.gpch.login.service.UserServiceTest.setUp(UserServiceTest.java:31)

[INFO]
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR]   LoginApplicationTests.contextLoads » IllegalState Failed to load ApplicationCo...
[ERROR]   UserServiceTest.setUp:31 Mockito
Mockito cannot mock this class: interface co...
[ERROR]   UserServiceTest.setUp:31 Mockito
Mockito cannot mock this class: interface co...
[INFO]
[ERROR] Tests run: 3, Failures: 0, Errors: 3, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  05:46 min
[INFO] Finished at: 2018-11-29T13:03:32+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.21.0:test (default-test) on project login: There are test failures.
[ERROR]
[ERROR] Please refer to /Users/sid/Documents/university/intergiciel/tutorial-example/spring-login/target/surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException```

data.sql not gives complete information

Hello, gustavoponce7. This code is working. But the data.sql file is not understandable. After import it not gives the necessary table queries. Want the queries for the database structure for tables,views,stored procedures etc to create the database objects in Mysql. Then it would be more helpful. Thank you.

Unable to login.

When I create a new user in the registration page a user is created successfully. But when I login to the login page it redirects to the login page. I have checked the DB and a new user is created in the user table. When observing the network tab there is a 302 in login. Please refer this image for the reference.
image

Multi-auth

is it possible to convert it into multi-auth

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.