migration_id
stringclasses
994 values
ver1_file_path
stringlengths
25
222
ver2_file_path
stringlengths
28
222
ver1_tree_path
stringlengths
1
111
ver2_tree_path
stringlengths
1
105
ver1_signature
stringlengths
5
3.53k
ver2_signature
stringlengths
5
3.53k
method_ver1
stringlengths
8
336k
method_ver2
stringlengths
8
171k
zanata_zanata-platform__47990607471bf164988fcfe3a93f9cb36974e927__47990607471bf164988fcfe3a93f9cb36974e927
zanata-rest-client/src/main/java/org/zanata/rest/client/ZanataProxyFactory.java
null
ZanataProxyFactory
null
getTranslatedDocResource__(String projectSlug, String versionSlug)
null
public ITranslatedDocResource getTranslatedDocResource(String projectSlug, String versionSlug) { return createProxy(ITranslatedDocResource.class, getResourceURI(projectSlug, versionSlug)); }
null
zanata_zanata-platform__47990607471bf164988fcfe3a93f9cb36974e927__47990607471bf164988fcfe3a93f9cb36974e927
zanata-rest-client/src/main/java/org/zanata/rest/client/ZanataProxyFactory.java
null
ZanataProxyFactory
null
getSourceDocResource__(String projectSlug, String versionSlug)
null
public ISourceDocResource getSourceDocResource(String projectSlug, String versionSlug) { return createProxy(ISourceDocResource.class, getResourceURI(projectSlug, versionSlug)); }
null
zanata_zanata-platform__47990607471bf164988fcfe3a93f9cb36974e927__47990607471bf164988fcfe3a93f9cb36974e927
zanata-rest-client/src/main/java/org/zanata/rest/client/ZanataProxyFactory.java
null
ZanataProxyFactory
null
getFileResource__()
null
public IFileResource getFileResource() { return createProxy(IFileResource.class); }
null
zanata_zanata-platform__47990607471bf164988fcfe3a93f9cb36974e927__47990607471bf164988fcfe3a93f9cb36974e927
zanata-rest-client/src/main/java/org/zanata/rest/client/ZanataProxyFactory.java
null
ZanataProxyFactory
null
getStatisticsResource__()
null
public IStatisticsResource getStatisticsResource() { return createProxy(IStatisticsResource.class); }
null
zanata_zanata-platform__47990607471bf164988fcfe3a93f9cb36974e927__47990607471bf164988fcfe3a93f9cb36974e927
zanata-rest-client/src/main/java/org/zanata/rest/client/ZanataProxyFactory.java
null
ZanataProxyFactory
null
getCopyTransResource__()
null
public ICopyTransResource getCopyTransResource() { return createProxy(ICopyTransResource.class); }
null
zanata_zanata-platform__47990607471bf164988fcfe3a93f9cb36974e927__47990607471bf164988fcfe3a93f9cb36974e927
zanata-rest-client/src/main/java/org/zanata/rest/client/ZanataProxyFactory.java
null
ZanataProxyFactory
null
getAsynchronousProcessResource__()
null
public IAsynchronousProcessResource getAsynchronousProcessResource() { return createProxy(IAsynchronousProcessResource.class); }
null
zanata_zanata-platform__47990607471bf164988fcfe3a93f9cb36974e927__47990607471bf164988fcfe3a93f9cb36974e927
zanata-rest-client/src/main/java/org/zanata/rest/client/ZanataProxyFactory.java
null
ZanataProxyFactory
null
getResourceURI__(String projectSlug, String versionSlug)
null
public URI getResourceURI(String projectSlug, String versionSlug) { String spec = "projects/p/" + projectSlug + "/iterations/i/" + versionSlug + "/r"; try { return new URL(getBaseUrl(), spec).toURI(); } catch (MalformedURLException e) { throw new RuntimeException(e); } catch (URISyntaxException e) { String msg = "URI Syntax error. Please make sure your project (project ID) and version are correct."; log.error(msg); log.error("part of your url: {}", spec); throw new RuntimeException(msg); } }
null
zanata_zanata-platform__47990607471bf164988fcfe3a93f9cb36974e927__47990607471bf164988fcfe3a93f9cb36974e927
zanata-rest-client/src/main/java/org/zanata/rest/client/ZanataProxyFactory.java
null
ZanataProxyFactory
null
registerPrefixInterceptor__(Object interceptor)
null
public void registerPrefixInterceptor(Object interceptor) { ClientInterceptorRepository repo = getPrefixInterceptors(); repo.registerInterceptor(interceptor); }
null
zanata_zanata-platform__47990607471bf164988fcfe3a93f9cb36974e927__47990607471bf164988fcfe3a93f9cb36974e927
zanata-rest-client/src/main/java/org/zanata/rest/client/ZanataProxyFactory.java
null
ZanataProxyFactory
null
getPrefixInterceptors__()
null
private ClientInterceptorRepository getPrefixInterceptors() { try { Method m = crf.getClass().getMethod("getPrefixInterceptors"); return (ClientInterceptorRepository) m.invoke(crf); } catch (Exception e) { throw new RuntimeException(e); } }
null
zanata_zanata-platform__47990607471bf164988fcfe3a93f9cb36974e927__47990607471bf164988fcfe3a93f9cb36974e927
zanata-rest-client/src/main/java/org/zanata/rest/client/ZanataProxyFactory.java
null
ZanataProxyFactory
null
createIVersionResource__()
null
protected IVersionResource createIVersionResource() { return createProxy(IVersionResource.class, getBaseUri()); }
null
zanata_zanata-platform__47990607471bf164988fcfe3a93f9cb36974e927__47990607471bf164988fcfe3a93f9cb36974e927
zanata-rest-client/src/main/java/org/zanata/rest/client/ZanataProxyFactory.java
null
ZanataProxyFactory
null
compareToServerVersion__(String version)
null
public int compareToServerVersion(String version) { DefaultArtifactVersion srvVersion = new DefaultArtifactVersion(serverVersion); DefaultArtifactVersion providedVersion = new DefaultArtifactVersion(version); return srvVersion.compareTo(providedVersion); }
null
zanata_zanata-platform__47990607471bf164988fcfe3a93f9cb36974e927__47990607471bf164988fcfe3a93f9cb36974e927
zanata-rest-client/src/main/java/org/zanata/rest/client/ZanataProxyFactory.java
null
ZanataProxyFactory.AcceptAllX509TrustManager
null
getAcceptedIssuers__()
null
public X509Certificate[] getAcceptedIssuers() { return null; }
null
zanata_zanata-platform__47990607471bf164988fcfe3a93f9cb36974e927__47990607471bf164988fcfe3a93f9cb36974e927
zanata-rest-client/src/main/java/org/zanata/rest/client/ZanataProxyFactory.java
null
ZanataProxyFactory.AcceptAllX509TrustManager
null
checkClientTrusted__(X509Certificate[] certs, String authType)
null
public void checkClientTrusted(X509Certificate[] certs, String authType) throws CertificateException { }
null
zanata_zanata-platform__47990607471bf164988fcfe3a93f9cb36974e927__47990607471bf164988fcfe3a93f9cb36974e927
zanata-rest-client/src/main/java/org/zanata/rest/client/ZanataProxyFactory.java
null
ZanataProxyFactory.AcceptAllX509TrustManager
null
checkServerTrusted__(X509Certificate[] certs, String authType)
null
public void checkServerTrusted(X509Certificate[] certs, String authType) throws CertificateException { }
null
zanata_zanata-platform__47990607471bf164988fcfe3a93f9cb36974e927__47990607471bf164988fcfe3a93f9cb36974e927
zanata-client-commands/src/test/java/org/zanata/client/commands/HTTPMockContainer.java
null
HTTPMockContainer.Builder
null
readFromClasspath__(String relativePath)
null
public static String readFromClasspath(String relativePath) throws IOException { URL resource = Thread.currentThread().getContextClassLoader() .getResource(relativePath); Preconditions.checkArgument(resource != null, "%s not found", relativePath); return IOUtils.toString(resource, Charsets.UTF_8); }
null
zanata_zanata-platform__47990607471bf164988fcfe3a93f9cb36974e927__47990607471bf164988fcfe3a93f9cb36974e927
zanata-client-commands/src/test/java/org/zanata/client/integraion/FileProjectITCase.java
null
FileProjectITCase
null
setUp__()
null
@Before public void setUp() throws Exception { opts = new PushOptionsImpl(); TestProjectGenerator.ServerInstance instance = TestProjectGenerator.ServerInstance.FunctionalTestCargo; opts.setUrl(instance.getURL()); opts.setUsername(instance.getUsername()); opts.setKey(instance.getKey()); testProjectGenerator.ensureProjectOnServer(opts, ProjectType.File, instance); opts.setLocaleMapList(new LocaleList()); opts.getLocaleMapList().add(new LocaleMapping("zh-CN")); opts.setBatchMode(true); }
null
zanata_zanata-platform__47990607471bf164988fcfe3a93f9cb36974e927__47990607471bf164988fcfe3a93f9cb36974e927
zanata-client-commands/src/test/java/org/zanata/client/integraion/FileProjectITCase.java
null
FileProjectITCase
null
manualTest__()
null
@Test public void manualTest() throws IOException { File baseDir = testProjectGenerator.getProjectBaseDir(ProjectType.File); log.debug("testing project is at: {}", baseDir); opts.setFileTypes("odt,ods"); opts.setSrcDir(new File(baseDir, "src")); opts.setTransDir(baseDir); opts.setProj(testProjectGenerator.sampleProjectSlug(baseDir)); opts.setProjectVersion(testProjectGenerator.sampleIterationSlug()); opts.setProjectType("file"); opts.setFileTypes("odt"); RawPushCommand pushCommand = new RawPushCommand(opts); pushCommand.run(); }
null
zanata_zanata-platform__47990607471bf164988fcfe3a93f9cb36974e927__47990607471bf164988fcfe3a93f9cb36974e927
zanata-client-commands/src/main/java/org/zanata/client/commands/OptionsUtil.java
null
OptionsUtil
null
createRequestFactoryWithoutVersionCheck__( ConfigurableProjectOptions opts)
null
public static ZanataProxyFactory createRequestFactoryWithoutVersionCheck( ConfigurableProjectOptions opts) { try { checkMandatoryOptsForRequestFactory(opts); return new ZanataProxyFactory(opts.getUrl().toURI(), opts.getUsername(), opts.getKey(), VersionUtility.getAPIVersionInfo(), opts.getLogHttp(), opts.isDisableSSLCert(), false); } catch (URISyntaxException e) { throw new ConfigException(e); } }
null
zanata_zanata-platform__9ec95ad05b37389a574ea541cee6d861bd7c26d5__9ec95ad05b37389a574ea541cee6d861bd7c26d5
zanata-model/src/main/java/org/zanata/hibernate/search/ULowerCaseFilter.java
null
ULowerCaseFilter
null
ULowerCaseFilter__(TokenStream input)
null
public ULowerCaseFilter(TokenStream input) { super(input); termText = addAttribute(CharTermAttribute.class); }
null
zanata_zanata-platform__9ec95ad05b37389a574ea541cee6d861bd7c26d5__9ec95ad05b37389a574ea541cee6d861bd7c26d5
zanata-model/src/main/java/org/zanata/hibernate/search/ULowerCaseFilter.java
null
ULowerCaseFilter
null
incrementToken__()
null
public final boolean incrementToken() throws IOException { boolean hasToken = input.incrementToken(); if (hasToken) { final char[] buffer = termText.buffer(); final int length = termText.length(); for (int i = 0; i < length; i++) { buffer[i] = (char) UCharacter.foldCase(buffer[i], true); } } return hasToken; }
null
zanata_zanata-platform__9ec95ad05b37389a574ea541cee6d861bd7c26d5__9ec95ad05b37389a574ea541cee6d861bd7c26d5
zanata-war/src/main/java/org/zanata/exception/handler/ClientAbortExceptionHandler.java
null
ClientAbortExceptionHandler
null
handleException__( @Handles ExceptionEvent<ClientAbortException> event)
null
public void handleException( @Handles ExceptionEvent<ClientAbortException> event) { handle(event, LogLevel.Debug, FacesMessage.SEVERITY_ERROR, "jsf.DetailError", event.getException().getMessage()); }
null
zanata_zanata-platform__9ec95ad05b37389a574ea541cee6d861bd7c26d5__9ec95ad05b37389a574ea541cee6d861bd7c26d5
zanata-war/src/main/java/org/zanata/webtrans/server/HibernateIntegrator.java
null
HibernateIntegrator
null
integrate__(MetadataImplementor metadata, SessionFactoryImplementor sessionFactory, SessionFactoryServiceRegistry serviceRegistry)
null
@Override public void integrate(MetadataImplementor metadata, SessionFactoryImplementor sessionFactory, SessionFactoryServiceRegistry serviceRegistry) { }
null
zanata_zanata-platform__9ec95ad05b37389a574ea541cee6d861bd7c26d5__9ec95ad05b37389a574ea541cee6d861bd7c26d5
zanata-war/src/main/java/org/zanata/security/negotiation/CustomNegotiationAuthenticator.java
null
CustomNegotiationAuthenticator
null
authenticate__(Request request, HttpServletResponse response, LoginConfig config)
null
@Override public boolean authenticate(Request request, HttpServletResponse response, LoginConfig config) throws IOException { response.setContentType("text/html"); return super.authenticate(request, response, config); }
null
zanata_zanata-platform__9ec95ad05b37389a574ea541cee6d861bd7c26d5__9ec95ad05b37389a574ea541cee6d861bd7c26d5
zanata-model/src/main/java/org/zanata/hibernate/search/CaseInsensitiveWhitespaceAnalyzer.java
null
CaseInsensitiveWhitespaceAnalyzer
null
CaseInsensitiveWhitespaceAnalyzer__(Version matchVersion)
null
public CaseInsensitiveWhitespaceAnalyzer(Version matchVersion) { this.matchVersion = matchVersion; }
null
zanata_zanata-platform__9ec95ad05b37389a574ea541cee6d861bd7c26d5__9ec95ad05b37389a574ea541cee6d861bd7c26d5
zanata-model/src/main/java/org/zanata/hibernate/search/CaseInsensitiveWhitespaceAnalyzer.java
null
CaseInsensitiveWhitespaceAnalyzer
null
createComponents__( String fieldName, Reader reader)
null
@Override protected TokenStreamComponents createComponents( String fieldName, Reader reader) { final WhitespaceTokenizer src = new WhitespaceTokenizer(matchVersion, reader); TokenStream tok = new LowerCaseFilter(matchVersion, src); return new TokenStreamComponents(src, tok); }
null
zanata_zanata-platform__9ec95ad05b37389a574ea541cee6d861bd7c26d5__9ec95ad05b37389a574ea541cee6d861bd7c26d5
zanata-model/src/main/java/org/zanata/hibernate/search/LocaleFilter.java
null
LocaleFilter
null
getDocIdSet__(IndexReader reader)
null
@Override public DocIdSet getDocIdSet(IndexReader reader) throws IOException { OpenBitSet bitSet = new OpenBitSet(reader.maxDoc()); log.debug("getDocIdSet for {}", locale); Term term = new Term("locale", locale.toString()); TermDocs termDocs = reader.termDocs(term); while (termDocs.next()) { bitSet.set(termDocs.doc()); } return bitSet; }
null
zanata_zanata-platform__9ec95ad05b37389a574ea541cee6d861bd7c26d5__9ec95ad05b37389a574ea541cee6d861bd7c26d5
zanata-model/src/main/java/org/zanata/hibernate/search/DefaultAnalyzer.java
null
DefaultAnalyzer
null
DefaultAnalyzer__(Version matchVersion)
null
public DefaultAnalyzer(Version matchVersion) { this.matchVersion = matchVersion; }
null
zanata_zanata-platform__9ec95ad05b37389a574ea541cee6d861bd7c26d5__9ec95ad05b37389a574ea541cee6d861bd7c26d5
zanata-model/src/main/java/org/zanata/hibernate/search/DefaultAnalyzer.java
null
DefaultAnalyzer
null
tokenStream__(@Nullable String fieldName, Reader reader)
null
@Override public TokenStream tokenStream(@Nullable String fieldName, Reader reader) { // FIXME this should apply to some or all fields in TransMemoryUnitVariant, esp. plainTextSegment if (fieldName != null && fieldName.contains(".content-nocase")) { StandardTokenizer source = new StandardTokenizer(matchVersion, reader); TokenFilter filter = new StandardFilter(matchVersion, source); // TODO should we be using ULowerCaseFilter (also in HTextContainer)? filter = new LowerCaseFilter(matchVersion, filter); // Shouldn't we use a StopFilter too? return filter; } else { return new PassThroughTokenizer(matchVersion, reader); } }
null
zanata_zanata-platform__9ec95ad05b37389a574ea541cee6d861bd7c26d5__9ec95ad05b37389a574ea541cee6d861bd7c26d5
zanata-model/src/main/java/org/zanata/hibernate/search/DefaultAnalyzer.java
null
DefaultAnalyzer.PassThroughTokenizer
null
PassThroughTokenizer__(Version luceneVersion, Reader input)
null
public PassThroughTokenizer(Version luceneVersion, Reader input) { super(luceneVersion, input); }
null
zanata_zanata-platform__9ec95ad05b37389a574ea541cee6d861bd7c26d5__9ec95ad05b37389a574ea541cee6d861bd7c26d5
zanata-model/src/main/java/org/zanata/hibernate/search/DefaultAnalyzer.java
null
DefaultAnalyzer.PassThroughTokenizer
null
isTokenChar__(int c)
null
@Override protected boolean isTokenChar(int c) { return true; }
null
zanata_zanata-platform__9ec95ad05b37389a574ea541cee6d861bd7c26d5__9ec95ad05b37389a574ea541cee6d861bd7c26d5
zanata-model/src/main/java/org/zanata/hibernate/search/UnigramAnalyzer.java
null
UnigramAnalyzer
null
UnigramAnalyzer__(Version matchVersion)
null
public UnigramAnalyzer(Version matchVersion) { this.matchVersion = matchVersion; }
null
zanata_zanata-platform__9ec95ad05b37389a574ea541cee6d861bd7c26d5__9ec95ad05b37389a574ea541cee6d861bd7c26d5
zanata-model/src/main/java/org/zanata/hibernate/search/UnigramAnalyzer.java
null
UnigramAnalyzer
null
tokenStream__(String fieldName, Reader reader)
null
@Override public TokenStream tokenStream(String fieldName, Reader reader) { NGramTokenizer source = new NGramTokenizer(reader, 1, 1); if (fieldName != null && fieldName.contains("content-nocase")) { // TODO should we be using ULowerCaseFilter (also in HTextContainer)? return new LowerCaseFilter(matchVersion, source); } else { return source; } }
null
zccodere_study-imooc__4542703d47cf656ce71185bab61b8669bb698329__4542703d47cf656ce71185bab61b8669bb698329
02-spring/02-spring-tx/src/main/java/com/myimooc/spring/tx/mydemo1/dao/AccountDao.java
null
AccountDao
null
outMoney__(String out,Double money)
null
void outMoney(String out,Double money);
null
zccodere_study-imooc__4542703d47cf656ce71185bab61b8669bb698329__4542703d47cf656ce71185bab61b8669bb698329
02-spring/02-spring-tx/src/main/java/com/myimooc/spring/tx/mydemo1/dao/AccountDao.java
null
AccountDao
null
inMoney__(String in,Double money)
null
void inMoney(String in,Double money);
null
zccodere_study-imooc__4542703d47cf656ce71185bab61b8669bb698329__4542703d47cf656ce71185bab61b8669bb698329
02-spring/02-spring-tx/src/main/java/com/myimooc/spring/tx/mydemo1/service/AccountService.java
null
AccountService
null
transfer__(String out,String in,Double money)
null
void transfer(String out,String in,Double money);
null
zccodere_study-imooc__4ca89bb55c2182eabe2b74b3ec13183e659a26e5__4ca89bb55c2182eabe2b74b3ec13183e659a26e5
11-spring/11-spring-data/src/test/java/com/myimooc/spring/data/jpa/repository/EmployeeJpaSpecificationExecutorTest.java
null
EmployeeJpaSpecificationExecutorTest
null
init__()
null
@Before public void init(){ ctx = new AnnotationConfigApplicationContext(SpringConfig.class); employeeJpaSpecificationExecutor = ctx.getBean(EmployeeJpaSpecificationExecutor.class); }
null
zccodere_study-imooc__4ca89bb55c2182eabe2b74b3ec13183e659a26e5__4ca89bb55c2182eabe2b74b3ec13183e659a26e5
11-spring/11-spring-data/src/test/java/com/myimooc/spring/data/jpa/repository/EmployeeJpaSpecificationExecutorTest.java
null
EmployeeJpaSpecificationExecutorTest
null
destroy__()
null
@After public void destroy(){ ctx = null; }
null
zccodere_study-imooc__4ca89bb55c2182eabe2b74b3ec13183e659a26e5__4ca89bb55c2182eabe2b74b3ec13183e659a26e5
11-spring/11-spring-data/src/test/java/com/myimooc/spring/data/jpa/DataSourceTest.java
null
DataSourceTest
null
init__()
null
@Before public void init(){ ctx = new AnnotationConfigApplicationContext(SpringConfig.class); System.out.println("init"); }
null
zccodere_study-imooc__4ca89bb55c2182eabe2b74b3ec13183e659a26e5__4ca89bb55c2182eabe2b74b3ec13183e659a26e5
11-spring/11-spring-data/src/test/java/com/myimooc/spring/data/jpa/DataSourceTest.java
null
DataSourceTest
null
destroy__()
null
@After public void destroy(){ ctx = null; System.out.println("destroy"); }
null
zccodere_study-imooc__4ca89bb55c2182eabe2b74b3ec13183e659a26e5__4ca89bb55c2182eabe2b74b3ec13183e659a26e5
11-spring/11-spring-data/src/test/java/com/myimooc/spring/data/jpa/repository/EmployeeCrudRepositoryTest.java
null
EmployeeCrudRepositoryTest
null
init__()
null
@Before public void init(){ ctx = new AnnotationConfigApplicationContext(SpringConfig.class); employeeService = ctx.getBean(EmployeeService.class); }
null
zccodere_study-imooc__4ca89bb55c2182eabe2b74b3ec13183e659a26e5__4ca89bb55c2182eabe2b74b3ec13183e659a26e5
11-spring/11-spring-data/src/test/java/com/myimooc/spring/data/jpa/repository/EmployeeCrudRepositoryTest.java
null
EmployeeCrudRepositoryTest
null
destroy__()
null
@After public void destroy(){ ctx = null; }
null
zccodere_study-imooc__4ca89bb55c2182eabe2b74b3ec13183e659a26e5__4ca89bb55c2182eabe2b74b3ec13183e659a26e5
11-spring/11-spring-data/src/test/java/com/myimooc/spring/data/jpa/repository/EmployeeCrudRepositoryTest.java
null
EmployeeCrudRepositoryTest
null
entityManageFactoryTest__()
null
@Test public void entityManageFactoryTest(){ LocalContainerEntityManagerFactoryBean entityManagerFactory = (LocalContainerEntityManagerFactoryBean)ctx.getBean(LocalContainerEntityManagerFactoryBean.class); Assert.assertNotNull(entityManagerFactory); }
null
zccodere_study-imooc__4ca89bb55c2182eabe2b74b3ec13183e659a26e5__4ca89bb55c2182eabe2b74b3ec13183e659a26e5
11-spring/11-spring-data/src/test/java/com/myimooc/spring/data/jpa/repository/EmployeePagingAndSortingRepositoryTest.java
null
EmployeePagingAndSortingRepositoryTest
null
init__()
null
@Before public void init(){ ctx = new AnnotationConfigApplicationContext(SpringConfig.class); employeePagingAndSortingRepository = ctx.getBean(EmployeePagingAndSortingRepository.class); }
null
zccodere_study-imooc__4ca89bb55c2182eabe2b74b3ec13183e659a26e5__4ca89bb55c2182eabe2b74b3ec13183e659a26e5
11-spring/11-spring-data/src/test/java/com/myimooc/spring/data/jpa/repository/EmployeePagingAndSortingRepositoryTest.java
null
EmployeePagingAndSortingRepositoryTest
null
destroy__()
null
@After public void destroy(){ ctx = null; }
null
zccodere_study-imooc__4ca89bb55c2182eabe2b74b3ec13183e659a26e5__4ca89bb55c2182eabe2b74b3ec13183e659a26e5
11-spring/11-spring-data/src/test/java/com/myimooc/spring/data/jdbc/util/JDBCUtilsTest.java
null
JDBCUtilsTest
null
testGetConnection__()
null
@Test public void testGetConnection() throws Exception{ Connection connection = JdbcUtils.getConnection(); Assert.assertNotNull(connection); }
null
zccodere_study-imooc__4ca89bb55c2182eabe2b74b3ec13183e659a26e5__4ca89bb55c2182eabe2b74b3ec13183e659a26e5
11-spring/11-spring-data/src/test/java/com/myimooc/spring/data/jpa/service/EmployeeServiceTest.java
null
EmployeeServiceTest
null
init__()
null
@Before public void init(){ ctx = new AnnotationConfigApplicationContext(SpringConfig.class); employeeService = ctx.getBean(EmployeeService.class); }
null
zccodere_study-imooc__4ca89bb55c2182eabe2b74b3ec13183e659a26e5__4ca89bb55c2182eabe2b74b3ec13183e659a26e5
11-spring/11-spring-data/src/test/java/com/myimooc/spring/data/jpa/service/EmployeeServiceTest.java
null
EmployeeServiceTest
null
destroy__()
null
@After public void destroy(){ ctx = null; }
null
zccodere_study-imooc__4ca89bb55c2182eabe2b74b3ec13183e659a26e5__4ca89bb55c2182eabe2b74b3ec13183e659a26e5
11-spring/11-spring-data/src/test/java/com/myimooc/spring/data/jpa/service/EmployeeServiceTest.java
null
EmployeeServiceTest
null
transactionManagerTest__()
null
@Test public void transactionManagerTest(){ PlatformTransactionManager transactionManager = (PlatformTransactionManager)ctx.getBean(PlatformTransactionManager.class); Assert.assertNotNull(transactionManager); }
null
zccodere_study-imooc__4ca89bb55c2182eabe2b74b3ec13183e659a26e5__4ca89bb55c2182eabe2b74b3ec13183e659a26e5
11-spring/11-spring-data/src/test/java/com/myimooc/spring/data/jpa/repository/EmployeeRepositoryTest.java
null
EmployeeRepositoryTest
null
init__()
null
@Before public void init(){ ctx = new AnnotationConfigApplicationContext(SpringConfig.class); employeeRepository = ctx.getBean(EmployeeRepository.class); }
null
zccodere_study-imooc__4ca89bb55c2182eabe2b74b3ec13183e659a26e5__4ca89bb55c2182eabe2b74b3ec13183e659a26e5
11-spring/11-spring-data/src/test/java/com/myimooc/spring/data/jpa/repository/EmployeeRepositoryTest.java
null
EmployeeRepositoryTest
null
destroy__()
null
@After public void destroy(){ ctx = null; }
null
zccodere_study-imooc__4ca89bb55c2182eabe2b74b3ec13183e659a26e5__4ca89bb55c2182eabe2b74b3ec13183e659a26e5
11-spring/11-spring-data/src/test/java/com/myimooc/spring/data/jpa/repository/EmployeeJpaRepositoryTest.java
null
EmployeeJpaRepositoryTest
null
init__()
null
@Before public void init(){ ctx = new AnnotationConfigApplicationContext(SpringConfig.class); employeeJpaRepository = ctx.getBean(EmployeeJpaRepository.class); }
null
zccodere_study-imooc__4ca89bb55c2182eabe2b74b3ec13183e659a26e5__4ca89bb55c2182eabe2b74b3ec13183e659a26e5
11-spring/11-spring-data/src/test/java/com/myimooc/spring/data/jpa/repository/EmployeeJpaRepositoryTest.java
null
EmployeeJpaRepositoryTest
null
destroy__()
null
@After public void destroy(){ ctx = null; }
null
zccodere_study-imooc__6977652761ba36a10863bb1b0f33640ca84cedff__6977652761ba36a10863bb1b0f33640ca84cedff
03-spring-mvc/03-spring-mvc-simple/src/main/java/com/myimooc/spring/mvc/simple/model/entity/Course.java
null
Course
null
getLearningNum__()
null
public Integer getLearningNum() { return learningNum; }
null
zccodere_study-imooc__6977652761ba36a10863bb1b0f33640ca84cedff__6977652761ba36a10863bb1b0f33640ca84cedff
03-spring-mvc/03-spring-mvc-simple/src/main/java/com/myimooc/spring/mvc/simple/model/entity/Course.java
null
Course
null
setLearningNum__(Integer learingNum)
null
public void setLearningNum(Integer learingNum) { this.learningNum = learingNum; }
null
zccodere_study-imooc__6977652761ba36a10863bb1b0f33640ca84cedff__6977652761ba36a10863bb1b0f33640ca84cedff
03-spring-mvc/03-spring-mvc-simple/src/main/java/com/myimooc/spring/mvc/simple/model/entity/Course.java
null
Course
null
getDescr__()
null
public String getDescr() { return descr; }
null
zccodere_study-imooc__6977652761ba36a10863bb1b0f33640ca84cedff__6977652761ba36a10863bb1b0f33640ca84cedff
03-spring-mvc/03-spring-mvc-simple/src/main/java/com/myimooc/spring/mvc/simple/model/entity/Course.java
null
Course
null
setDescr__(String descr)
null
public void setDescr(String descr) { this.descr = descr; }
null
zccodere_study-imooc__6977652761ba36a10863bb1b0f33640ca84cedff__6977652761ba36a10863bb1b0f33640ca84cedff
03-spring-mvc/03-spring-mvc-simple/src/main/java/com/myimooc/spring/mvc/simple/web/controller/CourseController.java
null
CourseController
null
viewCourse2__(@PathVariable("courseId")Integer courseId,Map<String,Object> model)
null
@RequestMapping(value="/view2/{courseId}",method=RequestMethod.GET) public String viewCourse2(@PathVariable("courseId")Integer courseId,Map<String,Object> model){ log.debug("courseId:"+courseId); Course course = courseService.getCourseById(courseId); model.put("course", course); return "course_overview"; }
null
zccodere_study-imooc__6977652761ba36a10863bb1b0f33640ca84cedff__6977652761ba36a10863bb1b0f33640ca84cedff
03-spring-mvc/03-spring-mvc-simple/src/main/java/com/myimooc/spring/mvc/simple/web/controller/CourseController.java
null
CourseController
null
doUpload__(@RequestParam("file") MultipartFile file,HttpServletRequest request)
null
@RequestMapping(value="/doUpload",method=RequestMethod.POST) public String doUpload(@RequestParam("file") MultipartFile file,HttpServletRequest request) throws IOException{ if(!file.isEmpty()){ log.debug("正在处理文件:"+file.getOriginalFilename()); File fileTemp = new File("/upload",System.currentTimeMillis()+file.getOriginalFilename()); log.debug(fileTemp.getAbsolutePath()); FileUtils.copyInputStreamToFile(file.getInputStream(),fileTemp); } return "success"; }
null
zccodere_study-imooc__6977652761ba36a10863bb1b0f33640ca84cedff__6977652761ba36a10863bb1b0f33640ca84cedff
03-spring-mvc/03-spring-mvc-simple/src/main/java/com/myimooc/spring/mvc/simple/web/controller/HelloMvcComtroller.java
null
HelloMvcComtroller
null
helloMvc__()
null
@RequestMapping("/mvc") public String helloMvc(){ System.out.println("执行"+helloService.sayHello()); return "home"; }
null
zccodere_study-imooc__6977652761ba36a10863bb1b0f33640ca84cedff__6977652761ba36a10863bb1b0f33640ca84cedff
03-spring-mvc/03-spring-mvc-simple/src/main/java/com/myimooc/spring/mvc/simple/config/WebInitializer.java
null
WebInitializer
null
onStartup__(ServletContext servletContext)
null
@Override public void onStartup(ServletContext servletContext) throws ServletException { AnnotationConfigWebApplicationContext context = new AnnotationConfigWebApplicationContext(); context.register(SpringMvcConfig.class); //新建WebApplication,注册配置类,并将其和当前servletContext关联。 context.setServletContext(servletContext); // 注册SpringMvc的DispatcherServlet。 Dynamic servlet = servletContext.addServlet("dispatcher", new DispatcherServlet(context)); servlet.addMapping("/"); servlet.setLoadOnStartup(1); }
null
zccodere_study-imooc__6977652761ba36a10863bb1b0f33640ca84cedff__6977652761ba36a10863bb1b0f33640ca84cedff
03-spring-mvc/03-spring-mvc-simple/src/main/java/com/myimooc/spring/mvc/simple/model/entity/Chapter.java
null
Chapter
null
getDescr__()
null
public String getDescr() { return descr; }
null
zccodere_study-imooc__6977652761ba36a10863bb1b0f33640ca84cedff__6977652761ba36a10863bb1b0f33640ca84cedff
03-spring-mvc/03-spring-mvc-simple/src/main/java/com/myimooc/spring/mvc/simple/model/entity/Chapter.java
null
Chapter
null
setDescr__(String descr)
null
public void setDescr(String descr) { this.descr = descr; }
null
zccodere_study-imooc__6977652761ba36a10863bb1b0f33640ca84cedff__6977652761ba36a10863bb1b0f33640ca84cedff
03-spring-mvc/03-spring-mvc-simple/src/main/java/com/myimooc/spring/mvc/simple/config/SpringMvcConfig.java
null
SpringMvcConfig
null
viewResolver__()
null
@Bean public InternalResourceViewResolver viewResolver(){ InternalResourceViewResolver viewResolver = new InternalResourceViewResolver(); viewResolver.setPrefix("/WEB-INF/classes/views/"); viewResolver.setSuffix(".jsp"); viewResolver.setViewClass(JstlView.class); return viewResolver; }
null
zccodere_study-imooc__aa7c44163ad84875a42f943d42cf47fac83e5ebc__aa7c44163ad84875a42f943d42cf47fac83e5ebc
37-rxjava/37-rxjava-simple/src/main/java/com/myimooc/rxjava/simple/HelloWorld.java
null
HelloWorld
null
main__( String[] args )
null
@SuppressWarnings({ "deprecation", "rawtypes", "unchecked" }) public static void main( String[] args ) { // 1.创建被观察者 Observable myObservable = Observable.unsafeCreate(new OnSubscribe<String>(){ @Override public void call(Subscriber<? super String> subscriber) { subscriber.onNext("hello World!"); throw new NullPointerException("出错啦"); } }); // 2.创建观察者 Subscriber mySubscriber = new Subscriber<String>(){ @Override public void onCompleted() { System.out.println("onCompleted()"); } @Override public void onError(Throwable arg0) { System.out.println("onError()"); } @Override public void onNext(String str) { System.out.println("onNext() " + str); } }; // 3.订阅事件 myObservable.subscribe(mySubscriber); }
null
zccodere_study-imooc__b3a5647ac1a26791af63cf950b2f0af3099c0eba__b3a5647ac1a26791af63cf950b2f0af3099c0eba
01-spring/01-spring-simple/src/main/java/com/myimooc/spring/simple/ioc/injection/service/InjectionServiceImpl.java
null
InjectionServiceImpl
null
InjectionServiceImpl__(InjectionDAO injectionDAO)
null
public InjectionServiceImpl(InjectionDAO injectionDAO) { this.injectionDAO = injectionDAO; }
null
zccodere_study-imooc__b3a5647ac1a26791af63cf950b2f0af3099c0eba__b3a5647ac1a26791af63cf950b2f0af3099c0eba
01-spring/01-spring-simple/src/main/java/com/myimooc/spring/simple/ioc/injection/service/InjectionServiceImpl.java
null
InjectionServiceImpl
null
setInjectionDAO__(InjectionDAO injectionDAO)
null
public void setInjectionDAO(InjectionDAO injectionDAO) { this.injectionDAO = injectionDAO; }
null
zccodere_study-imooc__b3a5647ac1a26791af63cf950b2f0af3099c0eba__b3a5647ac1a26791af63cf950b2f0af3099c0eba
01-spring/01-spring-simple/src/main/java/com/myimooc/spring/simple/aop/api/MoocThrowsAdvice.java
null
MoocThrowsAdvice
null
afterThrowing__(Exception ex)
null
public void afterThrowing(Exception ex) throws Throwable { System.out.println("MoocThrowsAdvice afterThrowing 1"); }
null
zccodere_study-imooc__b3a5647ac1a26791af63cf950b2f0af3099c0eba__b3a5647ac1a26791af63cf950b2f0af3099c0eba
01-spring/01-spring-simple/src/main/java/com/myimooc/spring/simple/aop/api/MoocThrowsAdvice.java
null
MoocThrowsAdvice
null
afterThrowing__(Method method, Object[] args, Object target, Exception ex)
null
public void afterThrowing(Method method, Object[] args, Object target, Exception ex) throws Throwable { System.out.println("MoocThrowsAdvice afterThrowing 2 : " + method.getName() + " " + target.getClass().getName()); }
null
zccodere_study-imooc__b3a5647ac1a26791af63cf950b2f0af3099c0eba__b3a5647ac1a26791af63cf950b2f0af3099c0eba
01-spring/01-spring-simple/src/test/java/com/myimooc/spring/simple/beanannotation/InjectionTest.java
null
InjectionTest
null
InjectionTest__()
null
public InjectionTest() { super("classpath:spring-beanannotation.xml"); }
null
zccodere_study-imooc__b3a5647ac1a26791af63cf950b2f0af3099c0eba__b3a5647ac1a26791af63cf950b2f0af3099c0eba
01-spring/01-spring-simple/src/test/java/com/myimooc/spring/simple/beanannotation/InjectionTest.java
null
InjectionTest
null
testAutowired__()
null
@Test public void testAutowired() { InjectionService service = super.getBean("injectionServiceImpl"); service.save("This is autowired."); }
null
zccodere_study-imooc__b3a5647ac1a26791af63cf950b2f0af3099c0eba__b3a5647ac1a26791af63cf950b2f0af3099c0eba
01-spring/01-spring-simple/src/test/java/com/myimooc/spring/simple/beanannotation/InjectionTest.java
null
InjectionTest
null
testMultiBean__()
null
@Test public void testMultiBean() { BeanInvoker invoker = super.getBean("beanInvoker"); invoker.say(); }
null
zccodere_study-imooc__b3a5647ac1a26791af63cf950b2f0af3099c0eba__b3a5647ac1a26791af63cf950b2f0af3099c0eba
01-spring/01-spring-simple/src/main/java/com/myimooc/spring/simple/lifecycle/BeanLifeCycle.java
null
BeanLifeCycle
null
defautInit__()
null
public void defautInit() { System.out.println("Bean defautInit."); }
null
zccodere_study-imooc__b3a5647ac1a26791af63cf950b2f0af3099c0eba__b3a5647ac1a26791af63cf950b2f0af3099c0eba
01-spring/01-spring-simple/src/main/java/com/myimooc/spring/simple/aop/api/MoocMethodInterceptor.java
null
MoocMethodInterceptor
null
invoke__(MethodInvocation invocation)
null
@Override public Object invoke(MethodInvocation invocation) throws Throwable { System.out.println("MoocMethodInterceptor 1 : " + invocation.getMethod().getName() + " " + invocation.getStaticPart().getClass().getName()); Object obj = invocation.proceed(); System.out.println("MoocMethodInterceptor 2 : " + obj); return obj; }
null
zccodere_study-imooc__b3a5647ac1a26791af63cf950b2f0af3099c0eba__b3a5647ac1a26791af63cf950b2f0af3099c0eba
01-spring/01-spring-simple/src/main/java/com/myimooc/spring/simple/ioc/injection/dao/InjectionDAO.java
null
InjectionDAO
null
save__(String arg)
null
void save(String arg);
null
zccodere_study-imooc__b3a5647ac1a26791af63cf950b2f0af3099c0eba__b3a5647ac1a26791af63cf950b2f0af3099c0eba
01-spring/01-spring-simple/src/test/java/com/myimooc/spring/simple/resource/TestResource.java
null
TestResource
null
TestResource__()
null
public TestResource() { super("classpath:spring-resource.xml"); }
null
zccodere_study-imooc__b3a5647ac1a26791af63cf950b2f0af3099c0eba__b3a5647ac1a26791af63cf950b2f0af3099c0eba
01-spring/01-spring-simple/src/main/java/com/myimooc/spring/simple/aop/aspectj/MoocAspect.java
null
MoocAspect
null
beforeWithAnnotaion__(MoocMethod moocMethod)
null
@Before("pointcut() && @annotation(moocMethod)") public void beforeWithAnnotaion(MoocMethod moocMethod) { System.out.println("BeforeWithAnnotation." + moocMethod.value()); }
null
zccodere_study-imooc__b3a5647ac1a26791af63cf950b2f0af3099c0eba__b3a5647ac1a26791af63cf950b2f0af3099c0eba
01-spring/01-spring-simple/src/main/java/com/myimooc/spring/simple/beanannotation/jsr/JsrDAO.java
null
JsrDAO
null
save__()
null
public void save() { System.out.println("JsrDAO invoked."); }
null
zccodere_study-imooc__b3a5647ac1a26791af63cf950b2f0af3099c0eba__b3a5647ac1a26791af63cf950b2f0af3099c0eba
01-spring/01-spring-simple/src/main/java/com/myimooc/spring/simple/beanannotation/jsr/JsrService.java
null
JsrService
null
setJsrDAO__(@Named("jsrDAO") JsrDAO jsrDAO)
null
@Inject public void setJsrDAO(@Named("jsrDAO") JsrDAO jsrDAO) { this.jsrDAO = jsrDAO; }
null
zccodere_study-imooc__b3a5647ac1a26791af63cf950b2f0af3099c0eba__b3a5647ac1a26791af63cf950b2f0af3099c0eba
01-spring/01-spring-simple/src/main/java/com/myimooc/spring/simple/aop/api/MoocAfterReturningAdvice.java
null
MoocAfterReturningAdvice
null
afterReturning__(Object returnValue, Method method, Object[] args, Object target)
null
@Override public void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable { System.out.println("MoocAfterReturningAdvice : " + method.getName() + " " + target.getClass().getName() + " " + returnValue); }
null
zccodere_study-imooc__b3a5647ac1a26791af63cf950b2f0af3099c0eba__b3a5647ac1a26791af63cf950b2f0af3099c0eba
01-spring/01-spring-simple/src/test/java/com/myimooc/spring/simple/AbstractUnitTestSupport.java
null
AbstractUnitTestSupport
null
AbstractUnitTestSupport__()
null
public AbstractUnitTestSupport() { }
null
zccodere_study-imooc__b3a5647ac1a26791af63cf950b2f0af3099c0eba__b3a5647ac1a26791af63cf950b2f0af3099c0eba
01-spring/01-spring-simple/src/main/java/com/myimooc/spring/simple/resource/MoocResource.java
null
MoocResource
null
setApplicationContext__(ApplicationContext applicationContext)
null
@Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { this.applicationContext = applicationContext; }
null
zccodere_study-imooc__b3a5647ac1a26791af63cf950b2f0af3099c0eba__b3a5647ac1a26791af63cf950b2f0af3099c0eba
01-spring/01-spring-simple/src/main/java/com/myimooc/spring/simple/resource/MoocResource.java
null
MoocResource
null
resource__()
null
public void resource() throws IOException { Resource resource = applicationContext.getResource("config.txt"); System.out.println(resource.getFilename()); System.out.println(resource.contentLength()); }
null
zccodere_study-imooc__b3a5647ac1a26791af63cf950b2f0af3099c0eba__b3a5647ac1a26791af63cf950b2f0af3099c0eba
01-spring/01-spring-simple/src/main/java/com/myimooc/spring/simple/autowiring/AutoWiringDAO.java
null
AutoWiringDAO
null
say__(String word)
null
public void say(String word) { System.out.println("AutoWiringDAO : " + word); }
null
zccodere_study-imooc__b3a5647ac1a26791af63cf950b2f0af3099c0eba__b3a5647ac1a26791af63cf950b2f0af3099c0eba
01-spring/01-spring-simple/src/main/java/com/myimooc/spring/simple/aop/api/MoocBeforeAdvice.java
null
MoocBeforeAdvice
null
before__(Method method, Object[] args, Object target)
null
@Override public void before(Method method, Object[] args, Object target) throws Throwable { System.out.println("MoocBeforeAdvice : " + method.getName() + " " + target.getClass().getName()); }
null
zccodere_study-imooc__b3a5647ac1a26791af63cf950b2f0af3099c0eba__b3a5647ac1a26791af63cf950b2f0af3099c0eba
01-spring/01-spring-simple/src/test/java/com/myimooc/spring/simple/aware/AwareTest.java
null
AwareTest
null
testMoocApplicationContext__()
null
@Test public void testMoocApplicationContext() { System.out.println("testMoocApplicationContext : " + super.getBean("moocApplicationContext").hashCode()); }
null
zccodere_study-imooc__b3a5647ac1a26791af63cf950b2f0af3099c0eba__b3a5647ac1a26791af63cf950b2f0af3099c0eba
01-spring/01-spring-simple/src/test/java/com/myimooc/spring/simple/aware/AwareTest.java
null
AwareTest
null
textMoocBeanName__()
null
@Test public void textMoocBeanName() { System.out.println("textMoocBeanName : " + super.getBean("moocBeanName").hashCode()); }
null
zccodere_study-imooc__e5cf536e6e2340aa1afdf0a7e5df466ab94b3696__e5cf536e6e2340aa1afdf0a7e5df466ab94b3696
06-spring-mvc/06-spring-mvc-bind/src/main/java/com/myimooc/spring/mvc/bind/config/WebInitConfig.java
null
WebInitConfig
null
onStartup__(ServletContext servletContext)
null
@Override public void onStartup(ServletContext servletContext) throws ServletException { AnnotationConfigWebApplicationContext context = new AnnotationConfigWebApplicationContext(); // 注册SpringMVC的配置类 context.register(SpringMvcConfig.class); // 新建WebApplication,注册配置类,并将其和当前servletContext关联。 context.setServletContext(servletContext); // 注册SpringMVC的DispatcherServlet。 ServletRegistration.Dynamic servlet = servletContext.addServlet("dispatcher", new DispatcherServlet(context)); servlet.addMapping("/"); servlet.setLoadOnStartup(1); // 注册SpringMVC的字符过滤器 FilterRegistration.Dynamic encodingFilter = servletContext.addFilter("encoding", new CharacterEncodingFilter()); EnumSet<DispatcherType> dispatcherTypes = EnumSet.allOf(DispatcherType.class); dispatcherTypes.add(DispatcherType.REQUEST); dispatcherTypes.add(DispatcherType.FORWARD); encodingFilter.addMappingForUrlPatterns(dispatcherTypes, true, "*"); encodingFilter.setInitParameter("encoding", "UTF-8"); }
null
zccodere_study-imooc__e5cf536e6e2340aa1afdf0a7e5df466ab94b3696__e5cf536e6e2340aa1afdf0a7e5df466ab94b3696
06-spring-mvc/06-spring-mvc-bind/src/main/java/com/myimooc/spring/mvc/bind/common/MyDateFormatter.java
null
MyDateFormatter
null
print__(Date object, Locale locale)
null
@Override public String print(Date object, Locale locale) { return null; }
null
zccodere_study-imooc__e5cf536e6e2340aa1afdf0a7e5df466ab94b3696__e5cf536e6e2340aa1afdf0a7e5df466ab94b3696
06-spring-mvc/06-spring-mvc-bind/src/main/java/com/myimooc/spring/mvc/bind/config/SpringMvcConfig.java
null
SpringMvcConfig
null
viewResolver__()
null
@Bean public InternalResourceViewResolver viewResolver(){ InternalResourceViewResolver viewResolver = new InternalResourceViewResolver(); viewResolver.setPrefix("/WEB-INF/classes/views/"); viewResolver.setSuffix(".jsp"); viewResolver.setViewClass(JstlView.class); return viewResolver; }
null
zccodere_study-imooc__e5cf536e6e2340aa1afdf0a7e5df466ab94b3696__e5cf536e6e2340aa1afdf0a7e5df466ab94b3696
06-spring-mvc/06-spring-mvc-bind/src/main/java/com/myimooc/spring/mvc/bind/config/SpringMvcConfig.java
null
SpringMvcConfig
null
addResourceHandlers__(ResourceHandlerRegistry registry)
null
@Override public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/"); }
null
zccodere_study-imooc__e5cf536e6e2340aa1afdf0a7e5df466ab94b3696__e5cf536e6e2340aa1afdf0a7e5df466ab94b3696
06-spring-mvc/06-spring-mvc-bind/src/test/java/com/myimooc/spring/mvc/bind/FormatterTest.java
null
FormatterTest
null
test1__()
null
@Test public void test1() throws ParseException { CurrencyFormatter currencyFormatter = new CurrencyFormatter(); currencyFormatter.setFractionDigits(2);//����С�����λ currencyFormatter.setRoundingMode(RoundingMode.CEILING);//����ģʽ��ceilling��ʾ�������룩 //1���������ҷ��ŵ��ַ�����$123.125��ת��ΪBigDecimal("123.00") Assert.assertEquals(new BigDecimal("123.13"), currencyFormatter.parse("$123.125", Locale.US)); }
null
zccodere_study-imooc__e5cf536e6e2340aa1afdf0a7e5df466ab94b3696__e5cf536e6e2340aa1afdf0a7e5df466ab94b3696
06-spring-mvc/06-spring-mvc-bind/src/test/java/com/myimooc/spring/mvc/bind/FormatterTest.java
null
FormatterTest
null
test2__()
null
@Test public void test2(){ CurrencyFormatter currencyFormatter = new CurrencyFormatter(); currencyFormatter.setFractionDigits(2);//����С�����λ currencyFormatter.setRoundingMode(RoundingMode.CEILING);//����ģʽ��ceilling��ʾ�������룩 //2����BigDecimal("123")��ʽ��Ϊ�ַ�����$123.00��չʾ Assert.assertEquals("$123.00", currencyFormatter.print(new BigDecimal("123"), Locale.US)); }
null
zccodere_study-imooc__e5cf536e6e2340aa1afdf0a7e5df466ab94b3696__e5cf536e6e2340aa1afdf0a7e5df466ab94b3696
06-spring-mvc/06-spring-mvc-bind/src/main/java/com/myimooc/spring/mvc/bind/web/controller/TestController.java
null
TestController
null
baseType__(@RequestParam("xage") int age)
null
@RequestMapping(value = "/baseType.do") @ResponseBody public String baseType(@RequestParam("xage") int age) { return "age:" + age; }
null
zccodere_study-imooc__e5cf536e6e2340aa1afdf0a7e5df466ab94b3696__e5cf536e6e2340aa1afdf0a7e5df466ab94b3696
06-spring-mvc/06-spring-mvc-bind/src/main/java/com/myimooc/spring/mvc/bind/web/controller/TestController.java
null
TestController
null
baseType2__(Integer age)
null
@RequestMapping(value = "/baseType2.do") @ResponseBody public String baseType2(Integer age) { return "age:" + age; }
null
zccodere_study-imooc__e5cf536e6e2340aa1afdf0a7e5df466ab94b3696__e5cf536e6e2340aa1afdf0a7e5df466ab94b3696
06-spring-mvc/06-spring-mvc-bind/src/main/java/com/myimooc/spring/mvc/bind/web/controller/TestController.java
null
TestController
null
array__(String[] name)
null
@RequestMapping(value = "/array.do") @ResponseBody public String array(String[] name) { StringBuilder stringBuilder = new StringBuilder(); for (String item : name) { stringBuilder.append(item).append(" "); } return stringBuilder.toString(); }
null
zccodere_study-imooc__e5cf536e6e2340aa1afdf0a7e5df466ab94b3696__e5cf536e6e2340aa1afdf0a7e5df466ab94b3696
06-spring-mvc/06-spring-mvc-bind/src/main/java/com/myimooc/spring/mvc/bind/web/controller/TestController.java
null
TestController
null
object__(User user, Admin admin)
null
@RequestMapping(value = "/object.do") @ResponseBody public String object(User user, Admin admin) { return user.toString() + " " + admin.toString(); }
null
zccodere_study-imooc__e5cf536e6e2340aa1afdf0a7e5df466ab94b3696__e5cf536e6e2340aa1afdf0a7e5df466ab94b3696
06-spring-mvc/06-spring-mvc-bind/src/main/java/com/myimooc/spring/mvc/bind/web/controller/TestController.java
null
TestController
null
initUser__(WebDataBinder binder)
null
@InitBinder("user") public void initUser(WebDataBinder binder) { binder.setFieldDefaultPrefix("user."); }
null
zccodere_study-imooc__e5cf536e6e2340aa1afdf0a7e5df466ab94b3696__e5cf536e6e2340aa1afdf0a7e5df466ab94b3696
06-spring-mvc/06-spring-mvc-bind/src/main/java/com/myimooc/spring/mvc/bind/web/controller/TestController.java
null
TestController
null
initAdmin__(WebDataBinder binder)
null
@InitBinder("admin") public void initAdmin(WebDataBinder binder) { binder.setFieldDefaultPrefix("admin."); }
null
zccodere_study-imooc__e5cf536e6e2340aa1afdf0a7e5df466ab94b3696__e5cf536e6e2340aa1afdf0a7e5df466ab94b3696
06-spring-mvc/06-spring-mvc-bind/src/main/java/com/myimooc/spring/mvc/bind/web/controller/TestController.java
null
TestController
null
list__(UserListForm userListForm)
null
@RequestMapping(value = "list.do") @ResponseBody public String list(UserListForm userListForm) { return "listsize:" + userListForm.getUsers().size() + userListForm.toString(); }
null
zccodere_study-imooc__e5cf536e6e2340aa1afdf0a7e5df466ab94b3696__e5cf536e6e2340aa1afdf0a7e5df466ab94b3696
06-spring-mvc/06-spring-mvc-bind/src/main/java/com/myimooc/spring/mvc/bind/web/controller/TestController.java
null
TestController
null
set__(UserSetForm userSetForm)
null
@RequestMapping(value = "set.do") @ResponseBody public String set(UserSetForm userSetForm) { return userSetForm.toString(); }
null