cannot login mysql+springBoot+jpa+ftlShould I use the datetime or timestamp data type in MySQL?How to get a list of user accounts using the command line in MySQL?How to reset AUTO_INCREMENT in MySQL?How do I import an SQL file using the command line in MySQL?Security configuration with Spring-bootSpring Security WebSecurityConfigurerAdapter special charactersSpring Security Thymleaf static resources don't loadSpring boot security consider case insensitive username check for loginSpring Boot Web MVC Allow one user at a time from anywhereSpring-Security 5 always 302

How to know whether a Tamron lens is compatible with Canon EOS 60D?

When did the Roman Empire fall according to contemporaries?

Is purchasing foreign currency before going abroad a losing proposition?

Cops: The Hidden OEIS Substring

As the Dungeon Master, how do I handle a player that insists on a specific class when I already know that choice will cause issues?

How can an advanced civilization forget how to manufacture its technology?

Machine learning and operations research projects

Why did my rum cake turn black?

references on the empirical study on the practice of OR

How to achieve this rough borders and stippled illustration look?

How do Windows version numbers work?

Robbers: The Hidden OEIS Substring

Referring to different instances of the same character in time travel

What are some examples of special things about Russian?

Why are they 'nude photos'?

Cubic programming and beyond?

Can fluent English speakers distinguish “steel”, “still” and “steal”?

Why are Hobbits so fond of mushrooms?

Did any of the founding fathers anticipate Lysander Spooner's criticism of the constitution?

Is anyone advocating the promotion of homosexuality in UK schools?

What explains 9 speed cassettes price differences?

Supporting developers who insist on using their pet language

Matchmaker, Matchmaker, make me a match

What is this welding tool I found in my attic?



cannot login mysql+springBoot+jpa+ftl


Should I use the datetime or timestamp data type in MySQL?How to get a list of user accounts using the command line in MySQL?How to reset AUTO_INCREMENT in MySQL?How do I import an SQL file using the command line in MySQL?Security configuration with Spring-bootSpring Security WebSecurityConfigurerAdapter special charactersSpring Security Thymleaf static resources don't loadSpring boot security consider case insensitive username check for loginSpring Boot Web MVC Allow one user at a time from anywhereSpring-Security 5 always 302






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I'm set up to do user login/registration with spring boot security.



Security configuration file



 @Override
protected void configure(AuthenticationManagerBuilder auth)
throws Exception
auth.
jdbcAuthentication()
.usersByUsernameQuery(usersQuery)
.authoritiesByUsernameQuery(rolesQuery)
.dataSource(dataSource)
.passwordEncoder(bCryptPasswordEncoder);


@Override
protected void configure(HttpSecurity http) throws Exception

http.
authorizeRequests()
.antMatchers("/").permitAll()
.antMatchers("/login").permitAll()
.antMatchers("/registration").permitAll()
.antMatchers("/admin/**").hasAuthority("ADMIN").anyRequest()
.authenticated().and().csrf().disable().formLogin()
.loginPage("/login").failureUrl("/login?error=true")
.defaultSuccessUrl("/admin/home")
.usernameParameter("email")
.passwordParameter("password")
.and().logout()
.logoutRequestMatcher(new AntPathRequestMatcher("/"))
.logoutSuccessUrl("/")
.and().rememberMe()
.tokenRepository(persistentTokenRepository())
.tokenValiditySeconds(60*60)
.and().exceptionHandling().accessDeniedPage("/access_denied");;



@Bean
public PersistentTokenRepository persistentTokenRepository()
JdbcTokenRepositoryImpl db = new JdbcTokenRepositoryImpl();
db.setDataSource(dataSource);

return db;


@Override
public void configure(WebSecurity web) throws Exception
web
.ignoring()
.antMatchers("/resources/**", "/static/**", "/css/**", "/js/**", "/img/**","/fonts");





My ftl file






<form class="form-area contact-form " action="/login" method="POST">
<div class="col-lg-6 form-group">

<@spring.formInput path = "user.email" attributes = "type=email" name="email" attributes = "placeholder='Введите почту' class='common-input mb-20 form-control'"/>
<@spring.showErrors "<br>" "class = 'bg-danger' "/>

<@spring.formInput path = "user.password" type="password" name="password" attributes = "placeholder='Введите пароль' class='common-input mb-20 form-control'"/>
<@spring.showErrors "<br>" "class = 'bg-danger'" />


</div>
<div class="col-lg-12">
<div class="alert-msg" style="text-align: left;"></div>
<@spring.showErrors "<br>" "class = 'bg-danger'" />

<button class="primary-btn" type="submit" style="float: right;">Сохранить</button>
</div>

</form>





My registration works correct, but when I can't log in, cannot fix my problem will be happy for any help



https://github.com/balamanova/BagytWebSite
this is my github reps










share|improve this question






















  • What are you get? Any response, any error, any log? What username and what password enter in your login page? What values are saved in your database?

    – dur
    Mar 27 at 16:27

















0















I'm set up to do user login/registration with spring boot security.



Security configuration file



 @Override
