This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example; | |
| import org.springframework.boot.SpringApplication; | |
| import org.springframework.boot.autoconfigure.SpringBootApplication; | |
| @SpringBootApplication | |
| public class MvcFormsExampleApplication { | |
| public static void main(String[] args) { | |
| SpringApplication.run(MvcFormsExampleApplication.class, args); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example; | |
| import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer; | |
| import org.springframework.context.annotation.Bean; | |
| import org.springframework.stereotype.Controller; | |
| @Controller | |
| public class ServletConfig { | |
| @Bean | |
| public EmbeddedServletContainerCustomizer containerCustomizer() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>mvc-forms-example</groupId> | |
| <artifactId>hjbello</artifactId> | |
| <version>0.1.0</version> | |
| <packaging>war</packaging> | |
| <parent> | |
| <groupId>org.springframework.boot</groupId> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class UserDaoImpl implements UserDao { | |
| @Override | |
| public boolean isValidUser(String username, String password) { | |
| boolean isValid = false; | |
| EntityManager em = PersistenceManager.INSTANCE.getEntityManager(); | |
| UserPK pkToFind = new UserPK(); | |
| pkToFind.setUsername(username); | |
| pkToFind.setPassword(password); | |
| try { |
NewerOlder