Giter Site home page Giter Site logo

Comments (8)

geine avatar geine commented on September 28, 2024

hello, i'm a newbie with Spring Security. i've an example written well in xml, and i'm going to ignore it, translate the xml syntax into java, but i got stuck with SecurityConfiguration. i'm trying to use your sample with jdbc but it failed, i still get stuck.
i've three table, one is user, role, and user_role which content with user_id and role_id, then implement user entity to userdetails which from spring, then using ShaPasswordEncoder to encode password, and salt.
i've link for my xml code, here it is https://gist.github.com/geine/5794359.i hope you'll give me some light about it.
thanks

from spring-security-javaconfig.

rwinch avatar rwinch commented on September 28, 2024

I think I will need a bit more details on how you are getting stuck. What do you mean by it failed? Does the configuration fail to load? If so, what exception do you get? What does your Java Configuration look like? The gist you provided does not provide any details about the content of com.rscharitas.training.spring.web.jpa.hibernate.security. In short, I need something more concrete in order to help you.

from spring-security-javaconfig.

geine avatar geine commented on September 28, 2024

hello Rob,
i've tried to translate that xml syntax into java class,
everytime i run the application, it is said,
Error creating bean with name 'springSecurityFilterChain' defined in class
path resource
[org/springframework/security/config/annotation/web/WebSecurityConfiguration.class]:
Instantiation of bean failed; nested exception is
org.springframework.beans.factory.BeanDefinitionStoreException: Factory
method [public org.springframework.security.web.FilterChainProxy
org.springframework.security.config.annotation.web.WebSecurityConfiguration.springSecurityFilterChain()
throws java.lang.Exception] threw exception; nested exception is
org.springframework.dao.DataAccessResourceFailureException: Failed to
execute database script; nested exception is
org.springframework.jdbc.datasource.init.ScriptStatementFailedException:
Failed to execute SQL script statement at line 1 of resource class path
resource [org/springframework/security/core/userdetails/jdbc/users.ddl]:
create table users(username varchar_ignorecase(50) not null primary
key,password varchar_ignorecase(50) not null,enabled boolean not null).

here is the link for SecurityConfiguration i made.
https://gist.github.com/geine/570be44d6bdac5e35f42.
and the link for mainConfiguration is here,
https://gist.github.com/geine/3044f9ad2f95051421c8.
i create user implements from userdetails, that's why i used salt,
passwordencoder in securityConfiguration. there is not much talking about
securityConfiguration, please help me, where i do wrong, please correct it.
thanks

2013/6/17 Rob Winch [email protected]

I think I will need a bit more details on how you are getting stuck. What
do you mean by it failed? Does the configuration fail to load? If so, what
exception do you get? What does your Java Configuration look like? The gist
you provided does not provide any details about the content of
com.rscharitas.training.spring.web.jpa.hibernate.security. In short, I need
something more concrete in order to help you.


Reply to this email directly or view it on GitHubhttps://github.com//issues/123#issuecomment-19558505
.

from spring-security-javaconfig.

rwinch avatar rwinch commented on September 28, 2024

Does the user have permissions to create the schema? Does the schema already exist? If so this can cause failures.

from spring-security-javaconfig.

geine avatar geine commented on September 28, 2024

yes, i got all confused with springsecurity configuration, if you have any
tutorial, can you send me one? because there'll be many things i should to
modified from your source and i have a little idea, eventually, it is very
little talk in web about springsecurity config, many of programmer just
using xml and i hate to have my code mingle with xml when they all clear of
xml before. thanks

2013/6/18 Rob Winch [email protected]

Does the user have permissions to create the schema? Does the schema
already exist? If so this can cause failures.


Reply to this email directly or view it on GitHubhttps://github.com//issues/123#issuecomment-19617555
.

from spring-security-javaconfig.

rwinch avatar rwinch commented on September 28, 2024

Did you figure out the issue? I'm not sure what you were saying yes to. Yes the user had permissions or Yes the schema was already created? If you did solve this issue, please close this issue out.

The only documentation that currently exists is on the github main page. There will be more documentation to come, but as the code has been under rather active development with non-passive changes (it hasn't yet been released) it doesn't make sense to commit a lot of time to detailed tutorials yet. A milestone release and further documentation should be coming soon.

For now, I would look through the tests that demonstrate how to convert from XML to Java Config (see the README for details on this). If this does not help, please create a new issue with a specific XML configuration with a specific error and complete stacktrace (please use markdown to format the code and stacktrace so it is easier to read).

from spring-security-javaconfig.

geine avatar geine commented on September 28, 2024

actually, i still can't figure it out. at the end i'm using xml and it run
well.

2013/6/19 Rob Winch [email protected]

Did you figure out the issue? I'm not sure what you were saying yes to.
Yes the user had permissions or Yes the schema was already created? If you
did solve this issue, please close this issue out.

The only documentation that currently exists is on the github main page.
There will be more documentation to come, but as the code has been under
rather active development with non-passive changes (it hasn't yet been
released) it doesn't make sense to commit a lot of time to detailed
tutorials yet. A milestone release and further documentation should be
coming soon.

For now, I would look through the tests that demonstrate how to convert
from XML to Java Config (see the README for details on this). If this does
not help, please create a new issue with a specific XML configuration with
a specific error and complete stacktrace (please use markdownhttp://github.github.com/github-flavored-markdown/to format the code and stacktrace so it is easier to read).


Reply to this email directly or view it on GitHubhttps://github.com//issues/123#issuecomment-19660005
.

from spring-security-javaconfig.

rwinch avatar rwinch commented on September 28, 2024

Please open another ticket if you can provide details around the issue you are having.

from spring-security-javaconfig.

Related Issues (20)

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.