work in progress but I think I've got spring security setup figured out.
Just need to reconcile a few more things before I can say I completely
understand spring security (well enough to use it anyway)
Added HandlerInterceptors so that we can log the logged in user's name
to the log files, also added an exception interceptor to email all
uncaught exceptions to support. Stubbed out the email service but it
isn't really implemented just yet
came up with data.sql to preload the db with a user so that we have a
system account
discovered that I was using a repository directly from a controller
instead of a service. This is generally a no no. Corrected to using a
service instead
tried to implement spring data jpa auditing but couldn't get it to work.
Going to wait and see if the next release fixes my issues.
refactored package scans to use wild cards, which for now won't make
much sense, but they will in another branch (going to show how to order
everything into slices)
created a SimpleMappingExceptionResolver which emails support when
exceptions occur. Not working perfectly just yet though
Created email support simple mapping exception resolver (view to show
users when an exception/warning occurs
while implementing an example HandlerInterceptor that I've used
previously to email support I came across the concept of
ExceptionResolvers which go one step further and send the user to a view
showing them a friendly "Error occurred" screen. I kept this code in the
code base just to show an alternative that I've used
HandlerInterceptor that appends the current user (provided by spring
security) to the logger's MDC
Added JavaMail impl email service
added email exception so we can tell if the exception is really a system
exception or just an error that occurred while attempting to send an
email
refactored the UserDetailsService, still trying to get my head wrapped
around when we should return a UserDetail or just a User object and
which instance (my implementations or spring's)
Split out my implementation of UserDetails
created an interface for my UserDetails service
added dependencies needed for spring to use JavaMail
moving over to a .sql file to preload the database. Trying to get the
DataConfig to load it, but only once. Might have to resort to having the
user manually load it or just wipe the database each run
first attempt to get Spring Data JPA's auditing to work wasn't
successful. Going to wait on a release or two before I try again
stubbed out password and password confirm boxes but the confirmation
isn't really happening. Will correct when we go to bootstrap 3