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
import gql from 'graphql-tag'; | |
// https://docs.amplify.aws/cli-legacy/graphql-transformer/directives/ | |
const clientSchemaExtensions = gql` | |
# https://docs.amplify.aws/cli/graphql/data-modeling/#how-it-works | |
directive @model( | |
queries: ModelQueryMap | |
mutations: ModelMutationMap | |
subscriptions: ModelSubscriptionMap | |
timestamps: TimestampConfiguration |
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"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Disabled</key> | |
<false/> | |
<key>Label</key> | |
<string>virtualbox-autostart</string> | |
<key>ProgramArguments</key> | |
<array> |
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
- <resources mapping="/resources/**" location="/resources/" /> | |
+ <resources mapping="/resources/**" location="/" /> |
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
@RequestMapping(value = "/login", method = RequestMethod.GET) | |
public String login() { | |
return "login"; | |
} |
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
@RequestMapping("/signup") | |
@SessionAttributes("user") | |
@Controller | |
public class SignUpFormController { | |
private static final String DB_DRIVER_NAME = "com.mysql.jdbc.Driver"; | |
private static final String DB_URL = "jdbc:mysql://localhost/db_name?useUnicode=true&characterEncoding=UTF-8"; | |
private static final String DB_USER = "db_user"; | |
private static final String DB_PSWD = "db_password"; |
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
CREATE TABLE `users` ( | |
user_id int(10) NOT NULL AUTO_INCREMENT, | |
user_name varchar(40) NOT NULL, | |
password text NOT NULL, | |
enabled tinyint( 1 ) NOT NULL DEFAULT '1', | |
PRIMARY KEY (user_id) | |
) |
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 static void main(String[] args) { | |
System.out.println("Enter a string to encode:"); | |
Scanner scan = new Scanner(System.in); | |
String org = scan.next(); | |
System.out.println("Original String: "+ org); | |
StandardPasswordEncoder encoder = new StandardPasswordEncoder(); | |
String enc = encoder.encode(org); |
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
@RequestMapping(value = "/", method = RequestMethod.GET) | |
public String home(Locale locale, Model model, Principal principal) { | |
//... | |
if (null != principal) { | |
model.addAttribute("userName", principal.getName()); | |
} | |
//... | |
return "home"; | |
} |
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
<c:if test="${not empty userName}"> | |
<p>Logged in as: ${userName}</p> | |
</c:if> |
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"?> | |
<beans:beans xmlns="http://www.springframework.org/schema/security" | |
xmlns:beans="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans | |
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd | |
http://www.springframework.org/schema/security | |
http://www.springframework.org/schema/security/spring-security-3.1.xsd"> | |
<http auto-config="true"> |
NewerOlder