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

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

위키백과:대문 둘러보기 메뉴기부 안내모바일판 대문크리에이티브 커먼즈 저작자표시-동일조건변경허락 3.0CebuanoDeutschEnglishEspañolFrançaisItaliano日本語NederlandsPolskiPortuguêsРусскийSvenskaTiếng ViệtWinaray中文العربيةCatalàفارسیSrpskiУкраїнськаБългарскиНохчийнČeštinaDanskEsperantoEuskaraSuomiעבריתMagyarՀայերենBahasa IndonesiaҚазақшаBaso MinangkabauBahasa MelayuBân-lâm-gúNorskRomânăSrpskohrvatskiSlovenčinaTürkçe

용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh