maxi wu

+ Follow
since Jul 26, 2015
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by maxi wu

I am having problem with my java config spring mvc application. I have access control rule in my WebSecurityConfigurerAdapter, but when I make request to my application, the security filter does not seem to be check, and my request just pass through without any authentication.

so, I would like to understand how my rules are being applied to the filter chain, by what class, which method, and how to verify if my rules are in there working as expected.

my configuration is like the following, simply protect the /home only.

I have dig into source code of FilterChainProxy class and some other class, but still do not understand what is going on when I call HttpSecurity builder.
8 years ago
I have the same question. a bit difference, I am using java to configure my MVC project, the configuration is like

and I am thinking , what if some of my .jsp is not in /views/, but one hierarchy upper than that.
don't know how to do this yet.
8 years ago
I am using java config to setup my MVC web project. there are beans in my WebMvcConfigurerAdapter, some of them initialize correctly, they get invoked and reach breakpoint inside their method. but some of them are left out. notice that all left out beans are suffix with Controller, couldn't find out why.

for example, photoServices() is called, photoController() doesn't

project souce code

the WebMvcConfigurerAdapter

something wrong with @ComponentScan("umedia.test.oauth.controller")
if I remove this, all beans are initailized, but I get http 404 if I try to view any of my page
8 years ago
I have start my learning 3 months ago, and the process was painful and inefficient.

I am trying to learn spring in 3 ways, the first one is the best, reading books, second way is to read blog with sample code, the last one, most inefficient, reading spring docs.
the problem of reading book is, you have to find a book that exactly talk about what you want to know, like if you want to use mybatis with spring, you have to find that book and purchase it. right now, I could find a book that talks about spring + oauth + security.
the problem of reading blog is, many of those posts are out dated, or their sample environment are different from mine. like they are using embedded spring boot while I am not. and those different environment cause configuration error which is hard for me to fix.
the last one is bothering me so much, I could understand how to learn spring in this way, I read the whole websocket chapter, and it provide only a few snippet which is not enough to make things work. and that doc is talking about definition and design concept, did tell you a thing about how to make the whole thing works.

I was wondering, how do people learn spring and become so good about it. what could I do to learn spring + oauth + security efficiently?

P.S. these 3 months, I have learn xml base mvc setting, java base configuration, rest service, connect to database (postgresql), jsp, jstl, all are basics, couldn't customize those setting any further.
8 years ago