protected void configure(AuthenticationManagerBuilder auth)
throws Exception
auth.
jdbcAuthentication()
.usersByUsernameQuery(usersQuery)
.authoritiesByUsernameQuery(rolesQuery)
.dataSource(dataSource)
.passwordEncoder(bCryptPasswordEncoder);


@Override
protected void configure(HttpSecurity http) throws Exception

http.
authorizeRequests()
.antMatchers("/").permitAll()
.antMatchers("/login").permitAll()
.antMatchers("/registration").permitAll()
.antMatchers("/admin/**").hasAuthority("ADMIN").anyRequest()
.authenticated().and().csrf().disable().formLogin()
.loginPage("/login").failureUrl("/login?error=true")
.defaultSuccessUrl("/admin/home")
.usernameParameter("email")
.passwordParameter("password")
.and().logout()
.logoutRequestMatcher(new AntPathRequestMatcher("/"))
.logoutSuccessUrl("/")
.and().rememberMe()
.tokenRepository(persistentTokenRepository())
.tokenValiditySeconds(60*60)
.and().exceptionHandling().accessDeniedPage("/access_denied");;



@Bean
public PersistentTokenRepository persistentTokenRepository()
JdbcTokenRepositoryImpl db = new JdbcTokenRepositoryImpl();
db.setDataSource(dataSource);

return db;


@Override
public void configure(WebSecurity web) throws Exception
web
.ignoring()
.antMatchers("/resources/**", "/static/**", "/css/**", "/js/**", "/img/**","/fonts");





My ftl file






<form class="form-area contact-form " action="/login" method="POST">
<div class="col-lg-6 form-group">

<@spring.formInput path = "user.email" attributes = "type=email" name="email" attributes = "placeholder='Введите почту' class='common-input mb-20 form-control'"/>
<@spring.showErrors "<br>" "class = 'bg-danger' "/>

<@spring.formInput path = "user.password" type="password" name="password" attributes = "placeholder='Введите пароль' class='common-input mb-20 form-control'"/>
<@spring.showErrors "<br>" "class = 'bg-danger'" />


</div>
<div class="col-lg-12">
<div class="alert-msg" style="text-align: left;"></div>
<@spring.showErrors "<br>" "class = 'bg-danger'" />

<button class="primary-btn" type="submit" style="float: right;">Сохранить</button>
</div>

</form>





My registration works correct, but when I can't log in, cannot fix my problem will be happy for any help



https://github.com/balamanova/BagytWebSite
this is my github reps










share|improve this question






















  • What are you get? Any response, any error, any log? What username and what password enter in your login page? What values are saved in your database?

    – dur
    Mar 27 at 16:27













0












0








0








I'm set up to do user login/registration with spring boot security.



Security configuration file



 @Override
protected void configure(AuthenticationManagerBuilder auth)
throws Exception
auth.
jdbcAuthentication()
.usersByUsernameQuery(usersQuery)
.authoritiesByUsernameQuery(rolesQuery)
.dataSource(dataSource)
.passwordEncoder(bCryptPasswordEncoder);


@Override
protected void configure(HttpSecurity http) throws Exception

http.
authorizeRequests()
.antMatchers("/").permitAll()
.antMatchers("/login").permitAll()
.antMatchers("/registration").permitAll()
.antMatchers("/admin/**").hasAuthority("ADMIN").anyRequest()
.authenticated().and().csrf().disable().formLogin()
.loginPage("/login").failureUrl("/login?error=true")
.defaultSuccessUrl("/admin/home")
.usernameParameter("email")
.passwordParameter("password")
.and().logout()
.logoutRequestMatcher(new AntPathRequestMatcher("/"))
.logoutSuccessUrl("/")
.and().rememberMe()
.tokenRepository(persistentTokenRepository())
.tokenValiditySeconds(60*60)
.and().exceptionHandling().accessDeniedPage("/access_denied");;



@Bean
public PersistentTokenRepository persistentTokenRepository()
JdbcTokenRepositoryImpl db = new JdbcTokenRepositoryImpl();
db.setDataSource(dataSource);

return db;


@Override
public void configure(WebSecurity web) throws Exception
web
.ignoring()
.antMatchers("/resources/**", "/static/**", "/css/**", "/js/**", "/img/**","/fonts");





My ftl file






<form class="form-area contact-form " action="/login" method="POST">
<div class="col-lg-6 form-group">

<@spring.formInput path = "user.email" attributes = "type=email" name="email" attributes = "placeholder='Введите почту' class='common-input mb-20 form-control'"/>
<@spring.showErrors "<br>" "class = 'bg-danger' "/>

<@spring.formInput path = "user.password" type="password" name="password" attributes = "placeholder='Введите пароль' class='common-input mb-20 form-control'"/>
<@spring.showErrors "<br>" "class = 'bg-danger'" />


</div>
<div class="col-lg-12">
<div class="alert-msg" style="text-align: left;"></div>
<@spring.showErrors "<br>" "class = 'bg-danger'" />

<button class="primary-btn" type="submit" style="float: right;">Сохранить</button>
</div>

</form>





My registration works correct, but when I can't log in, cannot fix my problem will be happy for any help



https://github.com/balamanova/BagytWebSite
this is my github reps










share|improve this question














I'm set up to do user login/registration with spring boot security.



Security configuration file



 @Override
protected void configure(AuthenticationManagerBuilder auth)
throws Exception
auth.
jdbcAuthentication()
.usersByUsernameQuery(usersQuery)
.authoritiesByUsernameQuery(rolesQuery)
.dataSource(dataSource)
.passwordEncoder(bCryptPasswordEncoder);


@Override
protected void configure(HttpSecurity http) throws Exception

http.
authorizeRequests()
.antMatchers("/").permitAll()
.antMatchers("/login").permitAll()
.antMatchers("/registration").permitAll()
.antMatchers("/admin/**").hasAuthority("ADMIN").anyRequest()
.authenticated().and().csrf().disable().formLogin()
.loginPage("/login").failureUrl("/login?error=true")
.defaultSuccessUrl("/admin/home")
.usernameParameter("email")
.passwordParameter("password")
.and().logout()
.logoutRequestMatcher(new AntPathRequestMatcher("/"))
.logoutSuccessUrl("/")
.and().rememberMe()
.tokenRepository(persistentTokenRepository())
.tokenValiditySeconds(60*60)
.and().exceptionHandling().accessDeniedPage("/access_denied");;



@Bean
public PersistentTokenRepository persistentTokenRepository()
JdbcTokenRepositoryImpl db = new JdbcTokenRepositoryImpl();
db.setDataSource(dataSource);

return db;


@Override
public void configure(WebSecurity web) throws Exception
web
.ignoring()
.antMatchers("/resources/**", "/static/**", "/css/**", "/js/**", "/img/**","/fonts");





My ftl file






<form class="form-area contact-form " action="/login" method="POST">
<div class="col-lg-6 form-group">

<@spring.formInput path = "user.email" attributes = "type=email" name="email" attributes = "placeholder='Введите почту' class='common-input mb-20 form-control'"/>
<@spring.showErrors "<br>" "class = 'bg-danger' "/>

<@spring.formInput path = "user.password" type="password" name="password" attributes = "placeholder='Введите пароль' class='common-input mb-20 form-control'"/>
<@spring.showErrors "<br>" "class = 'bg-danger'" />


</div>
<div class="col-lg-12">
<div class="alert-msg" style="text-align: left;"></div>
<@spring.showErrors "<br>" "class = 'bg-danger'" />

<button class="primary-btn" type="submit" style="float: right;">Сохранить</button>
</div>

</form>





My registration works correct, but when I can't log in, cannot fix my problem will be happy for any help



https://github.com/balamanova/BagytWebSite
this is my github reps






<form class="form-area contact-form " action="/login" method="POST">
<div class="col-lg-6 form-group">

<@spring.formInput path = "user.email" attributes = "type=email" name="email" attributes = "placeholder='Введите почту' class='common-input mb-20 form-control'"/>
<@spring.showErrors "<br>" "class = 'bg-danger' "/>

<@spring.formInput path = "user.password" type="password" name="password" attributes = "placeholder='Введите пароль' class='common-input mb-20 form-control'"/>
<@spring.showErrors "<br>" "class = 'bg-danger'" />


</div>
<div class="col-lg-12">
<div class="alert-msg" style="text-align: left;"></div>
<@spring.showErrors "<br>" "class = 'bg-danger'" />

<button class="primary-btn" type="submit" style="float: right;">Сохранить</button>
</div>

</form>





<form class="form-area contact-form " action="/login" method="POST">
<div class="col-lg-6 form-group">

<@spring.formInput path = "user.email" attributes = "type=email" name="email" attributes = "placeholder='Введите почту' class='common-input mb-20 form-control'"/>
<@spring.showErrors "<br>" "class = 'bg-danger' "/>

<@spring.formInput path = "user.password" type="password" name="password" attributes = "placeholder='Введите пароль' class='common-input mb-20 form-control'"/>
<@spring.showErrors "<br>" "class = 'bg-danger'" />


</div>
<div class="col-lg-12">
<div class="alert-msg" style="text-align: left;"></div>
<@spring.showErrors "<br>" "class = 'bg-danger'" />

<button class="primary-btn" type="submit" style="float: right;">Сохранить</button>
</div>

</form>






mysql spring-boot spring-mvc spring-security spring-data-jpa






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 26 at 3:08









Асем БаламановаАсем Баламанова

34 bronze badges




34 bronze badges












  • What are you get? Any response, any error, any log? What username and what password enter in your login page? What values are saved in your database?

    – dur
    Mar 27 at 16:27

















  • What are you get? Any response, any error, any log? What username and what password enter in your login page? What values are saved in your database?

    – dur
    Mar 27 at 16:27
















What are you get? Any response, any error, any log? What username and what password enter in your login page? What values are saved in your database?

– dur
Mar 27 at 16:27





What are you get? Any response, any error, any log? What username and what password enter in your login page? What values are saved in your database?

– dur
Mar 27 at 16:27












0






active

oldest

votes










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55349284%2fcannot-login-mysqlspringbootjpaftl%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes




Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55349284%2fcannot-login-mysqlspringbootjpaftl%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript